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

Ask Your Question

Timeout when using event driven proxy from a remote machine


we are getting an error when trying to call proxy's methods from a remote machine. If we run the client in the same machine as we have Gigaspaces deployed, then everything works fine, but when we run the client in a different machine, then we see that the request reaches the server, it is processed by the server, but the response takes a lot or it doesn't return at all giving as a timeout.

We don't have the service code and the space collocated, and that's why we are using the event driven proxy instead of the executor proxy. Here is the space definition in our space's PU:

<os-core:space id="orderSpace" url="/./${orderSpace.name}" schema="persistent" mirror="true" external-data-source="hibernateDataSource"> <os-core:properties> <props> <prop key="space-config.engine.cache_policy">1</prop> <prop key="space-config.external-data-source.usage">read-only</prop> <prop key="cluster-config.cache-loader.external-data-source">true</prop> <prop key="cluster-config.cache-loader.central-data-source">true</prop> <prop key="cluster-config.mirror-service.url">jini:////${orderMirror.name}</prop> </props> </os-core:properties> </os-core:space>

Then, in the service's PU configuration, we access the space and export the services with the following configuration:

<os-core:distributed-tx-manager id="transactionManager"/> <os-core:space id="orderSpace" url="jini://*/*/${orderSpace.name}"/> <os-core:giga-space id="orderGigaSpace" space="orderSpace" tx-manager="transactionManager"/>

<os-remoting:service-exporter id="serviceExporter"> <os-remoting:service ref="profileService"/>
<os-remoting:service ref="authenticationService"/> <os-remoting:service ref="serviceOrderService"/>
<os-remoting:service ref="productOrderService"/>
<os-remoting:service ref="serviceInstanceService"/>
<os-remoting:service ref="serviceSpecificationService"/>
<os-remoting:service ref="workOrderService"/>
<os-remoting:service ref="usageService"/>
<os-remoting:service ref="orderTraceService"/> <os-remoting:service ref="distributorService"/> </os-remoting:service-exporter>

<os-events:polling-container id="apiEventContainer" giga-space="orderGigaSpace" receive-timeout="${receiveTimeout}" concurrent-consumers="${concurrentConsumers}" max-concurrent-consumers="${maxConcurrentConsumers}"> <os-events:receive-operation-handler> <bean class="org.openspaces.events.polling.receive.SingleTakeReceiveOperationHandler"> <property name="nonBlocking" value="true"/> <property name="nonBlockingFactor" value="${nonBlockingFactor}"/> </bean> </os-events:receive-operation-handler>

<os-events:listener ref="serviceExporter" />


Finally, in the client code that is executed from a remote machine, we have the following:

<os-core:space id="orderSpace" url="jini://*/*/orderSpace?locators="/>

Where is the machine where Gigaspaces is running. We have configured the LOOKUPLOCATORS and NIC_ADDR variables in the server.

We tried using a collocated space with the services and we got the same problem using the event driven proxy, but it worked when using the executor proxy.

We have tried a lot of things but nothing seems to work. Is there something we are doing wrong? We don't see any error in the server, and the exception we get in the client is a RemoteTimeoutException.



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

asked 2011-04-25 15:49:42 -0600

dgaviola gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted


At the client side set the NIC_ADDR if deployed as a PU into a GSC or set the java.rmi.server.hostname system property to have the IP of the client machine.


answered 2011-04-25 16:14:40 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Something I forgot to mentioned is that we can access the space without problems. We can write and read objects as expected. The only problem is when we use the event driven proxy, where we don't get the response back or it takes too long.

answered 2011-04-25 16:17:16 -0600

dgaviola gravatar image
edit flag offensive delete link more


Do you have a firewall between the client and the space? Does it block connections from the space to the client by any chance? Are all the ports from the space to the client are open?

shay hassidim gravatar imageshay hassidim ( 2011-04-25 16:22:00 -0600 )edit

Thanks for your answer.

We don't have any firewall (we are using Ubuntu 10.4 in both, the client and the server) and in order to avoid any network problem we connected the two machines directly.



dgaviola gravatar imagedgaviola ( 2011-04-25 16:34:51 -0600 )edit

Can you have a single "os-remoting:service ref" listed and test?

shay hassidim gravatar imageshay hassidim ( 2011-04-25 16:46:37 -0600 )edit

Hi Shay:

We tried changing that in the configuration, but we got the same problem.



dgaviola gravatar imagedgaviola ( 2011-04-25 17:08:37 -0600 )edit

This must work.
Can you post a simple test case?

shay hassidim gravatar imageshay hassidim ( 2011-04-25 17:13:35 -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: 2011-04-25 15:49:42 -0600

Seen: 137 times

Last updated: Apr 25 '11