From: Usha <mailto_karkil@HotPOP.com> - 2004-04-01 11:28:39
|
Hi, Yes, the jms server runs on the same And my config file openjms/config/openjms.xml looks as follows for server configuration: <ServerConfiguration host="localhost" embeddedJNDI="true" /> And for DB configuration as: <DatabaseConfiguration>^M <JdbmDatabaseConfiguration name="openjms.db" />^M </DatabaseConfiguration>^M Thanks a lot. ----- Original Message ----- From: "Jens Saade" <js...@pi...> To: <ope...@li...> Sent: Thursday, April 01, 2004 4:06 PM Subject: [openjms-user] embedded JNDI server and multiple network cards - lookup fails > Hi, > > I am currently experiencing a problem using openjms with two network > cards on the server machine: > When using a j2ee client on a remote machine that should receive > messages from the application server where also the openjms server is > running on it fails to set up a topic connection stating it can't > connect to the JNDI server. > This seems to be a simple JNDI lookup problem. The server obviously does > not return the ip configured in the openjms.xml but the ip of the second > network card: > ---snip > <ServerConfiguration host="xxx.xxx.xxx.xxx" embeddedJNDI="true" /> > snip--- > > xxx.xxx.xxx.xxx is not set to loopback device or localhost but to a > concrete ip. > yyy.yyy.yyy.yyy is the secondary card which should not be used. > > The openjms.xsd states in an annotation this would prevent the openjms > server from using the wrong ip if multiple NICs are used. > > This is the part of the code that fails: > ---snip > Hashtable properties = new Hashtable(); > Context jndi = null; > if (useNonDefaultProvider) { > properties.put(Context.INITIAL_CONTEXT_FACTORY, > jmsInitialContextFactory); > // configured to "org.exolab.jms.jndi.InitialContextFactory"); > properties.put(Context.PROVIDER_URL,jmsProviderURL); > // configured to "rmi://xxx.xxx.xxx.xxx:1099/"); > jndi = new InitialContext(properties); > } else > jndi = new InitialContext(); > > // Look up a JMS connection factory > topicConnectionFactory = (TopicConnectionFactory) > jndi.lookup(jmsTopicConnectionFactoryName); > snip --- > > This is the resulting stacktrace: > java.net.ConnectException: Connection timed out: connect > [Root exception is java.rmi.ConnectException: Connection refused to > host: yyy.yyy.yyy.yyy; > nested exception is: > java.net.ConnectException: Connection timed out: connect] > at > org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory.getInitialContext(RmiJn diInitialContextFactory.java:155) > at > org.exolab.jms.jndi.InitialContextFactory.getInitialContext(InitialContextFa ctory.java:109) > at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) > at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) > at javax.naming.InitialContext.init(Unknown Source) > at javax.naming.InitialContext.<init>(Unknown Source) > ... > ... 10 more > Caused by: java.rmi.ConnectException: Connection refused to host: > yyy.yyy.yyy.yyy; nested exception is: > java.net.ConnectException: Connection timed out: connect > at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) > at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) > at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) > at sun.rmi.server.UnicastRef.invoke(Unknown Source) > at > org.apache.avalon.excalibur.naming.rmi.server.RMINamingProviderImpl_Stub.get NameParser(Unknown > Source) > at > org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory.getInitialContext(RmiJn diInitialContextFactory.java:151) > ... 17 more > Caused by: java.net.ConnectException: Connection timed out: connect > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(Unknown Source) > at java.net.PlainSocketImpl.connectToAddress(Unknown Source) > at java.net.PlainSocketImpl.connect(Unknown Source) > at java.net.Socket.connect(Unknown Source) > at java.net.Socket.connect(Unknown Source) > at java.net.Socket.<init>(Unknown Source) > at java.net.Socket.<init>(Unknown Source) > at > sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) > at > sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) > ... 23 more > > I had a look into the issue tracker and found a patch enhancement > attached to it. Will this patch solve my problem? > Since this is not officially added to version 0.7.6 in the cvs I'd like > to gather some feedback first ... > > Do I have any other option (e.g. configuration) apart from applying > changes to the network cards themselves? > > Cheers, > Jens > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > openjms-user mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openjms-user --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004 |