[OPEN-ILS-DEV] jabber problem - long post

Don McMorris don.mcmorris at gmail.com
Fri Apr 20 17:26:23 EDT 2007


Jabber is a critical (but separate) part of the OpenSRF system
(OpenSRF is the backend of Evergreen).  EJabberd is one of the more
popular choices.  For development, a jabber server built in-house was
made (called ChopChop).  I believe it's pretty well depreciated in
favor of EJabberD now.

EJabberd is a separate program.  Once installed, and the appropriate
users are set up, it will need to be started before the OpenSRF
system.

If you have a jabber server installed, make sure it's listening on the
right IP and port.  "Netstat -anp" should give you an output to show
what daemons are listening.  Ensure that your jabberd is listening on
5222 on 127.0.0.1 or 0.0.0.0.  If it's running on your LAN IP, you
will need to change your configuration (either the jabber
configuration or the OpenSRF configuration... it's your call).

If everything looks to be running, make sure that it's not firewalled
or otherwise blocked/occupied.

--Don

On 4/20/07, Rene Paquin <rpaquin at wlu.ca> wrote:
> Given the problems that i was having in my earlier attempt to install
> piunes I decided to do a complete reinstall again and this time document
> everything that i did.  I have gotten as far as trying to start the
> system with the following command...
> ./osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c
> /openils/conf/opensrf_core.xml -a start_all
>
> and i get this as a result..
>
> Starting OpenSRF Router
> !!!! Unable to connect router to jabber server localhost...
> exitingStarting OpenSRF Perl
> Use of uninitialized value in string eq at
> /openils/lib/perl5/OpenSRF/System.pm line 155.
> Starting OpenSRF C
> Loading OpenSRF host tamarak.wlu.ca with bootstrap config
> /openils/conf/opensrf_core.xml and config context opensrf
> tamarak:/openils/bin$   * ! EXCEPTION ! *
> TYPE: OpenSRF::EX::Jabber
> Mess: Jabber Exception
> Mess:  Could not connect to Jabber server: Invalid argument
> Loc.: 496 OpenSRF::Transport::SlimJabber::Client
> Loc.: /openils/lib/perl5/OpenSRF/Transport/SlimJabber/Client.pm
> Time: Fri Apr 20 09:16:00 2007
>
>
> When i try to connect by telnet I get this
> tamarak:/openils/bin$ telnet localhost 5222
> Trying 127.0.0.1...
> telnet: Unable to connect to remote host: Connection refused
>
> I have looked in various configuration files and I cannot see anything
> out of the ordinary.  At least I think.
> If anyone can point me in the right direction it would be most
> appreciated.
>
> I am also ahving problems installing the javascript::spidermonkey
> module.
>
> Thanks,
>
> Rene
>
> As for the documentatioon this is what i have so far and i will continue
> it until I have a working system.  (This is long)
>
> Platform - Debian version Etch
> IP - 205.189.23.14
> Host - tamarak.wlu.ca
>
> 1 - install Debian Etch
>
>     * desktop and standard environment
>     * install all updates to Etch
>
> 2 - install pre-requisites to Pine
>
>     * install postgresql8.1
>           o install base package
>                 + apt-get install postgresql-8.1 postgresql-contrib-8.1
> postgresql-doc-8.1 postgresql-plperl-8.1 postgresql-server-dev-8.1
>           o install contrib package
>                 + su postgres
>                 + psql template1 <
> /usr/share/postgresql/8.1/contrib/tsearch2.sql
>                 + psql template1 <
> /usr/share/postgresql/8.1/contrib/tablefunc.sql
>
>         * create database and add languages
>               o createlang plpgsql -d template1
>               o createdb -E UNICODE evergreen
>               o createlang plperl -d evergreen
>               o createlang plperlu -d evergreen
>
>         * change db user password
>               o psql
>               o alter user postgres password 'b******h';
>               o \q
>
>
> 3 - install apache2 and mod-perl2
>
>     *   apt-get install apache2-mpm-prefork apache2-prefork-dev
> libapache2-mod-perl2 apache2-utils
>
>
> 4 - install perl modules
>
>     * add following sources to the /etc/apt/sources.list file
>           o deb http://users.adelphia.net/~david.everly emilda/sarge/
>           o deb http://debian.pkgs.cpan.org/debian unstable main
>     * run apt-get update
>     * install modules
>           o apt-get install \
>              cpan-libtime-hires-perl \
>              libcache-memcached-perl \
>              libcgi-perl \
>              libclass-dbi-abstractsearch-perl \
>              libclass-dbi-perl \
>              libdatetime-perl \
>              libdatetime-format-builder-perl \
>              libdatetime-timezone-perl \
>              libdbd-pg-perl \
>              libdbd-sqlite3-perl \
>              libdbi-perl \
>              liberror-perl \
>              libexception-class-perl \
>              libgd-graph3d-perl \
>              libmarc-record-perl \
>              libmd5-perl \
>              libnet-server-perl \
>              libnet-z3950-perl \
>              libspreadsheet-writeexcel-perl \
>              libtemplate-perl \
>              libtext-aspell-perl \
>              libtext-csv-perl \
>              libunix-syslog-perl \
>              libwww-perl \
>              libxml-libxml-perl \
>              libxml-libxslt-perl \
>              libxml-perl \
>              libxml-sax-perl \
>              libxml-simple-perl \
>              libmarc-charset-perl \
>              libdatetime-format-builder-perl \
>              libuniversal-require-perl \
>              liblog-log4perl-perl
>           o  need to install DateTime::Format::ISO8601 or
> Javascript::SpiderMonkey, manually
>                 + download the modules from cpan.org and extract
>                 + apt-get install dh-make-perl devscripts
> libmodule-build-perl
>                 + install DateTime::Format::ISO8601
>                       # dh-make-perl --notest --build
> DateTime-Format-ISO8601-0.06
>                       # dpkg -i
> libdatetime-format-iso8601-perl_0.06-1_all.deb
>                       # install javascript::Spidermonkey
>                             * requires that Spidermonkey ver. 1.5 or
> better installed
>
>                 * problems installing javascript::spidermonkey   COME
> BACK TO IT
>
>     * apt-get install libxml2 libxml2-dev
>     * apt-get install libxslt1.1 libxslt1-dev
>     * apt-get install memcached libevent-dev libmemcache0
> libmemcache-dev
>     * apt-get install yaz libyaz2 libyaz2-dev
>     * apt-get install aspell libaspell-dev aspell-en
>     * apt-get install libgd2-xpm libgd2-xpm-dev
>     * apt-get install libreadline5-dev
>     * apt-get install automake
>     * apt-get install erlang ejabberd
>     * libdbi and libdbdpgsql 0.8.1
>           o add source deb http://libdbi.sourceforge.net/debian testing
> main to /etc/apt/sources.list file
>           o apt-get update
>           o apt-get install libdbi0-dev libdbi0 libdbd-pgsql
>           o Create a conf file for ld in /etc/ld.so.conf.d so the
> dbdpgsql driver is recognized.
>                 + echo /usr/lib/dbd > /etc/ld.so.conf.d/dbd.conf
>                 + ldconfig
>                 + confirm by running - ldconfig -p |grep dbd
>                       # result should be - libdbdpgsql.so (libc6) =>
> /usr/lib/dbd/libdbdpgsql.so
>     * Then edit the Makefile at Open-ILS/src/c-apps/Makefile and change
> every occurrence of -L/usr/local/lib/dbd to -L/usr/lib/dbd.
>           o
>
>
>
> 5 - Install Pines
>
>     * requires c-compiler
>           o  apt-get install build-essential
>     * to avoid the apxs error in the build process
>           o edit html.conf
>                 + add lines   #Dummy LoadModule directive to aid module
> installations
>                                    #LoadModule dummy_module
> /usr/lib/apache2/modules/mod_dummy.so
>                 + restart apache   /etc/init.d/apache2/restart
>     * change to directory Evergreen
>           o make config
>                 + creates the config file for the install with the
> following contents
>                       # PREFIX="/openils/"
>                         BINDIR="/openils//bin/"
>                         LIBDIR="/openils//lib/"
>                         PERLDIR="/openils//lib//perl5/"
>                         INCLUDEDIR="/openils//include/"
>                         SOCK="/openils//var/sock"
>                         PID="/openils//var/pid"
>                         LOG="/openils//var/log"
>                         DATADIR="/openils//var/data"
>                         TMP="/root/Desktop/Evergreen/.tmp"
>                         APXS2="/usr/bin/apxs2"
>                         APACHE2_HEADERS="/usr/include/apache2"
>                         APR_HEADERS="/usr/include/apr-1.0/"
>                         LIBXML2_HEADERS="/usr/include/libxml2/"
>                         WEBDIR="/openils//var/web"
>                         TEMPLATEDIR="/openils//var/templates"
>                         ETCDIR="/openils//conf"
>                         CIRCRULESDIR="/openils//var/circ"
>                         CATALOGSCRIPTDIR="/openils//var/catalog"
>                         PENALTYRULESDIR="/openils//var/penalty"
>                         XSLDIR="/openils//var/xsl"
>                         TARGETS=( "opensrf_all" "openils_all"
> "evergreen_core")
>                         OPENSRFDIR="OpenSRF/src/"
>                         OPENILSDIR="Open-ILS/src/"
>                         EVERGREENDIR="Evergreen/"
>                         CGIDIR="/openils//var/cgi-bin"
>                         DBDRVR="Pg"
>                         DBHOST="127.0.0.1"
>                         DBPORT="5432"
>                         DBNAME="evergreen"
>                         DBUSER="postgres"
>                         DBPW="b******h"
>                         REPORTERDIR="/openils//var/reporter"
>                         ADMINDIR="/openils//var/admin"
>           o export CFLAGS=-D_LARGEFILE64_SOURCE
>           o make
>           o make install
>                 + as the install populates the database you will be
> required to enter the database password a number of times
>           o chown -R opensrf:opensrf /openils/
>
>
> 6 - Apache config
>
>     * edit /etc/apache2/httpd.conf
>           o add the following lines to load some modules
>                 + LoadModule osrf_json_gateway_module
> /usr/lib/apache2/modules/osrf_json_gateway.so
>                   LoadModule xmlent_module
> /usr/lib/apache2/modules/mod_xmlent.so
>                   LoadModule cache_module
> /usr/lib/apache2/modules/mod_cache.so
>                   LoadModule disk_cache_module
> /usr/lib/apache2/modules/mod_disk_cache.so
>                   LoadModule rewrite_module
> /usr/lib/apache2/modules/mod_rewrite.so
>                   LoadModule expires_module
> /usr/lib/apache2/modules/mod_expires.so
>                   LoadModule include_module
> /usr/lib/apache2/modules/mod_include.so
>                   LoadModule ssl_module
> /usr/lib/apache2/modules/mod_ssl.so
>           o in order for the above modules to load properly the
> ld.so.conf file needs to be edited and the following lines added
>                 + /usr/local/lib/dbd
>                   /openils/lib/
>                 + run ldconfig
>                 + restart apache2  /etc/init.d/apache2 restart
>           o download the following files from the cvs repository
> http://open-ils.org/cgi-bin/viewcvs.cgi/ILS/Open-ILS/examples/apache/
>                 + eg.conf
>                 + eg_vhost.conf
>                 + startup.pl
>           o eg.conf - directory - /etc/apache2/sites-available
>                 + contents may need to be edited
>           o eg_vhost.conf - resides in /etc/apache2/    - is called by
> the eg.conf file
>                 + contents may need to be edited
>           o  need to create a symbolic link from sites-available/eg.conf
> to sites-enabled/eg.conf
>                 + ln /etc/apache2/sites-available/eg.conf
>                 + restart apache2
>                       # /etc/init.d/apache2 restart
>           o need to create an ssl certificate
>                 + run in root terminal - openssl req -new -x509 -nodes
> -out server.crt -keyout server.key and follow the promtps
>                 + create folder ssl in /etc/apache2
>                 + copy files server.crt and server.key into
> /etc/apache2/ssl
>                 + restart apache2
>                       # /etc/init.d/apache2 restart
>
> 7 - Starting the system
>
>     *     starting memcached
>           o /usr/bin/memcached -u nobody -p 10101 -l 127.0.0.1 -d
>     * starting openils
>           o ./osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c
> /openils/conf/opensrf_core.xml -a start_all
>                 + from the /openils/bin directory
>                 +  a couple of environment paths to set
>                       # export PATH=/openils/bin:$PATH
>                       # export PERL5LIB=/openils/lib/perl5:$PERL5LIB
>           o configure ejjaberd
>                 + edit /etc/ejabberd/ejabberd.cfg
>                       # change all max_stanza_size values to 2000000
>                       # change {shaper, normal, {maxrate, 1000}} maxrate
> to 50000
>                       # comment out mod_offline line
>
>
>
>
>
>


More information about the Open-ils-dev mailing list