org.jboss.web.tomcat.service.deployers.JBossContextConfig.getAuthenticatorsFromJndi -> Failed to connect to server localhost/127.0.0.1:1099 in JBoss EAP 5

Solution Unverified - Updated -

Issue

  • I'm trying to run JBoss with an offset of 5 so the HTTP port is 8085 and the JNDI ports are 1103 and 1104. I modified the bindings-jboss-beans.xml file as:
   <bean name="Ports01Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
      <constructor>
         <!--  The name of the set -->
         <parameter>ports-01</parameter>
         <!-- Default host name -->
         <parameter>${jboss.bind.address}</parameter>
         <!-- The port offset -->
         <parameter>5</parameter>
         <!-- Set of bindings to which the "offset by X" approach can't be applied -->
         <parameter><null/></parameter>
      </constructor>
   </bean>

I start it with:

./run.sh -c default -Djboss.service.binding.set=ports-01

I see it listening on 1103 and 1104 with a netstat command. I get this error in the logs however:

2013-08-15 00:36:52,972 DEBUG [org.jnp.interfaces.TimedSocketFactory] (main) createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
2013-08-15 00:36:52,972 DEBUG [org.jnp.interfaces.NamingContext] (main) Failed to connect to localhost:1099
javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:359)
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:284)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1798)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:717)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at org.jboss.web.tomcat.service.deployers.JBossContextConfig.getAuthenticatorsFromJndi(JBossContextConfig.java:485)
        at org.jboss.web.tomcat.service.deployers.JBossContextConfig.getAuthenticators(JBossContextConfig.java:457)
        at org.jboss.web.tomcat.service.deployers.JBossContextConfig.<init>(JBossContextConfig.java:115)
        ...

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.