[OPEN-ILS-DEV] jabber problem - long post
Bill Ott
bott at grpl.org
Tue Apr 24 13:43:13 EDT 2007
A couple observations.
Is /openils/bin on your PATH? "opensrf_router: command not found"
suggests that it is not.
Have you registered users to the jabber server? I just use GAIM (see:
http://www.pidgin.im/downloads.php), to register some initial accounts.
See the "Using Ejabberd" heading here:
http://open-ils.org/dokuwiki/doku.php?id=ejabberd , which also notes a
tool in the distribution for doing so.
Rene Paquin said the following on 04/24/2007 10:34 AM:
> I think I am getting closer however I am still having ejabberd woes.
> Ejabberd is running and listening as I get the following results from
> tjhis netstat command -
>
> netstat -an | grep -E '5222|5269'
> tcp 0 0 0.0.0.0:5222 0.0.0.0:*
> LISTEN
> tcp 0 0 0.0.0.0:5269 0.0.0.0:*
> LISTEN
>
> I can also connect via telnet.
>
> However when i try to start openils I get these results:
>
> /openils/bin$ ./osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c
> /openils/conf/opensrf_core.xml -a start_all
> I think I am getting closer however I am still having ejabberd woes.
> Ejabberd is running and listening as I get the following results from
> tjhis netstat command -
>
> netstat -an | grep -E '5222|5269'
> tcp 0 0 0.0.0.0:5222 0.0.0.0:*
> LISTEN
> tcp 0 0 0.0.0.0:5269 0.0.0.0:*
> LISTEN
>
> I can also connect via telnet.
>
> However when i try to start openils I get these results:
>
> /openils/bin$ ./osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c
> /openils/conf/opensrf_core.xml -a start_all
>
> Starting OpenSRF Router
> ./osrf_ctl.sh: line 110: opensrf_router: command not found
> Starting OpenSRF Perl
> (in cleanup) Dying 7691 at
> /openils/lib/perl5/OpenSRF/UnixServer.pm line 21
>
> OpenSRF::UnixServer::DESTROY('OpenSRF::UnixServer=HASH(0x8b0305c)')
> called at /openils/lib/perl5/OpenSRF/System.pm line 317
> eval {...} called at /openils/lib/perl5/OpenSRF/System.pm line
> 317
>
> OpenSRF::System::launch_settings('OpenSRF::System=HASH(0x814ec28)')
> called at /openils/lib/perl5/OpenSRF/System.pm line 159
> OpenSRF::System::bootstrap('OpenSRF::System') called at -e line
> 1
>
> * ! EXCEPTION ! *
> TYPE: OpenSRF::EX::Jabber
> Mess: Jabber Exception
> Mess: * ejabberd at localhost/system_client_drone_at_tamarak.wlu.ca:
> Unable to authenticate: <iq type='error' id='123'>
> Mess: <query xmlns='jabber:iq:auth'>
> Mess: <username>*****</username>
> Mess: <password>*****</password>
> Mess: <resource>system_client_drone_at_tamarak.wlu.ca_7686</resource>
> Mess: </query>
> Mess: <error code='401' type='auth'><not-authorized
> xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
> Loc.: 535 OpenSRF::Transport::SlimJabber::Client
> Loc.: /openils/lib/perl5/OpenSRF/Transport/SlimJabber/Client.pm
> Time: Tue Apr 24 04:03:54 2007
> Starting OpenSRF C
> ./osrf_ctl.sh: line 138: opensrf-c: command not found
>
> In the osrfsyslog file I get this:
> opensrf 2007-04-24 03:27:18 [INFO:6275:osrf_system.c:195:] Bootstrapping
> system with domain localhost, port 5222, and unixpath (null)
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:422:] Error
> connecting to jabber
> opensrf 2007-04-24 03:27:19 [INFO:6275:transport_session.c:406:]
> Received <error> message with type auth and code 401
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:506:] Error
> in IQ packet: code 401
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:507:] Error
> 401 means not authorized
> opensrf 2007-04-24 03:27:19 [ERR :6275:osrf_system.c:67:] Unable to
> bootstrap
>
> In the router log I get this:
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:78:] Router
> connecting as: server: localhost port: 5222 user: router resource:
> router
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:91:] Router
> adding trusted server: localhost
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:94:] Router
> adding trusted client: localhost
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:422:] Error
> connecting to jabber
> router 2007-04-24 03:27:13 [INFO:6260:transport_session.c:406:] Received
> <error> message with type auth and code 401
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:506:] Error in
> IQ packet: code 401
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:507:] Error
> 401 means not authorized
>
> and finally in the ejabberd log there is this:
> =INFO REPORT==== 2007-04-24 04:03:54 ===
> I(<0.1638.0>:ejabberd_c2s:417): (#Port<0.1723>) Failed legacy
> authentication for
> ejabberd at localhost/opensrf.settings_listener_at_tamarak.wlu.ca_7693
>
> I have this feeling that I am getting very close thanks to everyones
> help.
> Starting OpenSRF Router
> ./osrf_ctl.sh: line 110: opensrf_router: command not found
> Starting OpenSRF Perl
> (in cleanup) Dying 7691 at
> /openils/lib/perl5/OpenSRF/UnixServer.pm line 21
>
> OpenSRF::UnixServer::DESTROY('OpenSRF::UnixServer=HASH(0x8b0305c)')
> called at /openils/lib/perl5/OpenSRF/System.pm line 317
> eval {...} called at /openils/lib/perl5/OpenSRF/System.pm line
> 317
>
> OpenSRF::System::launch_settings('OpenSRF::System=HASH(0x814ec28)')
> called at /openils/lib/perl5/OpenSRF/System.pm line 159
> OpenSRF::System::bootstrap('OpenSRF::System') called at -e line
> 1
>
> * ! EXCEPTION ! *
> TYPE: OpenSRF::EX::Jabber
> Mess: Jabber Exception
> Mess: * ejabberd at localhost/system_client_drone_at_tamarak.wlu.ca:
> Unable to authenticate: <iq type='error' id='123'>
> Mess: <query xmlns='jabber:iq:auth'>
> Mess: <username>*****</username>
> Mess: <password>*****</password>
> Mess: <resource>system_client_drone_at_tamarak.wlu.ca_7686</resource>
> Mess: </query>
> Mess: <error code='401' type='auth'><not-authorized
> xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
> Loc.: 535 OpenSRF::Transport::SlimJabber::Client
> Loc.: /openils/lib/perl5/OpenSRF/Transport/SlimJabber/Client.pm
> Time: Tue Apr 24 04:03:54 2007
> Starting OpenSRF C
> ./osrf_ctl.sh: line 138: opensrf-c: command not found
>
> In the osrfsyslog file I get this:
> opensrf 2007-04-24 03:27:18 [INFO:6275:osrf_system.c:195:] Bootstrapping
> system with domain localhost, port 5222, and unixpath (null)
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:422:] Error
> connecting to jabber
> opensrf 2007-04-24 03:27:19 [INFO:6275:transport_session.c:406:]
> Received <error> message with type auth and code 401
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:506:] Error
> in IQ packet: code 401
> opensrf 2007-04-24 03:27:19 [WARN:6275:transport_session.c:507:] Error
> 401 means not authorized
> opensrf 2007-04-24 03:27:19 [ERR :6275:osrf_system.c:67:] Unable to
> bootstrap
>
> In the router log I get this:
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:78:] Router
> connecting as: server: localhost port: 5222 user: router resource:
> router
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:91:] Router
> adding trusted server: localhost
> router 2007-04-24 03:27:13 [INFO:6260:osrf_router_main.c:94:] Router
> adding trusted client: localhost
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:422:] Error
> connecting to jabber
> router 2007-04-24 03:27:13 [INFO:6260:transport_session.c:406:] Received
> <error> message with type auth and code 401
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:506:] Error in
> IQ packet: code 401
> router 2007-04-24 03:27:13 [WARN:6260:transport_session.c:507:] Error
> 401 means not authorized
>
> and finally in the ejabberd log there is this:
> =INFO REPORT==== 2007-04-24 04:03:54 ===
> I(<0.1638.0>:ejabberd_c2s:417): (#Port<0.1723>) Failed legacy
> authentication for
> ejabberd at localhost/opensrf.settings_listener_at_tamarak.wlu.ca_7693
>
> I have this feeling that I am getting very close thanks to everyones
> help.
>
> ================================
> Rene Paquin, MCSE
> Library Network Administrator
> Wilfrid Laurier University
> Waterloo, Ontario, Canada
> (519)884-0710 x3795
> rpaquin at wlu.ca
> **********************************************
>
>
>>>> don.mcmorris at gmail.com 04/20/07 5:26 PM >>>
>>>>
> 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