JBoss hangs on startup in JNDI lookup

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP)

Issue

  • While starting the first node in the cluster, JBoss starts to log and seems to hang in the middle of startup.
  • A series of thread dumps shows the "main" thread stuck doing a JNDI lookup:
    "main" prio=10 tid=0x00002aabac095800 nid=0x2836 runnable [0x0000000040f67000]
       java.lang.Thread.State: RUNNABLE
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
         - locked <0x00002aaac7468be0> (a java.io.BufferedInputStream)
         at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2265)
         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2278)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
         at java.io.ObjectInputStream. (ObjectInputStream.java:279)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:255)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
    

Resolution

Upgrade or downgrade the servers involved in the JNDI lookup to the same version or compatible versions.

Root Cause

The JNDI versions of the servers involved in the JNDI lookup are not compatible.

Diagnostic Steps


This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.