Cannot create a connection to remote server address(es): [127.0.0.1:2424]

1,737 views
Skip to first unread message

Adolfo Rodriguez

unread,
Sep 13, 2012, 2:52:47 PM9/13/12
to orient-...@googlegroups.com
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

unread,
Sep 13, 2012, 4:00:26 PM9/13/12
to orient-...@googlegroups.com
+1

Luca Garulli

unread,
Sep 13, 2012, 6:38:50 PM9/13/12
to orient-...@googlegroups.com
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/

Please can you try:

> svn up
> ant clean test

Lvc@

On 13 September 2012 22:00, Jacques Desodt <jde...@gmail.com> wrote:
+1

--
 
 
 

Adolfo Rodriguez

unread,
Sep 13, 2012, 7:17:26 PM9/13/12
to orient-...@googlegroups.com
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

unread,
Sep 13, 2012, 7:44:09 PM9/13/12
to orient-...@googlegroups.com
sorry problem is still on, but please ignore my previous message

Adolfo Rodriguez

unread,
Sep 13, 2012, 8:08:36 PM9/13/12
to orient-...@googlegroups.com
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

unread,
Sep 14, 2012, 1:56:06 AM9/14/12
to orient-...@googlegroups.com
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

unread,
Sep 14, 2012, 4:18:32 AM9/14/12
to orient-...@googlegroups.com
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

unread,
Sep 18, 2012, 8:58:39 PM9/18/12
to orient-...@googlegroups.com
Fixed in latest snapshot and SVN trunk.

Sorry for such nasty bug,
Lvc@
> --
>
>
>

Jacques Desodt

unread,
Sep 19, 2012, 3:15:42 AM9/19/12
to orient-...@googlegroups.com
Thanks Lvc@ !
OrientDB, always great.
Reply all
Reply to author
Forward
0 new messages