Hi,
Using version 1.7.5 with hot fixes.
Replication works great via console.
Trying to run some tests using Java API and getting :
*Exception in thread "main"
com.orientechnologies.orient.server.distributed.ODistributedException:
Quorum 2 not reached for request=id=1 from=node1 task=command_sql(create
class MyTestClass5 cluster 17) userName=admin. Servers in timeout/conflict
are: - node2:
com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on
parsing command at position #33: Cluster with id 17 does not existsCommand:
create class MyTestClass5 cluster
17-----------------------------------------^Received: {node1=17,
node2=com.orientechnologies.orient.core.sql.OCommandSQLParsingException:
Error on parsing command at position #33: Cluster with id 17 does not
existsCommand: create class MyTestClass5 cluster
17-----------------------------------------^} at
com.orientechnologies.orient.server.distributed.ODistributedResponseManager.manageConflicts(ODistributedResponseManager.java:490)
at
com.orientechnologies.orient.server.distributed.ODistributedResponseManager.getFinalResponse(ODistributedResponseManager.java:392)
at
com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.waitForResponse(OHazelcastDistributedDatabase.java:440)
at
com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.send2Nodes(OHazelcastDistributedDatabase.java:199)
at
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.sendRequest(OHazelcastPlugin.java:371)
at
com.orientechnologies.orient.server.distributed.ODistributedStorage.command(ODistributedStorage.java:184)
at
com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59)
at
com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1181)
at
com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:340)
at
com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:169)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)*
Bellow are code I used:
protected ODatabaseDocumentTx getDatabase(final String dbUrl) {
return ODatabaseDocumentPool.global().acquire(dbUrl, "admin",
"admin");
}
protected void createDocument( final String dbUrl, final String
className,
final int iProperties) {
final ODatabaseDocumentTx db = getDatabase(dbUrl);
try {
System.out.println( " creating document: class=" + className);
ODocument doc = new ODocument(className);
for (int i = 0; i < iProperties; ++i) {
doc.field("prop" + i, "propValue" + i);
}
doc.save();
} finally {
db.close();
}
}
public static void main(String[] args){
System.out.println("Lets get connection " );
ReplicationTest test = new ReplicationTest();
test.createDocument("remote:localhost:2424/idm", "MyTestClass5",5);
try{
Thread.sleep(3600);
} catch(InterruptedException ie){
}
test.queryClass("remote:localhost:2425/idm", "MyTestClass5");
}
Enter code here...
Thank you.
-galina
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.