orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

db creation fails on Windows with clustering

Open odbuser2 opened this issue 12 years ago • 7 comments

OrientDB 1.7.7-SNAPSHOT (uses hazelcast 3.2.2)
OS : Windows (8.1 and 2008 Server fail), osx (works), solaris 10 (works)

I'm using OrientDB embedded. The hazelcast configuration does not include any remote nodes besides itself. The app creates the database on startup and it's working under OSX and Solaris 10 but it fails on Windows 8.1 and 2008 Server when trying to "create class V".

Another user reported that it is also failing on Linux. https://groups.google.com/forum/#!topic/orient-database/vAREt3Vdn08

Here's the stacktrace:

[MYHOST] Installing distributed storage on database 'db'
[MYHOST] Publishing online status for database MYHOST.db...
[MYHOST] Database MYHOST.db is online, waking up listeners on local node...
[MYHOST] received updated status MYHOST.db=ONLINE
[MYHOST] No nodes configured for partition 'db.[]' request: id=-1 from=MYHOST task=command_sql(create class V)
ODistributedStorage@74   |Cannot route COMMAND operation to the distributed node
com.orientechnologies.orient.server.distributed.ODistributedException: No nodes configured for partition 'db.[]' request: id=-1 from=MYHOST task=command_sql(create class V) userName=admin
        at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.sendRequest(OHazelcastPlugin.java:367) ~[bundleFile:1.7.6]
        at com.orientechnologies.orient.server.distributed.ODistributedStorage.command(ODistributedStorage.java:185) ~[bundleFile:1.7.6]
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59) [bundleFile:1.7.6]
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClass(OSchemaShared.java:306) [bundleFile:1.7.6]
        at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClass(OSchemaShared.java:160) [bundleFile:1.7.6]
        at com.orientechnologies.orient.core.metadata.schema.OSchemaProxy.createClass(OSchemaProxy.java:62) [bundleFile:1.7.6]
        at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.checkForGraphSchema(OrientBaseGraph.java:1571) [bundleFile:1.7.6]
        at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.openOrCreate(OrientBaseGraph.java:1747) [bundleFile:1.7.6]
        at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>(OrientBaseGraph.java:131) [bundleFile:1.7.6]
        at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>(OrientBaseGraph.java:197) [bundleFile:1.7.6]
        at com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx.<init>(OrientGraphNoTx.java:44) [bundleFile:1.7.6]

odbuser2 avatar Jul 21 '14 21:07 odbuser2

I'd like to +1 this defect. I have a test app that demonstrates this defect

robgratz avatar Jul 23 '14 15:07 robgratz

Can you add the test app here? I've found that that accelerates the a fix for the problem. I haven't had a chance to create a test.

odbuser2 avatar Jul 24 '14 01:07 odbuser2

Here is the test and referenced config files This is being run on Windows.

package test;

import com.orientechnologies.common.io.OFileUtils; import com.orientechnologies.orient.core.config.OGlobalConfiguration; import com.orientechnologies.orient.core.metadata.schema.OType; import com.orientechnologies.orient.graph.gremlin.OGremlinHelper; import com.orientechnologies.orient.server.OServer; import com.tinkerpop.blueprints.impls.orient.OrientGraph; import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory; import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx; import com.tinkerpop.blueprints.impls.orient.OrientVertex; import com.tinkerpop.blueprints.impls.orient.OrientVertexType;

import java.io.File; import java.io.FileInputStream; import java.util.Date; import java.util.UUID;

public class OrientGraphTest { public static void main(String[] args) throws Exception { create();

OGremlinHelper.global().create();
OrientGraphFactory factory = new OrientGraphFactory(getDatabaseURL()).setupPool(1, 10);

// start in clustered mode
OServer server = new OServer();
server.startup(new FileInputStream("src/test/resources/orientdb-dserver-config-0.xml"));
server.activate();
OrientGraph graph = null;

try
{
  graph = factory.getTx();
  String username = "test_user";

  OrientVertex userV = graph.addVertex("class:User", "name", username);

  // First Vertex
  String ID = UUID.randomUUID().toString();
  OrientVertex logV = graph.addVertex("class:AuditLog", "log_id", ID, "timestamp", new Date()); 
  graph.addEdge(null, userV, logV, "log user");

  // Second Vertex
  ID = UUID.randomUUID().toString();
  logV = graph.addVertex("class:AuditLog", "log_id", ID, "timestamp", new Date()); 
  graph.addEdge(null, userV, logV, "log user");

  // Third Vertex
  ID = UUID.randomUUID().toString();
  logV = graph.addVertex("class:AuditLog", "log_id", ID, "timestamp", new Date()); 
  graph.addEdge(null, userV, logV, "log user");

  graph.commit();

}
finally
{
  if (graph != null)
  {
    graph.shutdown();
  }
  server.shutdown();
}

} private static String getDatabaseURL() { String ORIENTDB_HOME = new File("servers").getAbsolutePath().replace('', '/'); System.setProperty("ORIENTDB_HOME", ORIENTDB_HOME); String databaseUrl = "plocal:" + ORIENTDB_HOME + "/databases/platform"; return databaseUrl; } private static void create() throws Exception { OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(false); OFileUtils.deleteRecursively(new File("servers"));

String databaseUrl = getDatabaseURL();

System.out.println("Create database: " + databaseUrl);

OrientGraphNoTx graph = new OrientGraphNoTx(getDatabaseURL());

try
{
  OrientVertexType userVertexType = graph.createVertexType("LogUser");
  userVertexType.createProperty("name", OType.STRING);

  OrientVertexType auditVertexType = graph.createVertexType("AuditLog");
  auditVertexType.createProperty("log_id", OType.STRING);
  auditVertexType.createProperty("timestamp", OType.DATETIME);
  auditVertexType.createProperty("tags", OType.EMBEDDEDSET);
  auditVertexType.createProperty("additional", OType.EMBEDDEDMAP);
}
finally
{
  graph.shutdown();
}

}

}

default-distributed-db-config.json

{ "autoDeploy": true, "hotAlignment": false, "offlineMsgQueueSize" : 0, "readQuorum": 1, "writeQuorum": 2, "failureAvailableNodesLessQuorum": false, "readYourWrites": true, "clusters": { "internal": { }, "index": { }, "*": { "servers" : [ "<NEW_NODE>" ] } }

}

orientdb-dserver-config-0.xml

    <!-- LEVEL1 AND 2 CACHE: enable/disable and set the size as number of entries -->
    <entry name="cache.level1.enabled" value="false" />
    <entry name="cache.level1.size" value="1000" />
    <entry name="cache.level2.enabled" value="true" />
    <entry name="cache.level2.size" value="1000" />

    <!-- PROFILER: configures the profiler as <seconds-for-snapshot>,<archive-snapshot-size>,<summary-size> -->
    <entry name="profiler.enabled" value="true" />
    <!-- <entry name="profiler.config" value="30,10,10" /> -->

    <!-- LOG: enable/Disable logging. Levels are: finer, fine, finest, info, 
        warning -->
    <entry name="log.console.level" value="info" />
    <entry name="log.file.level" value="fine" />
</properties>

hazelcast-0.xml

orientdb orientdb true true 2435 224.2.2.3 2434 127.0.0.1:2435 127.0.0.1:2436 127.0.0.1:2437 127.0.0.1:2438 32

robgratz avatar Jul 24 '14 11:07 robgratz

Have you tried with 1.7.8?

lvca avatar Aug 21 '14 17:08 lvca

Running this with 1.7.9-SNAPSHOT does not work.

robgratz avatar Aug 25 '14 17:08 robgratz

@robgraz Could you try it against mastercluster branch and give me the exact logs?

lvca avatar Aug 26 '14 07:08 lvca

Old issue, closing. In case please reopen it.

lvca avatar Dec 16 '15 15:12 lvca