javax.naming.NamingException: JNDI lookup failed. Timeout happened when reading response from the r
Hi,
We are using a Solace Client and able to connect to Solace JMS Queue and we started seeing the following Error all of a sudden. We didn't have this Issue for the past few months.
javax.naming.NamingException: JNDI lookup failed - (Client name: 29783/#000d0081 Local port: -1 Remote addr: extacywjhtc5178:55003) - Timeout happened when reading response from the router.
at com.solacesystems.jndi.SolJNDIInitialContextFactory$SolJNDIInitialContextImpl.lookup(SolJNDIInitialContextFactory.java:227)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
This is happening when we try to create jmsConnection at
private void init() throws JMSException, NamingException { jndiContext = new InitialContext( env ); connectionFactory = (ConnectionFactory) jndiContext.lookup( jmsConnectionFactoryName ); jmsConnection = connectionFactory.createConnection( username, password ); **jmsDestination = (Destination) jndiContext.lookup( jmsDestinationName );** jmsConnection.setExceptionListener( this ); jmsConnection.start(); }
Is there a way we can specify/increase the timeout value
Thanks
Sateesh
Answers
-
The timeout can be set either programmatically as part of the initial context properties or at the command line. Please refer to the following documentation
https://docs.solace.com/Solace-JMS-API/JNDI-Connection-Properti.htm#jms_properties_39190069_302316
But the default is 30 seconds which should be plenty of time for a connection. If you are getting a timeout, have you checked network connectivity into the NESG?1