tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Shvarts <ys2...@columbia.edu>
Subject webapps fail to start if jndi realm of one <host> is down (long)
Date Fri, 04 Oct 2002 17:45:50 GMT
Hello all

sorry for the long post. i have the following issue: i have several
webapps that are loaded
tomcat-apache startup and are invoked using mod_webapp. there are several
hosts defined in server.xml. there is a jndi realm declared in one of the
host tag. the back-end of that is ldap server.

everything works when i start tomcat AFTER ldap has been successfully
started. however, if ldap server is down, and i attempt to start tomcat,
all webapps in all <host>s fail to start. if ldap is down during tomcat
startup, how can i start webapps that are in
<host>s other than the one that contains the jndi realm that fail to
connect?

also, i am yet to try to bring ldap down while tomcat is up with
all the webapps deployed. unfortunately, today this will not be feasible
since ldap is running as root and i can't kill that process. i'd love to
hear your comments as to what will/should happen in this case and how to
configure tomcat to make as much functionality available as possible in a
scenarion like this.

this is my server.xml

$ cat server.xml
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Apache">

  <Connector className="org.apache.catalina.connector.warp.WarpConnector"
    port="8008" minProcessors="5" maxProcessors="75"
    enableLookups="true" acceptCount="10" debug="0"/>

    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
      defaultHost="cilantro.cc.columbia.edu" name="Apache" debug="0">


     <Host name="origin-default.auth.nsdl.org">
        <Context
docBase="/nsdl/webapp.origin-default.delete/accounts/webApp"
path="/accounts" reloadable="true" />
        <Context
docBase="/nsdl/webapp.origin-default.delete/manage/webApp" path="/manage"
reloadable="true" />

        <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="origin-default_log." suffix=".txt"
          timestamp="true"/>
      </Host>

      <Host name="origin-internal.auth.nsdl.org">
        <Context
docBase="/nsdl/webapp.origin-internal.delete/accounts/webApp"
path="/accounts" reloadable="true" />

        <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
          connectionURL="ldap://cilantro.cc.columbia.edu:9050"
          userPattern="uid={0},ou=InternalOrigin,dc=nsdl,dc=org"
userPassword="userPassword"
          roleBase="ou=InternalOrigin,dc=nsdl,dc=org" roleName="uid"
roleSearch="(uniqueMember={0})" />

        <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="origin-internal_log." suffix=".txt"
          timestamp="true"/>
      </Host>

      <Host name="registry.auth.nsdl.org">
        <Context docBase="/nsdl/webapp.registry.delete/login/webApp"
path="/login" reloadable="true" />

        <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="registry_log." suffix=".txt"
          timestamp="true"/>
      </Host>

      <Logger className="org.apache.catalina.logger.FileLogger"
        prefix="apache_log." suffix=".txt"
        timestamp="true"/>

    </Engine>
  </Service>
</Server>


and this is the catalina.out output:

Starting service Tomcat-Apache
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening directory server
connection:  javax.naming.CommunicationException: cilantro.cc.
columbia.edu:9050 [Root exception is java.net.ConnectException: Connection
refused]
LifecycleException:  Exception opening directory server connection:
javax.naming.CommunicationException: cilantro.cc.columbia.edu:905
0 [Root exception is java.net.ConnectException: Connection refused]
        at org.apache.catalina.realm.JNDIRealm.start(JNDIRealm.java:834)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
----- Root Cause -----
javax.naming.CommunicationException: cilantro.cc.columbia.edu:9050.  Root
exception is java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
        at java.net.Socket.connect(Socket.java:425)
        at java.net.Socket.connect(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:290)
        at java.net.Socket.<init>(Socket.java:118)
        at com.sun.jndi.ldap.Connection.createSocket(Connection.java:342)
        at com.sun.jndi.ldap.Connection.<init>(Connection.java:177)
        at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:112)
        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2504)
        at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:263)
        at
com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:76)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
        at javax.naming.InitialContext.init(InitialContext.java:219)
        at javax.naming.InitialContext.<init>(InitialContext.java:195)
        at
javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:80)
        at org.apache.catalina.realm.JNDIRealm.open(JNDIRealm.java:799)
        at org.apache.catalina.realm.JNDIRealm.start(JNDIRealm.java:832)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message