0

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

  1. Installed Docker
  2. Downloaded a OrientDB Docker Image
  3. Started the OrientDB Container
  4. Created a OrientDB Database "demodb"
  5. Verified Setup / Running
  6. Created a OrientGraph
    OrientGraph graph = OrientGraph.open("remote:locahost:2424/demodb","root","rootpwd");
    
  7. 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

  1. Switching with default username/password: admin/admin
  2. Changing port: 2424 to 2480 instead
  3. Removing the database localhost:2424/demodb to localhost:2424
  4. Checking OrientDB Gremlin Maven package
  5. 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.

Zach
  • 539
  • 1
  • 4
  • 22

0 Answers0