• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Nio server Socket Listener?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..

we have an Application in that we are using NIoserver for Incoming Requests from then i am listening the remote JBOSS JMS-Topic.its working fine
up to now.but it not working now.one thing we done is we changed the systems.
here my Question is what are the Ports that i should have permission for Lookup.
when i am doing lookup it not giving any error or Exception.simply the program is in Stop (Blocked). i don't know why this will happen??
can you give me any solution about this?

after a long time i got this Exception........

javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: ip-10-250-50-192.ec2.internal; nested exception is:
java.net.ConnectException: Connection timed out]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:724)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.gtm.serverpush.chat.Util.doesDestinationExist(Util.java:65)
at com.gtm.serverpush.chat.TopicConnector.setup(TopicConnector.java:180)
at com.gtm.serverpush.chat.TopicConnector.<init>(TopicConnector.java:75)
at com.gtm.serverpush.chat.ServerTopic.<init>(ServerTopic.java:48)
at com.gtm.serverpush.chat.NioServer.main(NioServer.java:434)
Caused by: java.rmi.ConnectException: Connection refused to host: ip-10-250-50-192.ec2.internal; nested exception is:
java.net.ConnectException: Connection timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
... 7 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)
at java.net.Socket.connect(Socket.java:524)
at java.net.Socket.connect(Socket.java:474)
at java.net.Socket.<init>(Socket.java:371)
at java.net.Socket.<init>(Socket.java:184)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 12 more
in the setup() Method-180--in IF
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.gtm.serverpush.chat.Util.lookupMBeanServerProxy(Util.java:114)
at com.gtm.serverpush.chat.Util.deployQueue(Util.java:83)
at com.gtm.serverpush.chat.TopicConnector.setup(TopicConnector.java:184)
at com.gtm.serverpush.chat.TopicConnector.<init>(TopicConnector.java:75)
at com.gtm.serverpush.chat.ServerTopic.<init>(ServerTopic.java:48)
at com.gtm.serverpush.chat.NioServer.main(NioServer.java:434

thanks
Ramky,
 
Sheriff
Posts: 22818
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You said you only changed the systems. That could mean there is now a firewall between the two systems that wasn't there before. I would check that out first.
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic