Hi Val,
I have set the join time to 30sec, but still cannot connect to the server.
I have several questions about the network or grid configuration.
1. suppose I have one server. How can I define one client connect to a specific 
port to the server. I notice that in debug mode, TcpDiscoverySpi tries to 
connect to the server that I have defined in the addresses list, but failed. I 
know in client side, I can set localhost and localport for each client node. 
How can I specify the server port that one client can connect directly without 
trying a range of ports. Do I need to set port configurations on server side?
2. I notice that the TcpDsicoverySpi has one java object "addrRslvr" is always 
null, should I create a addrRslvr? And I did not see any specification on the 
creation of addrRslvr. I guess this might be the cause that I cannot connect to 
the server.

BTW,  I have set TcpDiscoverySpi with specific local port range: 49500 ~ 49520 
and TcpCommunicationSpi with local port range 49530 ~ 49550;
TcpDiscoverySpi JoinTimeout set to 30000ms
But I still get exceptions and Here are the error messages:
[09:50:17,115][ERROR][main][169] Failed to start manager: GridManagerAdapter 
[enabled=true, name=o.a.i.i.managers.discovery.GridDiscoveryManager]
class org.apache.ignite.IgniteCheckedException: Failed to start SPI: 
TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000, 
reconCnt=10, maxAckTimeout=600000, forceSrvMode=false, 
clientReconnectDisabled=false]
        at 
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
        at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
        at 
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
        at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
        at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
        at org.apache.ignite.Ignition.start(Ignition.java:322)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.initCache(IgniteMetaUtils.java:1198)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.init(IgniteMetaUtils.java:355)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.<init>(IgniteMetaUtils.java:324)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.getInstance(IgniteMetaUtils.java:153)
        at com.huawei.soa.ignite.test.PMTest.prodQuery(PMTest.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process timed 
out.
        at 
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1512)
        at 
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
        at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[09:50:17,115][ERROR][main][169] Got exception while starting (will rollback 
startup routine).
class org.apache.ignite.IgniteCheckedException: Failed to start manager: 
GridManagerAdapter [enabled=true, 
name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
        at 
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1510)
        at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:917)
        at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1688)
        at 
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1547)
        at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1003)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:534)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:515)
        at org.apache.ignite.Ignition.start(Ignition.java:322)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.initCache(IgniteMetaUtils.java:1198)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.init(IgniteMetaUtils.java:355)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.<init>(IgniteMetaUtils.java:324)
        at 
com.huawei.soa.ignite.util.IgniteMetaUtils.getInstance(IgniteMetaUtils.java:153)
        at com.huawei.soa.ignite.test.PMTest.prodQuery(PMTest.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start SPI: 
TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000, 
reconCnt=10, maxAckTimeout=600000, forceSrvMode=false, 
clientReconnectDisabled=false]
        at 
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
        at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
        at 
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)
        ... 35 more
Caused by: class org.apache.ignite.spi.IgniteSpiException: Join process timed 
out.
        at 
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.tryJoin(ClientImpl.java:1512)
        at 
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1327)
        at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)


-----邮件原件-----
发件人: vkulichenko [mailto:[email protected]] 
发送时间: 2016年7月26日 6:45
收件人: [email protected]
主题: Re: 答复: 答复: 答复: ignite Connection refused exception

Hi Kevin,

The exception itself is actually printed out only in DEBUG mode. It will always 
happen if you provide a range of addresses, but only some of them are 
available. So this is not an issue.

I noticed that it takes around a second to get 'Connection refused' from each 
address, so going through all of them can take some time. Can you try 
increasing the joinTimeout value to, for example, 30 seconds?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/ignite-Connection-refused-exception-tp6412p6523.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to