Problem
OrientGraph Cannot create a connection to remote server localhost:2424
but OrientDB can.
Running Apache-TinkerPop-3 Gremlin commands through the OrientDB API,
Either for Java or Groovy.
Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [locahost:2424]
Reproduction Steps
- Installed Docker
- Downloaded a OrientDB Docker Image
- Started the OrientDB Container
- Created a OrientDB Database "demodb"
- Verified Setup / Running
- Created a OrientGraph
OrientGraph graph = OrientGraph.open("remote:locahost:2424/demodb","root","rootpwd");
- Ran the Program
import com.orientechnologies.orient.core.db.ODatabaseSession;
import com.orientechnologies.orient.core.db.OrientDB;
import com.orientechnologies.orient.core.db.OrientDBConfig;
import org.apache.tinkerpop.gremlin.orientdb.OrientGraph;
public class Main {
public static void main(String[] args) {
OrientDB orient = new OrientDB("remote:localhost:2424", OrientDBConfig.defaultConfig());
ODatabaseSession db = orient.open("demodb", "root", "rootpwd");
db.close();
orient.close();
OrientGraph graph = OrientGraph.open("remote:locahost:2424/demodb","root","rootpwd");
graph.close();
}
}
Tried
- Switching with default username/password: admin/admin
- Changing port:
2424
to2480
instead - Removing the database
localhost:2424/demodb
tolocalhost:2424
- Checking OrientDB Gremlin Maven package
- Checking the OrientDB's OrientGraph formatting
Results
INFO: - shutdown storage: demodb...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database 'demodb'
at com.orientechnologies.orient.core.db.OrientDBRemote.open(OrientDBRemote.java:134)
at com.orientechnologies.orient.core.db.OrientDB.open(OrientDB.java:226)
at com.orientechnologies.orient.core.db.OrientDB.open(OrientDB.java:212)
at org.apache.tinkerpop.gremlin.orientdb.OrientGraphFactory.getDatabase(OrientGraphFactory.java:187)
at org.apache.tinkerpop.gremlin.orientdb.OrientGraph.<init>(OrientGraph.java:167)
at org.apache.tinkerpop.gremlin.orientdb.OrientGraph.open(OrientGraph.java:133)
at org.apache.tinkerpop.gremlin.orientdb.OrientGraph.open(OrientGraph.java:124)
at Main.main(Main.java:15)
Caused by: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [locahost:2424]
DB name="demodb"
at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1911)
at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1755)
at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:618)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentRemote.internalOpen(ODatabaseDocumentRemote.java:247)
at com.orientechnologies.orient.core.db.OrientDBRemote.open(OrientDBRemote.java:131)
... 7 more
Process finished with exit code 1
Expected
One of these to be what I was missing or misunderstood from the setup and documents.
Actual
None of these changed the output Exception error.