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

Ask Your Question

GigaSpaces client trying to connect to local machine

We have an application that connects to a space and reads/writes POJOs. The application runs on two machines and The space is deployed on two other machines in 2 partitions with 1 backup per partition. Intermittently on both .198 and .199 we see this exception in the application logs when trying to write to the space:

Caused by: java.rmi.ConnectException: Connect Failed to [NIO://[108304]/3465688618557825_1_8961839924457121451_details[class com.gigaspaces.lrmi.classloading.DefaultClassProvider]]; nested exception is: java.io.IOException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused at com.gigaspaces.lrmi.nio.CPeer.connectAsync(CPeer.java:244) at com.gigaspaces.lrmi.nio.CPeer.connect(CPeer.java:184) at com.gigaspaces.lrmi.ConnectionPool.getConnection(ConnectionPool.java:111) at com.gigaspaces.lrmi.ConnPoolInvocationHandler.invoke(ConnPoolInvocationHandler.java:53) at com.gigaspaces.lrmi.MethodCachedInvocationHandler.invoke(MethodCachedInvocationHandler.java:71) at com.gigaspaces.lrmi.DynamicSmartStub.invokeRemote(DynamicSmartStub.java:424) at com.gigaspaces.lrmi.DynamicSmartStub.invoke(DynamicSmartStub.java:405) at com.gigaspaces.reflect.$GSProxy2.getClassDefinition(Unknown Source) at com.gigaspaces.lrmi.classloading.LRMIClassLoader.findClass(LRMIClassLoader.java:80) ... 50 more Caused by: java.io.IOException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused at com.gigaspaces.lrmi.nio.CPeer.createAsyncChannel(CPeer.java:275) at com.gigaspaces.lrmi.nio.CPeer.connectAsync(CPeer.java:216) ... 58 more Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused at com.gigaspaces.async.SettableFuture.getResult(SettableFuture.java:43) at com.gigaspaces.async.internal.AbstractFuture.get(AbstractFuture.java:64) at com.gigaspaces.lrmi.nio.CPeer.createAsyncChannel(CPeer.java:269) ... 59 more Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716) at com.gigaspaces.lrmi.nio.selector.handler.client.Conversation.finishConnection(Conversation.java:105) at com.gigaspaces.lrmi.nio.selector.handler.client.Conversation.handleKey(Conversation.java:65) at com.gigaspaces.lrmi.nio.selector.handler.client.ClientConversationRunner.doSelect(ClientConversationRunner.java:60) at com.gigaspaces.lrmi.nio.selector.handler.client.ClientConversationRunner.run(ClientConversationRunner.java:42) ... 1 more

The address that the application is trying to connect to is .198 regardless of which machine it's running on. We don't know why it's trying to connect to this address so we are having a hard time troubleshooting. Any assistance would be greatly appreciated.

asked 2016-09-27 12:27:39 -0500

Matt Masuda gravatar image
edit retag flag offensive close merge delete


What version are you using?

jb gravatar image jb  ( 2016-09-30 11:22:49 -0500 )edit

We are using 10.1.1.

Matt Masuda gravatar image Matt Masuda  ( 2016-09-30 14:24:55 -0500 )edit

Please attach the entire log

jb gravatar image jb  ( 2016-10-02 16:30:42 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted


We can recommend a next step, but if they're not successful you will need to open a support case. The most likely reason that you would get a connection exception like this is the presence of more than one network adapter, or a problem with hostname resolution. if you're using IP addresses then host names shouldn't be a problem.

If you have more than one NIC you will need to set NIC_ADDR; please see our documentation:


Also it may be best if you set java.rmi.server.hostname as noted in the link above.

If these steps fail to resolve this problem please open a support case.



answered 2016-10-03 12:37:31 -0500

jb gravatar image
edit flag offensive delete link more

It looks like we found the solution to this - we needed to include the data classes we're using in the PU jar. Since we made that change we haven't seen this error happen again.

answered 2016-10-04 11:55:26 -0500

Matt Masuda gravatar image
edit flag offensive delete link more

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: 2016-09-27 12:27:39 -0500

Seen: 596 times

Last updated: Oct 04 '16