SPAM: Re: [OPEN-ILS-DEV] help with OPAC configuration

Don McMorris don.mcmorris at gmail.com
Wed May 23 08:14:07 EDT 2007


HI Mon:

This message is sent both to you and the list.  The troubleshooting
process and eventual solution will be beneficial to the community, and
the reply to you will bypass the digest.

My initial hunch is a database issue.  Would you run the following,
and report the output to us?:
user$: su postgres -c "psql openils"
openils=# SELECT * FROM actor.org_unit;
[[output]]
openils=# \q

the "openils" in this case is the database name.  If you are using a
different name, you can change this.  If you'd rather connect to the
database as a different user, your command would look like:
user$: psql -U [user]  openils

Basically, here's how it'd work...
If you have an output similar to:
openils=# SELECT * from actor.org_unit;
 id | parent_ou | ou_type | ill_address | holds_address |
mailing_address | billing_address | shortname |         name         |
email | phone | opac_visible
----+-----------+---------+-------------+---------------+-----------------+-----------------+-----------+----------------------+-------+-------+--------------
  1 |           |       1 |           1 |             1 |
 1 |               1 | CONS      | Example Consortium   |       |
 | t
  2 |         1 |       2 |           1 |             1 |
 1 |               1 | SYS1      | Example System 1     |       |
 | t
  3 |         1 |       2 |           1 |             1 |
 1 |               1 | SYS2      | Example System 2     |       |
 | t
  4 |         2 |       3 |           1 |             1 |
 1 |               1 | BR1       | Example Branch 1     |       |
 | t
  5 |         2 |       3 |           1 |             1 |
 1 |               1 | BR2       | Example Branch 2     |       |
 | t
  6 |         3 |       3 |           1 |             1 |
 1 |               1 | BR3       | Example Branch 3     |       |
 | t
  7 |         3 |       3 |           1 |             1 |
 1 |               1 | BR4       | Example Branch 4     |       |
 | t
  8 |         4 |       4 |           1 |             1 |
 1 |               1 | SL1       | Example Sub-lib 1    |       |
 | t
  9 |         6 |       5 |           1 |             1 |
 1 |               1 | BM1       | Example Bookmobile 1 |       |
 | t
(9 rows)
then the database is probably OK (check your configuration to see if
your hostname/user/password/database names are all right in the
opensrf.xml config.

If you get 0 rows, then go back to bootstrapping and make sure you
have at least 1 OU.

If you get an error that the relation doesn't exist, you probably have
an issue that prevented the data from loading into the database.  If
this is the issue, we can tackle it then.


Just a comment also... openils.xml is depreciated in 1.1x and later.
It's all in opensrf.xml now.  Your modified directions are correct!
I'll make a note on the documentation (1.0.x still uses open-ils.xml).

If the database looks fine and your configuration looks correct, would
you mind sending us your configurations and logs? You can do this as
follows:
user$ su opensrf
opensrf$ mkdir /tmp/openils
opensrf$ cp -Rv /openils/{var/log,conf} /tmp/openils
opensrf$ cd /tmp/openils/conf
/* Take this moment to go through the conf and sanitize it of any
sensitive passwords */
opensrf$ cd /tmp
opensrf$ tar -cjf openils.tar.bz2 openils/

and send us openils.tar.bz2.

Talk to you soon!
--Don

On 5/22/07, Pseudo Admin <sayanslib at gmail.com> wrote:
> Hello Don!
>
> Thanks!
>
> here is the output when i started /openils/bin/srfsh and run
> srfsh# request open-ils.storage open-ils.actor.org_tree
> .retrieve
> Received Exception:
> Name: osrfMethodException
> Status:  *** Call to [open-ils.actor.org_tree.retrieve]
> failed for session [1179
> 880050.552053.11798800505500], thread trace [1]:
> Can't use an undefined value as an ARRAY reference at
> /openils/lib/perl5/OpenILS
> /Application/Actor.pm line 1001, <STDIN> line 1.
>
> Status: 500
> ------------------------------------
> Request Completed Successfully
> Request Time in seconds: 70.092244
> ------------------------------------
> srfsh#
> srfsh#
>
> Looking at the error it looks like it is referring to this function of
> /openils/lib/perl5/OpenILS/Application/Actor.pm at line
> 1001
>
> I looked at the file and here is a copy of the portion where the error
> occured:
>
> sub get_org_tree {
>      my( $self, $client) = @_;
>
>     $cache    = OpenSRF::Utils::Cache->new("global", 0)
> unless $cache;
>     my $tree = $cache->get_cache('orgtree');
>      return $tree if $tree;
>
> line 1001>>    $tree = new_editor()->search_actor_org_unit(
>         [
>             {"parent_ou" => undef },
>             {
>                 flesh                => 2,
>                 flesh_fields    => { aou =>  ['children'] },
>                  order_by            => { aou => 'name'}
>             }
>          ]
>     )->[0];
>
>     $cache->put_cache('orgtree', $tree);
>     return $tree;
> }
>
> pardon me, but I really don't know what it means, and how do I go from here?
>
> I followed the DokuWiki on Installing Prerequisites on Ubuntu 7.04 with a
> slight modification, I opted to use opensrf.xml on my bootstrap.conf instead
> of openils.xml since I couldn't find the example file when I installed
> version 1.1.5. here is more info on my system:
>
> Evergreen Development/Testing Release 1.1.5
> Postgresql 8.2
> Ubuntu Server 7.04
>
> Thank you once again!
> Mon
>
>
> Message: 4
> Date: Tue, 22 May 2007 05:58:12 -0400
> From: "Don McMorris" <don.mcmorris at gmail.com>
> Subject: Re: [OPEN-ILS-DEV] help with OPAC configuration
> To: open-ils-dev at list.georgialibraries.org
> Message-ID:
>         <
> f2b02f1e0705220258t3913f6d9y822e4981e0e88e4f at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Mon!
>
> Would you start /openils/bin/srfsh and run the following (and paste
>  back the output):
> srfsh# request open-ils.storage open-ils.actor.org_tree
> .retrieve
>
> Note that srfsh will require a ~/.srfsh.xml file for configuration.
> If you haven't already set this up, a sample configuration is at
> http://www.open-ils.org/dokuwiki/doku.php?id=osrf-devel:srfsh_--_.srfsh.xml
> .
>
> Version information may help also.
> >Evergreen version (1.0.5.2? 1.1.5? CVS HEAD checkout 5/21/07?)
>  >Postgres version
> >Linux distro and version
>
> Thanks!
> --Don
>
> On 5/22/07, Pseudo Admin <sayanslib at gmail.com > wrote:
> > Greetings!
> >
> > It seems I am on the verge of running an Open-ILS on our server but I am
> > still having difficulties with OPAC configuration
> >
> > Could anyone help me figure out what is it that I am doing wrong
> >
> > Here is the result when I run
> > cslibadmin at cslibff:/openils/bin$ sudo -u opensrf /openils/bin/osrf_ctl.sh
> -d
> > /tmp/ -p /openils/conf/bootstrap.conf -c /openils/conf/opensrf_core.xml -a
> > start_all
> >
> > Starting OpenSRF Router
> > Starting OpenSRF Perl
> >  * Server type: Net::Server::PreFork
> >  * System bootstrap
> >  * Starting UnixServer for open-ils.cat...
> >  * Starting UnixServer for open-ils.supercat...
> >  * Starting UnixServer for open-ils.search...
> >  * Starting UnixServer for open-ils.circ...
> >  * Starting UnixServer for open-ils.actor...
> >  * Starting UnixServer for open-ils.storage.. .
> >  * Starting UnixServer for open-ils.penalty...
> >  * Starting UnixServer for open-ils.collections...
> >   * Starting UnixServer for open-ils.ingest...
> >  * Starting UnixServer for open-ils.reporter.. .
> >  * Starting Listener for open-ils.cat...
> >  * Starting Listener for open-ils.supercat...
> >  * Starting Listener for open-ils.search.. .
> >  * Starting Listener for open-ils.circ...
> >  * Starting Listener for open-ils.actor...
> >  * Starting Listener for open-ils.storage...
> >  * Starting Listener for open-ils.penalty...
> >  * Starting Listener for open-ils.collections.. .
> >  * Starting Listener for open-ils.ingest.. .
> >  * Starting Listener for open-ils.reporter...
> >  * System is ready...
> > Starting OpenSRF C (host=cslibff)
> > Loading OpenSRF host cslibff with bootstrap config
> > /openils/conf/opensrf_core.xml and config context opensrf
> >  * Running application opensrf.math
> >  * Running application opensrf.dbmath
> >  * Running application open-ils.auth
> >  * Running application open-ils.cstore
> >  * Running application open-ils.reporter-store
> >
> > then this is the result when I run
> >
> > cslibadmin at cslibff:/openils/bin$ sudo -u opensrf /openils/bin/autogen.sh
> > ../conf/bootstrap.conf
> >
> > Updating fieldmapper
> > Updating web_fieldmapper
> > Updating OrgTree
> > removing OrgTree from the cache...
> >  Updating OrgTree HTML
> > Can't call method "opac_visible" on an undefined value at
> > org_tree_html_options.pl line 28.
> > Done
> >
> > How do I solve this problem?
> >
> > Thank you in advance
> >
> > mon


More information about the Open-ils-dev mailing list