Roland Thomas Lichti [
http://community.jboss.org/people/klenkes] created the discussion
"Re: Failed to connect to server 10.0.1.170:1099"
To view the discussion, visit:
http://community.jboss.org/message/564691#564691
--------------------------------------------------------------
Peter Johnson schrieb:
According to the telnet output, port 1199 is not open. Try entering the command
"netstat -ab", look at the results to see what ports has open. Or, download and
run tcpview from
http://www.sysinternals.com/Utilities/TcpView.html
http://www.sysinternals.com/Utilities/TcpView.html, it's easier to use and runs faster
than netstat.
I have the problem, that the port is open:
klenkes@manitu:/opt/jbossesb-4.9/samples/quickstarts/helloworld$ netstat -tnlAktive
Internetverbindungen (Nur Server)Proto Recv-Q Send-Q Local Address Foreign
Address State
,,,tcp 0 0 10.1.2.133:1099 0.0.0.0:* LISTEN
...
But when trying to send a message the JNDI is not found:
runtest: [echo] Runs Test JMS Sender [java] Exception in thread "main"
javax.naming.CommunicationException: Could not obtain connection to any of these urls:
10.1.2.133 and discovery failed with error: javax.naming.CommunicationException: Network
is unreachable [Root exception is java.io.IOException: Network is unreachable] [Root
exception is javax.naming.CommunicationException: Failed to connect to server
/10.1.2.133:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to
connect to server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is
unreachable]]] [java] at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763) [java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693) [java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686) [java] at
javax.naming.InitialContext.lookup(InitialContext.java:392) [java] at
org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage.setupConnection(SendJMSMessage.java:53)
[java] at
org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage.main(SendJMSMessage.java:82)
[java] Caused by: javax.naming.CommunicationException: Failed to connect to server
/10.1.2.133:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to
connect to server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is
unreachable]] [java] at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335) [java] at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734) [java] ... 5
more [java] Caused by: javax.naming.ServiceUnavailableException: Failed to connect to
server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is
unreachable] [java] at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305) [java] ... 6
more [java] Caused by: java.net.SocketException: Network is unreachable [java]
at java.net.PlainSocketImpl.socketConnect(Native Method) [java] at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) [java] at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) [java] at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) [java] at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) [java] at
java.net.Socket.connect(Socket.java:529) [java] at
org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
[java] at
org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
[java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
[java] ... 6 more
Thats the definition of the initial context (I changed the IP in the esb sample
helloworld):
Properties properties1 = new Properties();
properties1.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties1.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
properties1.put(Context.PROVIDER_URL, "jnp://10.1.2.133:1099");
InitialContext iniCtx = new InitialContext(properties1);
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/564691#564691]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]