OrientDB-3.1 not able to connect remote server address

691 Views Asked by At

I am using OrientDB-3.1.2. I am able to connect OrientDB from browser, but from the code it is not able to connect with db. This is my code snippet

private static OrientGraphFactory gFactory;
private OrientGraph graphDB;
gFactory = new OrientGraphFactory("remote:localhost:2480/<db-name>").setupPool(0, 40);
this.graphDB = gFactory.getTx();

So this is throwing me an exception as-

ERROR Message:{Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [127.0.0.1:2480]
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ DB name="<some-db-name>"
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1906)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1750)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:570)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.internalOpen(ODatabaseDocumentRemote.java:235)
} Module:{} Summary:{}
2020-09-09 17:53:31,293 ERROR Message:{ at com.orientechnologies.orient.core.db.OrientDBRemote.open(OrientDBRemote.java:110)
} Module:{} Summary:{}
2020-09-09 17:53:31,294 ERROR Message:{ ... 66 more

Can someone suggest me, where I am doing wrong??

1

There are 1 best solutions below

1
On

You are pointing to 2480, that is the HTTP port, where you find the Studio.

The connection should be addressed to 2424, that is the binary protocol port (if it's busy, another one is assigned, but you can see it in the server logs anyway)