[JDEV] JUD not working in separate process

John Reinke John.M.Reinke at mail.sprint.com
Fri Jan 25 18:15:28 CST 2002


I can run JUD within the same process as jabber flawlessly. Since I need
to handle a few hundred users, I need to run JUD as a separate process.
It never succeeds, usually giving a 502 error. Conferencing works
flawlessly in a separate process, however.

Attached are generic versions of my config files. (Replace $VARNAMEs
with the values to test it out.) I've tried commenting out the s2s and
dnsrv sections because it's running on a private network, and I've also
played with the karma settings (see the multiple.xml file).

Any suggestions would be greatly appreciated.

Thanks,
John

-------------- next part --------------
<!--
  File:  confserv.xml
  Description:  contains settings to run conferencing service
  in a separate process.
-->

<jabber>

  <service id="conflinker">
    <uplink/>
    <connect>
      <ip>127.0.0.1</ip>
      <port>5232</port>
      <secret>myconfsecret</secret>
    </connect>
  </service>

  <service id='${CONF_NAME}'>
    <conference xmlns="jabber:config:conference">
      <vCard>
        <FN>Private Chatroom</FN>
        <DESC>This service is for private chatrooms.</DESC>
        <URL>http://${JABBER_NAME}/</URL>
      </vCard>
      <history>20</history>
      <notice>
        <join> has joined</join>
        <leave> has left</leave>
        <rename> is now known as </rename>
      </notice>
    </conference>
    <load>
      <conference>./conference-0.4.1/conference.so</conference>
    </load>
  </service>

</jabber>
-------------- next part --------------
<!--
  File:  judserv.xml
  Description:  contains settings to run Jabber User Directory 
  service in a separate process
-->

<jabber>

  <service id="judlinker">
    <uplink/>
    <connect>
      <ip>127.0.0.1</ip>
      <port>5231</port>
      <secret>myjudsecret</secret>
    </connect>
  </service>

  <service id="jud">
    <host>${JUD_NAME}</host>
    <jud xmlns="jabber:config:jud">
      <vCard>
        <FN>User Directory on ${JABBER_NAME}</FN>
        <DESC>This service provides a simple user directory service.</DESC>
        <URL>http://${JABBER_NAME}/</URL>
      </vCard>
    </jud>
    <load>
      <jud>./jud-0.4/jud.so</jud>
    </load>
  </service>

</jabber>
-------------- next part --------------
<!--
  File: multiple.xml

  Description: configuration file for Jabber server, setup to use 
  multiple processes for services that are running. For additional
  comments on the settings in this file, see the jabber.xml.sample
  file in this directory, or http://docs.jabber.org.

  Note: This current setup runs JUD in the same process as Jabber, 
  due to unresolved network issues.  
-->

<jabber>

  <service id="sessions">

    <host>${JABBER_NAME}</host>

    <jsm xmlns="jabber:config:jsm">
      <filter>
          <default/>
          <max_size>100</max_size>
          <allow>
              <conditions>
                  <ns/>
                  <unavailable/>
                  <from/>
                  <resource/>
                  <subject/>
                  <body/>
                  <show/>
                  <type/>
                  <roster/>
                  <group/>
              </conditions>
              <actions>
                  <error/>
                  <offline/>
                  <forward/>
                  <reply/>
                  <continue/>
                  <settype/>
              </actions>
          </allow>
      </filter>

      <!-- The server vCard -->
      <vCard>
        <FN>${JABBER_NAME}</FN>
        <DESC>${JABBER_NAME}</DESC>
        <URL>http://${JABBER_NAME}/</URL>
      </vCard>

      <!--Comment this register section out so no one can register-->
      <register notify="yes">
        <instructions>Choose a username and password to register with this server.</instructions>
        <name/>
        <email/>
      </register>

      <welcome>
        <subject>Welcome to ${JABBER_NAME}!</subject>
        <body>Welcome to the Jabber server at ${JABBER_NAME}! For information about how to use Jabber, visit the Jabber User's Guide at http://docs.jabber.org/</body>
      </welcome>

      <!--
      Jabber Administration - The <reply> will be the message that is 
      automatically sent in response to any admin messages.
      -->
      <admin>
        <read>${ADMIN_USER}@${JABBER_NAME}</read>
        <write>${ADMIN_USER}@${JABBER_NAME}</write>
        <reply>
          <subject>Auto Reply</subject>
          <body>This is a special administrative address. Your message was received and forwarded to server administrators.</body>
        </reply>
      </admin>

      <!--
      Leave commented out to prevent server from looking for updates
      <update><jabberd:cmdline flag="h">localhost</jabberd:cmdline></update>
      -->

      <!--
      Comment out to prevent users from manually adding themselves to the directory.
      -->
      <vcard2jud/>

      <!--Services that are available from this server.-->
      <browse>

        <conference type="private" jid="${CONF_NAME}" name="Private Conferencing"/>

        <service type="jud" jid="${JUD_NAME}" name="Jabber User Directory">
          <ns>jabber:iq:search</ns>
          <ns>jabber:iq:register</ns>
        </service>

      </browse>

    </jsm>

    <load main="jsm">
      <jsm>./jsm/jsm.so</jsm>
      <mod_echo>./jsm/jsm.so</mod_echo>
      <mod_roster>./jsm/jsm.so</mod_roster>
      <mod_time>./jsm/jsm.so</mod_time>
      <mod_vcard>./jsm/jsm.so</mod_vcard>
      <mod_last>./jsm/jsm.so</mod_last>
      <mod_version>./jsm/jsm.so</mod_version>
      <mod_announce>./jsm/jsm.so</mod_announce>
      <mod_agents>./jsm/jsm.so</mod_agents>
      <mod_browse>./jsm/jsm.so</mod_browse>
      <mod_admin>./jsm/jsm.so</mod_admin>
      <mod_filter>./jsm/jsm.so</mod_filter>
      <mod_offline>./jsm/jsm.so</mod_offline>
      <mod_presence>./jsm/jsm.so</mod_presence>
      <mod_auth_plain>./jsm/jsm.so</mod_auth_plain>
      <mod_auth_digest>./jsm/jsm.so</mod_auth_digest>
      <mod_auth_0k>./jsm/jsm.so</mod_auth_0k>
      <mod_log>./jsm/jsm.so</mod_log>
<!--Comment out mod_register to prevent people from registering-->
      <mod_register>./jsm/jsm.so</mod_register>
      <mod_xml>./jsm/jsm.so</mod_xml>
    </load>

  </service>

  <xdb id="xdb">
    <host/>
    <load>
      <xdb_file>./xdb_file/xdb_file.so</xdb_file>
    </load>
    <xdb_file xmlns="jabber:config:xdb_file">
      <spool><jabberd:cmdline flag='s'>./spool</jabberd:cmdline></spool>
    </xdb_file>
  </xdb>

  <!-- c2s manages incoming client socket connections -->
  <service id="c2s">
    <load>
      <pthsock_client>./pthsock/pthsock_client.so</pthsock_client>
    </load>
    <pthcsock xmlns='jabber:config:pth-csock'>
      <authtime>60</authtime>
      <karma>
        <heartbeat>2</heartbeat>
        <init>64</init>
        <max>64</max>
        <inc>6</inc>
        <dec>1</dec>
        <penalty>-3</penalty>
        <restore>64</restore>
      </karma>
      <ip port="5222"/>
    </pthcsock>
  </service>

<!-- original karma settings for above, just in case...
      <karma>
        <init>10</init>
        <max>10</max>
        <inc>1</inc>
        <dec>1</dec>
        <penalty>-6</penalty>
        <restore>10</restore>
      </karma>
-->

  <!-- Default server error logging, copies to a file and to STDERR.-->
  <log id='elogger'>
    <host/>
    <logtype/>
    <format>%d: [%t] (%h): %s</format>
    <file>error.log</file>
    <stderr/>
  </log>

  <!-- Default server record logging, logs general statistical/tracking data.-->
  <log id='rlogger'>
    <host/>
    <logtype>record</logtype>
    <format>%d %h %s</format>
    <file>record.log</file>
  </log>

  <!--
  The following two services are for handling server-to-server traffic,
  and are turned off for intranet use.
  -->
  <!-- External asychronous DNS resolver
  <service id="dnsrv">
    <host/>
    <load>
      <dnsrv>./dnsrv/dnsrv.so</dnsrv>
    </load>
    <dnsrv xmlns="jabber:config:dnsrv">
    	<resend service="_jabber._tcp">s2s</resend>
    	<resend>s2s</resend>
    </dnsrv>
  </service> 
  -->
  <!-- s2s config handles server connections and dialback hostname verification.
  <service id="s2s">
    <load>
      <dialback>./dialback/dialback.so</dialback>
    </load>
    <dialback xmlns='jabber:config:dialback'>
      <legacy/>
      <ip port="5269"/>
      <karma>
        <init>50</init>
        <max>50</max>
        <inc>4</inc>
        <dec>1</dec>
        <penalty>-5</penalty>
        <restore>50</restore>
      </karma>
    </dialback>
  </service>
  -->

  <!--
  NOTE:  UNCOMMENT ONLY ONE OF THE FOLLOWING JUD SETTINGS
  -->
  <!-- run JUD service within the jabberd process
  <service id="jud">
    <host>${JUD_NAME}</host>
    <jud xmlns="jabber:config:jud">
      <vCard>
        <FN>User Directory on ${JABBER_NAME}</FN>
        <DESC>This service provides a simple user directory service.</DESC>
        <URL>http://${JABBER_NAME}</URL>
      </vCard>
    </jud>
    <load>
      <jud>./jud-0.4/jud.so</jud>
    </load>
  </service>
-->

  <!-- run jud service as a separate process-->
  <service id="judlinker">
    <host>${JUD_NAME}</host>
    <accept>
      <ip>127.0.0.1</ip>
      <port>5231</port>
      <secret>myjudsecret</secret>
    </accept>
  </service>

  <!-- run conferencing service as a separate process -->
  <service id="conflinker">
    <host>${CONF_NAME}</host>
    <accept>
      <ip>127.0.0.1</ip>
      <port>5232</port>
      <secret>myconfsecret</secret>
    </accept>
  </service>

  <!-- Prevent clients from checking for updates from within a private network -->
  <service id="update.jabber.org">
    <host>update.jabber.org</host>
    <host>update.jabber.com</host>
    <null/>
  </service>

  <io>
    <rate points="5" time="25"/>
    <!--
    <allow><ip>127.0.0.0</ip><mask>255.255.255.0</mask></allow>
    <allow><ip>10.224.1.0</ip><mask>255.255.0.0</mask></allow>
    <deny><ip>22.11.44.0</ip><mask>255.255.255.0</mask></deny>
    -->
  </io>

  <pidfile>./jabber.pid</pidfile>

</jabber>


More information about the JDev mailing list