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

Ask Your Question
0

Error connecting to gigaspaces

Hello,

I have a java process which is attempting to connect to a space running on a different server. It fails intermittently to connect. The logs show: 2010-08-26 17:21:30,074 INFO [com.gigaspaces.core.common] - Space [XXX] with url [jini:////XXX&groups=gigaspaces-7.1.1-XAPPremium-ga&state=started] started successfully

2010-08-26 17:21:32,121 WARNING [net.jini.discovery.LookupLocatorDiscovery] - Exception occurred during unicast discovery to localhost:10724, retry in 6953ms. Please verify the unicast locators hostname and port are set properly.; Caused by: java.net.ConnectException: Connection refused: connect 2010-08-26 17:21:32,324 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [1/20] 2010-08-26 17:21:33,324 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [2/20] 2010-08-26 17:21:34,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [3/20] 2010-08-26 17:21:35,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [4/20] 2010-08-26 17:21:36,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [5/20] 2010-08-26 17:21:37,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [6/20] 2010-08-26 17:21:38,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [7/20] 2010-08-26 17:21:39,059 WARNING [net.jini.discovery.LookupLocatorDiscovery] - Exception occurred during unicast discovery to localhost:10724, retry in 11938ms. Please verify the unicast locators hostname and port are set properly.; Caused by: java.net.ConnectException: Connection refused: connect 2010-08-26 17:21:39,340 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [8/20] 2010-08-26 17:21:40,356 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [9/20] 2010-08-26 17:21:41,356 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [10/20] 2010-08-26 17:21:42,356 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [11/20] 2010-08-26 17:21:43,356 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [12/20] 2010-08-26 17:21:44,372 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [13/20] 2010-08-26 17:21:45,372 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [14/20] 2010-08-26 17:21:46,372 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [15/20] 2010-08-26 17:21:47,372 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [16/20] 2010-08-26 17:21:48,372 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [17/20] 2010-08-26 17:21:49,388 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [18/20] 2010-08-26 17:21:50,388 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [19/20] 2010-08-26 17:21:51,028 WARNING [net.jini.discovery.LookupLocatorDiscovery] - Exception occurred during unicast discovery to localhost:10724, retry in 21969ms. Please verify the unicast locators hostname and port are set properly.; Caused by: java.net.ConnectException: Connection refused: connect 2010-08-26 17:21:51,388 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [20/20] 2010-08-26 17:21:52,388 INFO [com.gigaspaces.client] - Accessed an inactive backup space XXX, retrying [21/20]

Caused by: org.openspaces.core.space.CannotCreateSpaceException: Failed to create local cache space for space [XXX]; nested exception is com.j_spaces.core.client.FinderException: Failed to find: jini:////userProfileSpace?locators=oz225c2n15.ms.com:10724&groups=gigaspaces-7.1.1-XAPPremium-ga&state=started at org.openspaces.core.space.cache.AbstractLocalCacheSpaceFactoryBean.afterPropertiesSet(AbstractLocalCacheSpaceFactoryBean.java:111) at org.openspaces.core.space.cache.LocalViewSpaceFactoryBean.afterPropertiesSet(LocalViewSpaceFactoryBean.java:55) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398) ... 47 more Caused by: com.j_spaces.core.client.FinderException: Failed to find: jini:////XXX&groups=gigaspaces-7.1.1-XAPPremium-ga&state=started at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:626) at com.j_spaces.core.client.SpaceFinder.find(SpaceFinder.java:416) at org.openspaces.core.space.cache.AbstractLocalCacheSpaceFactoryBean.afterPropertiesSet(AbstractLocalCacheSpaceFactoryBean.java:109) ... 50 more Caused by: java.rmi.RemoteException: Can not locate an available primary space. Total attempts: [20] at com.gigaspaces.cluster.loadbalance.DefaultLoadBalanceExceptionHanlder.handleBackupRetriesExceeded(DefaultLoadBalanceExceptionHanlder.java:126) at com.gigaspaces.cluster.loadbalance.LoadBalanceRequest.prepareForMethodCall(LoadBalanceRequest.java:277) at com.gigaspaces.internal.client.spaceproxy.SpaceProxyImpl.notifyBasic(SpaceProxyImpl.java:1491) at com.j_spaces.core.cluster.NotifyBroadcastPacket.addSequentialResult(NotifyBroadcastPacket.java:93) at com.gigaspaces.internal.client.spaceproxy.BroadcastControl.executeBroadcastOperationSequentially(BroadcastControl.java:120) at com.gigaspaces.internal.client.spaceproxy.BroadcastControl.execute(BroadcastControl.java:201) at com.gigaspaces.internal.client.spaceproxy.SpaceProxyImpl.broadcastMain(SpaceProxyImpl.java:1473) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplNotifyAction.addListener(SpaceProxyImplNotifyAction.java:67) at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.notify(AbstractSpaceProxyActionManager.java:97) at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.notify(AbstractSpaceProxy.java:143) at com.j_spaces.core.client.NotifyDelegator.init(NotifyDelegator.java:176) at com.j_spaces.core.client.NotifyDelegator.<init>(NotifyDelegator.java:135) at com.gigaspaces.internal.client.dcache.localview.LocalViewImpl.init(LocalViewImpl.java:246) at com.gigaspaces.internal.client.dcache.localview.LocalViewImpl.<init>(LocalViewImpl.java:117) at com.j_spaces.core.client.SpaceFinder.initCacheProperties(SpaceFinder.java:698) at com.j_spaces.core.client.SpaceFinder.initSpaceProxy(SpaceFinder.java:683) at com.j_spaces.core.client.SpaceFinder.findService(SpaceFinder.java:616) ... 52 more

If I open the gigaspaces GUI and locate the space using the same locator url it finds the space immediately. I can see both the primary and backup spaces through the GUI.

Any ideas / suggestions?

Thanks

Luke

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

asked 2010-08-26 12:53:30 -0600

lukestephenson 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
0

Luke,
Please make sure you specify LOOKUPLOCATORS for all the machines prior running the gs-agent.
export LOOKUPLOCATORS=IP:Port
./gs-agent.sh

From the client side the URL you should use is:
jini:////XXX?locators:IP:Port

See more here:
http://www.gigaspaces.com/wiki/display/SBP/MovingintoProductionChecklist

Shay

answered 2010-08-26 13:25:37 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

1

I should have mentioned, the XXX was initially in the format spacename?locators=hostname:port. I'm not allowed to represent the company I work for on forums, so removed those details.

lukestephenson gravatar imagelukestephenson ( 2010-08-26 16:00:05 -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

Stats

Asked: 2010-08-26 12:53:30 -0600

Seen: 836 times

Last updated: Aug 26 '10