Discussion:
Cannot create a connection to remote server address(es): [127.0.0.1:2424]
Adolfo Rodriguez
2012-09-13 18:52:47 UTC
Permalink
Hi, just synchronized my Eclipse workspace to latest SVN code but remote
connection seems not to be working anymore.

Test case is rather than simple

* **OGraphDatabase database =
OGraphDatabasePool.global().acquire("remote:localhost/onto", "admin",
"admin");*
String query = "select from V";
System.out.println(query);
List<ODocument> result = database.query(new
OSQLSynchQuery<ODocument>(query));
System.out.println(result);

and following exception is thrown. Not problem accessing with Studio.

Exception in thread "main"
com.orientechnologies.orient.core.exception.OStorageException: Cannot
create a connection to remote server address(es): [127.0.0.1:2424]
at
com.orientechnologies.orient.client.remote.OStorageRemote.handleException(OStorageRemote.java:1272)
at
com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1395)
at
com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:172)
at
com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:65)
at
com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:88)
at
com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at
com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:108)
at
com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:79)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePooled.<init>(OGraphDatabasePooled.java:40)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePool.createResource(OGraphDatabasePool.java:39)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePool.createResource(OGraphDatabasePool.java:1)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:67)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:1)
at
com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:66)
at
com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:65)
at
com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:53)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:114)
at com.protean.orientdb.test.LucasTest.main(LucasTest.java:18)
Caused by: java.lang.NullPointerException
at
com.orientechnologies.orient.client.remote.OStorageRemote.readDatabaseInformation(OStorageRemote.java:1812)
at
com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1380)
... 17 more

--
Jacques Desodt
2012-09-13 20:00:26 UTC
Permalink
+1

--
Luca Garulli
2012-09-13 22:38:50 UTC
Permalink
Hi,
I've just tried and everything works. Furthermore all the remote tests
pass. Also the public Jetkins says everything is ok:
http://datastorm.com.ua/jenkins/
svn up
ant clean test
+1
--
--
Adolfo Rodriguez
2012-09-13 23:17:26 UTC
Permalink
Do not think 'ant' would affect in my case because I am running straight on
Eclipse.

By adding a e.printStackTrace(); in the empty catch
of OStorageRemote#createNetworkConnection() I get:

java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at
com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryClient.<init>(OChannelBinaryClient.java:45)
at
com.orientechnologies.orient.client.remote.OStorageRemote.createNetworkConnection(OStorageRemote.java:1497)
at
com.orientechnologies.orient.client.remote.OStorageRemote.createConnectionPool(OStorageRemote.java:1778)
at
com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1342)
at
com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:172)
at
com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:65)
at
com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:88)
at
com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at
com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:108)
at
com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:79)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePooled.<init>(OGraphDatabasePooled.java:40)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePool.createResource(OGraphDatabasePool.java:39)
at
com.orientechnologies.orient.core.db.graph.OGraphDatabasePool.createResource(OGraphDatabasePool.java:1)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:67)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:1)
at
com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:66)
at
com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:65)
at
com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:53)
at
com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:114)
at com.protean.orientdb.test.LucasTest.main(LucasTest.java:18)

Looks a problem with the availability of connections in the pool or
something like that.

Adolfo

--
Adolfo Rodriguez
2012-09-13 23:44:09 UTC
Permalink
sorry problem is still on, but please ignore my previous message

--
Adolfo Rodriguez
2012-09-14 00:08:36 UTC
Permalink
Well, it seems to be a problem of data compatibility. I have removed and
rebuilt my whole database and the problem is gone.

I was driven to this conclusion by debugging since first trace is:
* *NullPointerException at
com.orientechnologies.orient.client.remote.OStorageRemote.readDatabaseInformation(OStorageRemote.java:1812)

which is thrown in this line:
* final String clusterName = network.readString().toLowerCase();
*

There is some change with clusters that is not backwards compatible.

With this workaround, for me not longer and issue.

Thanks.

--
Jacques Desodt
2012-09-14 05:56:06 UTC
Permalink
Thanks Adolfo !

I also removed and rebuilt my whole database and the problem is also gone.
But i can't imagine apply this solution on a production server. Any idea ?

--
Adolfo Rodriguez
2012-09-14 08:18:32 UTC
Permalink
Hi Jacques,

not really, when I got a clue I just tried for the fix and worked. But I
still hold the previous database. It would be needed to debug further till
the source error to find the difference. And, with this information, try to
roll it back and map to some of the previous changes of OrientDB team. Not
sure if I will find anything obvious enough to identify it.

But if someone needs this investigation I can try to carry it further.
However, it would be good to know if OrientDB Team realizes of some change
in the storage that can justify a break in backward compatibility.

Adolfo

--
Luca Garulli
2012-09-19 00:58:39 UTC
Permalink
Fixed in latest snapshot and SVN trunk.

Sorry for such nasty bug,
Post by Adolfo Rodriguez
Hi Jacques,
not really, when I got a clue I just tried for the fix and worked. But I
still hold the previous database. It would be needed to debug further till
the source error to find the difference. And, with this information, try to
roll it back and map to some of the previous changes of OrientDB team. Not
sure if I will find anything obvious enough to identify it.
But if someone needs this investigation I can try to carry it further.
However, it would be good to know if OrientDB Team realizes of some change
in the storage that can justify a break in backward compatibility.
Adolfo
--
--
Jacques Desodt
2012-09-19 07:15:42 UTC
Permalink
Thanks Lvc@ !
OrientDB, always great.

--

Loading...