Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Caused by: java.rmi.ConnectException: Connect Failed to [NIO://

I am facing this exception if two servers are started (gs- agent) and trying to deploy the war files into tomcat.

If i start only one gs-agent then I am not getting this exception.

Caused by: java.rmi.ConnectException: Connect Failed to [NIO://[31854]/1181728297176387_1_-2673098358469681821_details[class com.gigaspaces.lrmi.classloading.DefaultClassProvider]]; nested exception is: java.net.ConnectException: Connection refused at com.gigaspaces.lrmi.nio.CPeer.connect(CPeer.java:235) at com.gigaspaces.lrmi.ConnectionPool.getConnection(ConnectionPool.java:116) at com.gigaspaces.lrmi.ConnPoolInvocationHandler.invoke(ConnPoolInvocationHandler.java:45) at com.gigaspaces.lrmi.MethodCachedInvocationHandler.invoke(MethodCachedInvocationHandler.java:71) at com.gigaspaces.lrmi.DynamicSmartStub.invokeRemote(DynamicSmartStub.java:435) at com.gigaspaces.lrmi.DynamicSmartStub.invoke(DynamicSmartStub.java:416) at com.gigaspaces.reflect.$GSProxy2.getClassDefinition(Unknown Source) at com.gigaspaces.lrmi.classloading.LRMIClassLoader.findClass(LRMIClassLoader.java:80) ... 60 more Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:115) at com.gigaspaces.lrmi.nio.CPeer.createChannel(CPeer.java:341) at com.gigaspaces.lrmi.nio.CPeer.connect(CPeer.java:206)

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=4076]{quote}

asked 2013-05-07 08:07:57 -0600

get4gopim gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

On the machines running GSA you should set the NIC_ADDR variable to the machine IP. On the tomcat side you should set the java.rmi.server.hostname system property to the machine IP.

answered 2013-05-07 08:21:00 -0600

shay hassidim gravatar image
edit flag offensive delete link more


I have the NIC_ADDR variable set in setenv.sh file.

But java.rmi.server.hostname property where I need to set in tomcat? is this system property to be set on the envrionment variables ? or somewhere else ?

get4gopim gravatar imageget4gopim ( 2013-05-07 12:24:42 -0600 )edit

Set it as part of the Tomcat JVM system properties settings.

shay hassidim gravatar imageshay hassidim ( 2013-05-07 12:27:08 -0600 )edit

I am setting this property in <tomcat_home>/bin/ folder catalina.sh file as:

export CATALINA_OPTS=-Djava.rmi.server.hostname=

Is this fine?

get4gopim gravatar imageget4gopim ( 2013-05-07 18:12:35 -0600 )edit

We are trying to install the gigaspaces and applications in different machines.
Is the same property (java.rmi.server.hostname) will fix the issue??


Caused by: java.lang.IllegalArgumentException: net.jini.config.ConfigurationException: Failed to find host; caused by:
        java.net.UnknownHostException: abcvm2.localdomain: abcvm2.localdomain: Name or service not known
        at com.j_spaces.core.client.LookupFinder.<clinit>(LookupFinder.java:80)
        ... 71 more
Caused by: net.jini.config.ConfigurationException: Failed to find host; caused b
        java.net.UnknownHostException: abcvm2.localdomain: abcvm2.localdomai
        at com.j_spaces.core.service.ServiceConfigLoader$ConfigurationHolder.<in
        at com.j_spaces.core.service.ServiceConfigLoader.<clinit>(ServiceConfigL
        at com.j_spaces.core.client.LookupFinder.<clinit>(LookupFinder.java:78)
... 71 more

Caused by: java.net.UnknownHostException: abcvm2.localdomain: Name or service
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:125
at java.net.InetAddress.getLocalHost(InetAddress.java:1434)

get4gopim gravatar imageget4gopim ( 2013-05-09 12:23:51 -0600 )edit

java.rmi.server.hostname system property need to be set on the client application side, NIC_ADDR variable for the server side.
Make sure also you have the hosts file updated.

shay hassidim gravatar imageshay hassidim ( 2013-05-09 12:55:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-05-07 08:07:57 -0600

Seen: 3,327 times

Last updated: May 07 '13