[OPEN-ILS-DEV] Getting there -- bootstrapping OpenSRF Client problem

Mike Rylander mrylander at gmail.com
Sat Nov 18 20:18:05 EST 2006


On 11/18/06, Dan Scott <denials at gmail.com> wrote:
> On 18/11/06, Mike Rylander <mrylander at gmail.com> wrote:
> > On 11/18/06, Dan Scott <denials at gmail.com> wrote:
> > > I've pretty excited: I've made huge progress, and I've documented all
> > > of the required steps for Ubuntu 6.10 (Edgy Eft) in the wiki. Seems
> > > that there were a few steps assumed but not written up in the current
> > > docs -- that, or maybe I've done things the hard way (like having to
> > > use Gaim to register ejabberd users).
> > >
> >
> > Wow, that's very inventive!  I hadn't thought of doing that.  Bill has
> > a script for registering users to the jabber server, but I can't find
> > it at the moment.  I'm not sure if it's in CVS but I'll poke him once
> > he gets back from vacation.
> >
> > > One piece that concerns me is that when I run "opensrf_all start", the
> > > router fails to start with "!!!! Unable to connect router to jabber
> > > server localhost... exiting" -- but router.log simply says "Router
> > > adding trusted server: localhost" and "Router adding trusted client:
> > > localhost" without recording any error.
> > >
> >
> > I believe that ejabberd doesn't listen on 127.0.0.1 by default, so
> > you'll want to have the router connect via the real IP address of the
> > server, and (this is very important) use the fqdn as given by
> > `hostname -f` as the jabber domain.  Make sure that name is resolvable
> > to the  external IP of the machine, probably via /etc/hosts.
> >
> > In the file /openils/conf/opensrf_core.xml (adjusted for your base
> > installation directory) there is a section for setting up the router
> > connection (XPath: /config/router/transport), and you'll want to make
> > sure that the <server> node points to the name from above -- the fqdn
> > of the host.  The other important settings there are the <username>
> > and <password> nodes, which you probably already registered using
> > Gaim.  The username must be "router" -- well, must unless you want to
> > change a good deal of other stuff.
> >
> > Inside that same file, in the sections for /config/opensrf and
> > /config/gateway you'll need to make sure that there are domains/domain
> > and routers/router nodes for the same resolvable hostname.
> >
> > So ... that takes care of the C stuff, but currently the Perl services
> > have a different config file located at /openils/conf/boostrap.conf.
> > It's essentially the same config, but it's INI style instead of XML.
> > The entry for list:domains should match the values from the XPath path
> > for /config/opensrf/domains/domain, and router_name should match the
> > value from /config/opensrf/routers/router.
> >
> > After all that, and after restarting everything, you should see the
> > analog of these ps listings:
> >
> >   $ ps ax|grep -i jabber
> >   9038 ?        S      1:09
> > /opt/erlang//lib/erlang/erts-5.5.1/bin/beam -- -root
> > /opt/erlang//lib/erlang -progname erl -- -home /opt/home/ejabberd -s
> > ejabberd -name ejabberd -ejabberd config ejabberd.cfg -noshell
> > -noinput
> >   9039 ?        S      0:00
> > /opt/erlang//lib/erlang/erts-5.5.1/bin/beam -- -root
> > /opt/erlang//lib/erlang -progname erl -- -home /opt/home/ejabberd -s
> > ejabberd -name ejabberd -ejabberd config ejabberd.cfg -noshell
> > -noinput
> >   9040 ?        S      0:00
> > /opt/erlang//lib/erlang/erts-5.5.1/bin/beam -- -root
> > /opt/erlang//lib/erlang -progname erl -- -home /opt/home/ejabberd -s
> > ejabberd -name ejabberd -ejabberd config ejabberd.cfg -noshell
> > -noinput
> >
> >   $ ps ax|grep -i router
> >   9319 ?        Ss     0:05 OpenSRF Router
> >
> > and, of course, a huge pile of OpenSRF drones and listeners.
> >
> > At this point, if all's well, you can test your install using srfsh
> > (which has it's own config file -- surprise, surprise -- at
> > ~/.srfsh.xml, and the syntax is identical to opensrf_core.xml) thusly:
> >
> > $ /openils/bin/srfsh
> > srfsh# request open-ils.circ opensrf.system.time
> >
> > which, assuming the setup is happy, will return the epoch time.  Use
> > the command 'help' to see more.  However, if you don't get this far
> > then something is unhappy ...
> >
> > > Anyways, I'm at the point now where the PINES Web interface is showing
> > > up (yeah!) but I can't get past that point because every search
> > > request simply triggers an error in /var/log/apache2/error.log:
> > >
> > > File does not exist: /openils/var/web/opac/common/js/fmcore.js,
> > > referer: http://localhost/opac/en-US/skin/default/xml/index.xml
> > > File does not exist: /openils/var/web/opac/common/js/OrgTree.js,
> > > referer: http://localhost/opac/en-US/skin/default/xml/index.xml
> > >
> > > I'm guessing these missing JavaScript files are purely cosmetic. I'm
> > > more concerned about the following errors in osrfsys.log:
> >
> > As Jason mentioned, those are /very/ important.  They need to be
> > generated (and regenerated) after any in-database configuration,
> > including installation.  To do that run the following as root or the
> > opensrf user:
> >
> > $ cd /openils/bin
> > $ PERL5LIB=/openils/lib/perl5 ./autogen.sh ../conf/bootstrap.conf
> >
> > and you should see
> >
> > # PERL5LIB=/openils/lib/perl5 ./autogen.sh ../conf/bootstrap.conf
> > Updating fieldmapper
> > Updating web_fieldmapper
> > Updating OrgTree
> > Updating OrgTree HTML
> > Done
> >
> > Again, the /openils/conf/bootstrap.conf will need to be configured the
> > same as opensrf_core.xml for this to succeed.
> >
> > >
> > > Bootstrapping system with domain localhost, port 5222, and unixpath (null).
> > > Unable to bootstrap
> > >
> > > Despite those messages, there are tons of OpenSRF processes running
> > > happily when I check ps wax.
> > >
> >
> > They will run and connect to the jabber server, but it seems the
> > Router isn't, so they can't talk to each other at the moment.  I'm
> > sure it's a minor config file change that's needed and then everything
> > will start working.
> >
> > > Anyways, just thought I would throw this out there and see if it rings
> > > any bells. Time for this cat to go to bed.
> > >
> > > Dan
> > >
> >
> > Great work, Dan!  And thanks for all the documentation updates, that
> > is a BIG help!
> >
> > --
> > Mike Rylander
> > mrylander at gmail.com
> > GPLS -- PINES Development
> > Database Developer
> > http://open-ils.org
> >
>
> Gah. Well, registering via Gaim seems to work once, but subsequent
> connections fail. I'll try again once you're able to check in the
> auto-register script -- that will be a useful addition to the 'make
> config' automation bit, I would imagine.
>

Bill should be back from vacation tomorrow, though you could just use
chopchop for now.  That actually doesn't require any user registration
(completely open jabber server), so it's only really safe for exactly
your situation -- one server where you can tell the jabber server to
listen on 127.0.0.1.

> While you're digging up scripts, could you try and find
> /opt/conf/startup.pl that's listed in eg_vhost.conf and
> eg_vhost_ssl.conf? I had to comment it out to get Apache to start, but
> somehow I suspect that there might be something useful in that script
> too... :)
>

That's Bill again, but I agree that it would be handy to add some sed
magic and a template to the make process.

I'll poke him about both of these as soon as I see him, and thanks for
sticking with it! :)

> Dan
>


-- 
Mike Rylander
mrylander at gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org


More information about the Open-ils-dev mailing list