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

Dan Scott denials at gmail.com
Mon Nov 20 16:47:17 EST 2006


Aha -- and you also pointed out that the packaged version of erlang,
at least in some versions of Debian and Ubuntu, doesn't actually work
with ejabberd. (erlang R11, aka 1.11, doesn't allow ejabberd to
authenticate). So we have to build both from source.

And now, after building them both from source, I'm still having
problems getting erlang to recognize its crypto_dev module, without
which ejabberd refuses to authenticate users. Argh.

I'm going to drop back and punt, again. This time I'm going to switch
to a different distro, hopefully one on which ejabberd is known to
work. Gentoo is calling...

Dan

On 20/11/06, Bill Erickson <billserickson at gmail.com> wrote:
> Other odds-n-ends.
>
> I added some more ejabberd docs to [1], with example configs, etc.
>
> I added a blurb about the Apache startup.pl file here [2].
>
> [1] http://open-ils.org/dokuwiki/doku.php?id=ejabberd
> [2] http://open-ils.org/dokuwiki/doku.php?id=startup.pl
>
>
>
>  On 11/20/06, Mike Rylander <mrylander at gmail.com> wrote:
> > 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:
> > > > > 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.
> > >
> > > Yeah, weird thing there is that I did try going back to chopchop in
> > > the middle of my ejabberd frustrations and I was still getting exactly
> > > the same problem. Ah well. I've revised my Ubuntu instructions to use
> > > ejabberdctl to register the required users, so at least that's
> > > repeatable. I'm starting to wonder if there's something in the Ubuntu
> > > default config for ejabberd that conflicts with the settings that
> > > you're expecting.
> >
> > Just to update the list, Bill has checked the jabber user registration
> > script into CVS at ILS/OpenSRF/examples/register.pl.
> >
> > >
> > > > > 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! :)
> > >
> > > Right, and I did see the wishes for autoconf / automake on the
> > > software bounty list.  Seems like the right direction to go, both for
> > > checking prereqs and for propagating config settings into the
> > > corresponding config files. Once I get through the Evergreen 1.0
> > > VMWare image, I'll be happy to try helping with that bounty item.
> > >
> >
> >
> > --
> > Mike Rylander
> > mrylander at gmail.com
> > GPLS -- PINES Development
> > Database Developer
> > http://open-ils.org
> >
>
>
>
> --
> Bill Erickson
> PINES Systems Developer
> Georgia Public Library Service
>  billserickson at gmail.com
> http://open-ils.org


More information about the Open-ils-dev mailing list