On Jun 12, 2009, at 3:56 PM, Mike Rylander wrote:

[snip]

Looks like you've got stale routers hanging around.  I don't think
this will cause the problem you're seeing, but just in case, let's get
rid of those.  First thing is to stop the opensrf services
(osrf_ctl.sh stop_all) and then doublecheck that every opensrf process
has one away.  If not, kill whatever is left running.

$ osrf_ctl.sh -l -a stop_all
Stopping OpenSRF C process 14183...
Stopping OpenSRF Perl
Stopping OpenSRF Router process 3753...
Stopping OpenSRF Router process 3754...
Stopping OpenSRF Router process 14158...
/openils/bin/osrf_ctl.sh: line 133: kill: (14158) - No such process
Stopping OpenSRF Router process 14159...
$ ps -eaf | grep OpenSRF
opensrf  14165     1  0 14:32 ?        00:00:00 OpenSRF Router
opensrf  14536 14493  0 16:08 pts/0    00:00:00 grep OpenSRF
open...@evergreen:~$ kill -9 14165
open...@evergreen:~$ ps -eaf | grep OpenSRF
opensrf  14538 14493  0 16:08 pts/0    00:00:00 grep OpenSRF





Can you attach your opensrf_core.xml as well, with passwords blanked,
of course, if appropriate.

Certainly.

<?xml version="1.0"?>
<!--
vim:et:ts=2:sw=2:
-->
<config>

  <!-- bootstrap config for OpenSRF apps -->
  <opensrf>

    <routers>

<!-- define the list of routers our services will register with -->

      <router>

<!-- This is the public router. On this router, we only register applications which should be accessible to everyone on the opensrf network -->
        <name>router</name>
        <domain>public.localhost</domain>
        <services>
            <service>opensrf.math</service>
        </services>
      </router>

      <router>
<!-- This is the private router. All applications must register with this router, so no explicit <services> section is required -->
        <name>router</name>
        <domain>private.localhost</domain>
      </router>
    </routers>


    <!-- Jabber login settings
        Our domain should match that of the private router -->
    <domain>private.localhost</domain>
    <username>opensrf</username>
    <passwd>*****</passwd>
    <port>5222</port>
    <!-- name of the router used on our private domain.
this should match one of the <name> of the private router above -->
    <router_name>router</router_name>

    <!-- log file settings ======================================  -->
    <!-- log to a local file -->
    <logfile>/openils/var/log/osrfsys.log</logfile>

    <!-- Log to syslog. You can use this same layout for
        defining the logging of all services in this file -->
    <!--
    <logfile>syslog</logfile>
    <syslog>local2</syslog>
    <actlog>local1</actlog>
    -->

<!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
    <loglevel>3</loglevel>

    <!-- config file for the services -->
    <settings_config>/openils/conf/opensrf.xml</settings_config>

  </opensrf>

  <!-- Update this if you use ChopChop -->
  <chopchop>
    <!-- Our jabber server -->
    <domain>private.localhost</domain>
    <port>5222</port>
    <!-- used when multiple servers need to communicate -->
    <s2sport>5269</s2sport>
    <secret>secret</secret>
    <listen_address>10.0.0.3</listen_address>
    <loglevel>3</loglevel>
    <logfile>/openils/var/log/osrfsys.log</logfile>
  </chopchop>

<!-- The section between <gateway>...</gateway> is a standard OpenSRF C stack config file -->
  <gateway>

    <!--
    we consider ourselves to be the "originating" client for requests,
    which means we define the log XID string for log traces
    -->
    <client>true</client>

    <!--  the routers's name on the network -->
    <router_name>router</router_name>

    <!--
    These are the services that the gateway will serve.
    Any other requests will receive an HTTP_NOT_FOUND (404)
DO NOT put any services here that you don't want the internet to have access to
    This section will be soon deprecated for multi-domain mode...
    -->
    <services>
      <service>opensrf.math</service>
    </services>

    <!-- jabber login info -->

    <!-- The gateway connects to the public domain -->
    <domain>public.localhost</domain>
    <username>opensrf</username>
    <passwd>*****</passwd>
    <port>5222</port>
    <logfile>/openils/var/log/gateway.log</logfile>
    <loglevel>3</loglevel>

  </gateway>

<!-- = = = = = = = = = = = = = = = = = = = = ==================================================================== -->

    <routers>
        <router> <!-- public router -->
            <trusted_domains>
<!-- allow private services to register with this router and public clients to send requests to this router. -->
                <server>private.localhost</server>
<!-- also allow private clients to send to the router so it can receive error messages -->
                <client>private.localhost</client>
                <client>public.localhost</client>
            </trusted_domains>
            <transport>
                <server>public.localhost</server>
                <port>5222</port>
                <unixpath>/openils/var/sock/unix_sock</unixpath>
                <username>router</username>
                <password>*****</password>
                <resource>router</resource>
                <connect_timeout>10</connect_timeout>
                <max_reconnect_attempts>5</max_reconnect_attempts>
            </transport>
            <logfile>/openils/var/log/router.log</logfile>
            <!--
            <logfile>syslog</logfile>
            <syslog>local2</syslog>
            -->
            <loglevel>2</loglevel>
        </router>
        <router> <!-- private router -->
            <trusted_domains>
                <server>private.localhost</server>
<!-- only clients on the private domain can send requests to this router -->
                <client>private.localhost</client>
            </trusted_domains>
            <transport>
                <server>private.localhost</server>
                <port>5222</port>
                <username>router</username>
                <password>*****</password>
                <resource>router</resource>
                <connect_timeout>10</connect_timeout>
                <max_reconnect_attempts>5</max_reconnect_attempts>
            </transport>
            <logfile>/openils/var/log/router.log</logfile>
            <!--
            <logfile>syslog</logfile>
            <syslog>local2</syslog>
            -->
            <loglevel>4</loglevel>
        </router>
    </routers>

<!-- = = = = = = = = = = = = = = = = = = = = ==================================================================== -->

</config>




[snip]


That error means that opensrf.math did not register itself with the
public.localhost opensrf router when it started up.  That's why I'm
curious about your opensrf_core.xml.

Just to note: the only thing I've changed in the opensrf_core.xml file was to add the appropriate passwords to the appropriate locations. I have, to my knowledge, not changed anything else.

Okay, let's try again:

as user opensrf:

$ osrf_ctl.sh -l -a start_all
Starting OpenSRF Router
Starting OpenSRF Perl
Starting OpenSRF C (host=localhost)
$ ps -eaf | grep OpenSRF
opensrf  14676     1  0 16:24 ?        00:00:00 OpenSRF Router
opensrf  14682     1  0 16:24 ?        00:00:00 OpenSRF Router
opensrf 14687 1 0 16:24 ? 00:00:00 OpenSRF controller [opensrf.settings] opensrf 14689 14687 0 16:24 ? 00:00:00 OpenSRF master [opensrf.settings] opensrf 14690 14687 0 16:24 ? 00:00:00 OpenSRF listener [opensrf.settings] opensrf 14691 14689 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.settings] opensrf 14692 14689 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.settings] opensrf 14693 14689 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.settings] opensrf 14694 14689 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.settings] opensrf 14695 14689 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.settings] opensrf 14696 1 0 16:24 ? 00:00:00 OpenSRF controller [opensrf.persist] opensrf 14699 14696 0 16:24 ? 00:00:00 OpenSRF master [opensrf.persist] opensrf 14700 14696 0 16:24 ? 00:00:00 OpenSRF listener [opensrf.persist]
opensrf  14701     1  0 16:24 ?        00:00:00 OpenSRF System-C
opensrf 14702 14701 0 16:24 ? 00:00:00 OpenSRF Listener [opensrf.math] opensrf 14703 14702 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.math] opensrf 14704 14701 0 16:24 ? 00:00:00 OpenSRF Listener [opensrf.dbmath] opensrf 14708 14704 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.dbmath] opensrf 14710 14702 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.math] opensrf 14711 14704 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.dbmath] opensrf 14713 14704 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.dbmath] opensrf 14714 14702 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.math] opensrf 14715 14704 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.dbmath] opensrf 14716 14704 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.dbmath] opensrf 14717 14702 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.math] opensrf 14720 14702 0 16:24 ? 00:00:00 OpenSRF Drone [opensrf.math] opensrf 14721 14699 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.persist] opensrf 14722 14699 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.persist] opensrf 14723 14699 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.persist] opensrf 14724 14699 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.persist] opensrf 14725 14699 0 16:24 ? 00:00:00 OpenSRF drone [opensrf.persist]
opensrf  14731 14493  0 16:25 pts/0    00:00:00 grep OpenSRF



As my private.localhost user:

$ /openils/bin/srfsh
srfsh# request opensrf.math add 2 2

Received Data: 4

------------------------------------
Request Completed Successfully
Request Time in seconds: 0.007441
------------------------------------

As my public.localhost user:

$ /openils/bin/srfsh
srfsh# request opensrf.math add 2 2
Unable to communicate with service opensrf.math
srfsh#



Please, point out where I'm being stupid......

--
Victoria Bush
Opscan Evaluation Manager
Center for Teaching, Learning & Technology
[email protected]



Reply via email to