This was fixed yesterday https://github.com/orientechnologies/orientdb/issues/4810 Will be released with the next hotfix
пятница, 4 сентября 2015 г., 1:49:47 UTC+6 пользователь John Firman написал: > > Orient Community 2.1.1 > > My application utilizes OrientDB for several important features, but if > the database is not available for some reason, the portions of the > application that don't utilize the graph database should continue to > function. The problem is that when a connection is attempted to the remote > database, the thread that is performing the connection attempt is stuck > trying to connect over and over again (every 15 seconds) without throwing > an exception and giving up. Here is the stack trace that happens every time: > > Sep 03, 2015 12:26:40 PM com.orientechnologies.common.log.OLogManager log > > SEVERE: Cannot open database with url xxx.xxx.xxx.xxx:2424/mygraphdb > > com.orientechnologies.common.io.OIOException: Cannot open a connection to > remote server: xxx.xxx.xxx.xxx:2424/mygraphdb > > at > com.orientechnologies.orient.client.remote.OStorageRemote.getAvailableNetwork(OStorageRemote.java:2114) > > at > com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1841) > > at > com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:222) > > at > com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:89) > > at > com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:249) > > at > com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getDatabase(OrientGraphFactory.java:132) > > at > com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getDatabase(OrientGraphFactory.java:111) > > at > com.qualpay.db.GraphConnectionPool.createVertexClassAndProperties(GraphConnectionPool.java:94) > > at > com.qualpay.db.GraphConnectionPool.createGraphSchema(GraphConnectionPool.java:185) > > at com.qualpay.db.GraphConnectionPool.init(GraphConnectionPool.java:58) > > at > com.qualpay.db.GraphConnectionPool.getFactory(GraphConnectionPool.java:213) > > at > com.qualpay.db.GraphConnectionPool.getConnection(GraphConnectionPool.java:246) > > at > com.qualpay.models.MerchantModelTest.testCreateMerchant(MerchantModelTest.java:133) > > 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:483) > > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) > > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) > > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) > > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) > > at > org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) > > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) > > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) > > Caused by: com.orientechnologies.common.io.OIOException: Error on > connecting to 54.187.126.131:2424/qualpay > > at > com.orientechnologies.orient.client.remote.ORemoteConnectionManager.createNetworkConnection(ORemoteConnectionManager.java:246) > > at > com.orientechnologies.orient.client.remote.ORemoteConnectionManager$1.createNewResource(ORemoteConnectionManager.java:80) > > at > com.orientechnologies.orient.client.remote.ORemoteConnectionManager$1.createNewResource(ORemoteConnectionManager.java:77) > > at > com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:94) > > at > com.orientechnologies.orient.client.remote.ORemoteConnectionManager.acquire(ORemoteConnectionManager.java:101) > > at > com.orientechnologies.orient.client.remote.OStorageRemote.getAvailableNetwork(OStorageRemote.java:2103) > > ... 37 more > > Caused by: java.io.IOException: Cannot connect to host 54.187.126.131:2424 > > at > com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.<init>(OChannelBinaryAsynchClient.java:87) > > at > com.orientechnologies.orient.client.remote.ORemoteConnectionManager.createNetworkConnection(ORemoteConnectionManager.java:233) > > ... 42 more > > Caused by: java.net.SocketTimeoutException: connect timed out > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) > > at > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) > > at > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > > at java.net.Socket.connect(Socket.java:589) > > at > com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.<init>(OChannelBinaryAsynchClient.java:83) > > ... 43 more > > > The call that starts this infinite loop within my application is: > > > OrientGraphFactory factory = new OrientGraphFactory(dbURI, dbUser, > dbPassword).setupPool(PoolMin, PoolMax); > > > Is there any way I can use Orient if/when it is available and just skip > past the connection attempt if it is not available? > > > -John Firman > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
