Re: [orientdb] Question about running as embedded server mode

907 views
Skip to first unread message

Luca Garulli

unread,
Jun 23, 2012, 2:39:46 PM6/23/12
to orient-...@googlegroups.com
Hi,
yes, multiple distributed and synchronized embedded servers are possible!

Unfortunately we're working on this and the final API will be published in the next week, hope on June 28th. For that date the documentation will be updated too.

Please have patience ;-)

Lvc@

On 22 June 2012 18:32, Louie Liu <liux...@gmail.com> wrote:
I am new to OrientDB.  We have a use case where we want to run orient database as embedded server on two cluster mode.  Ideally, we  would like to allow two nodes running as master-master cluster.  I would like to know if I can use the distributed configuration on both embedded servers to allow the master-master cluster on two windows boxes.  Also, if I can do so, what version of the software I should use.  It looks like the distributed configuration changed from 1.0.1 to 1.1.0.  However, the 1.1.0 is not released yet.

Thanks for your help.

--

Luca Garulli

unread,
Jul 6, 2012, 1:35:59 PM7/6/12
to orient-...@googlegroups.com
Hi,
the most wanted WiKi page now is the http://code.google.com/p/orient/wiki/Architecture where I'd like to explain the basic working modes:
  • local
  • remote
  • distributed
  • local +  remote
  • local + remote + distributed
Hope to have time to write something tomorrow.

Lvc@

On 6 July 2012 19:27, Danny Thomas <dmth...@gmail.com> wrote:
That's great news - any update on the API? I'd love to test this along with the new distributed architecture next week.

Danny


On Saturday, 23 June 2012 19:39:46 UTC+1, Lvc@  wrote:
> Hi,
> yes, multiple distributed and synchronized embedded servers are possible!</div>
>
> </div>
> Unfortunately we&#39;re working on this and the final API will be published in the next week, hope on June 28th. For that date the documentation will be updated too.</div>
>
>
>
> </div>
> Please have patience ;-)</div>
>
> </div>
> Lvc@
>
>
> On 22 June 2012 18:32, Louie Liu <span dir="ltr">&lt;<a href="mailto:liux...@gmail.com" target="_blank">liux...@gmail.com</a>&gt;</span> wrote:
>
>
> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am new to OrientDB.  We have a use case where we want to run orient database as embedded server on two cluster mode.  Ideally, we  would like to allow two nodes running as master-master cluster.  I would like to know if I can use the distributed configuration on both embedded servers to allow the master-master cluster on two windows boxes.  Also, if I can do so, what version of the software I should use.  It looks like the distributed configuration changed from 1.0.1 to 1.1.0.  However, the 1.1.0 is not released yet.
>
>
>
> </div>
> Thanks for your help.</div><span><font color="#888888">
>
>
> </p>
>
> --
>
>
>
> </font></span></blockquote></div>
> </div>


Louie Liu

unread,
Jul 10, 2012, 1:57:00 PM7/10/12
to orient-...@googlegroups.com
Thanks for your help.

Today, we tested the master-master replication with the embedded server configuration.  We found the following error message:

Jul 10, 2012 10:49:27 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23.
Jul 10, 2012 10:49:27 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 10, 2012 10:49:27 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-18082"]
Jul 10, 2012 10:49:27 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-18011"]
Jul 10, 2012 10:49:27 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1234 ms
Jul 10, 2012 10:49:27 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 10, 2012 10:49:27 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Jul 10, 2012 10:49:27 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive D:\tomcat\apache-tomcat-7.0.27\wam-common-odb\webapps\odb.war
Jul 10, 2012 10:49:37 AM com.orientechnologies.common.log.OLogManager log
INFO: OrientDB Server v1.1.0-SNAPSHOT is starting up...
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
INFO: -> Loaded memory database 'cache'
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
INFO: -> Loaded local database 'srm'
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
INFO: Listening binary connections on 0.0.0.0:2424
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
INFO: Listening http connections on 0.0.0.0:2480
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: [OVariableParser.resolveVariables] Error on resolving property: ORIENTDB_HOME
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> opening database srm...
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED Initializing storage 'srm'
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: [OVariableParser.resolveVariables] Error on resolving property: ORIENTDB_HOME
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> opening database cache...
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED Initializing storage 'cache'
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: [OVariableParser.resolveVariables] Error on resolving property: ORIENTDB_HOME
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> opening database data...
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: [OVariableParser.resolveVariables] Error on resolving property: ORIENTDB_HOME
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> opening database temp...
Jul 10, 2012 10:49:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: [OVariableParser.resolveVariables] Error on resolving property: ORIENTDB_HOME
Jul 10, 2012 10:49:38 AM com.hazelcast.config.FileSystemXmlConfig
INFO: Configuring Hazelcast from 'D:\tomcat\apache-tomcat-7.0.27\wam-common-odb\conf\hazelcast.xml'.
Jul 10, 2012 10:49:39 AM com.hazelcast.system
INFO: [10.199.149.70]:2434 [orientdb] Hazelcast Community Edition 2.1.2 (20120530) starting at Address[10.199.149.70]:2434
Jul 10, 2012 10:49:39 AM com.hazelcast.system
INFO: [10.199.149.70]:2434 [orientdb] Copyright (C) 2008-2012 Hazelcast.com
Jul 10, 2012 10:49:39 AM com.hazelcast.impl.LifecycleServiceImpl
INFO: [10.199.149.70]:2434 [orientdb] Address[10.199.149.70]:2434 is STARTING
Jul 10, 2012 10:49:42 AM com.hazelcast.impl.MulticastJoiner
INFO: [10.199.149.70]:2434 [orientdb] 


Members [1] {
Member [10.199.149.70]:2434 this
}

Jul 10, 2012 10:49:42 AM com.hazelcast.impl.LifecycleServiceImpl
INFO: [10.199.149.70]:2434 [orientdb] Address[10.199.149.70]:2434 is STARTED
Jul 10, 2012 10:49:42 AM com.hazelcast.impl.PartitionManager
INFO: [10.199.149.70]:2434 [orientdb] Initializing cluster partition table first arrangement...
Jul 10, 2012 10:49:42 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> updated node status to 'aligning' for 10.199.149.70:2434
Jul 10, 2012 10:49:42 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED -> detected running nodes []
Jul 10, 2012 10:49:42 AM com.orientechnologies.common.log.OLogManager log
WARNING: DISTRIBUTED <> updated node status to 'online' for 10.199.149.70:2434
Jul 10, 2012 10:49:42 AM com.orientechnologies.common.log.OLogManager log
INFO: OrientDB Server v1.1.0-SNAPSHOT is active.
Jul 10, 2012 10:49:42 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-18082"]
Jul 10, 2012 10:49:42 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-18011"]
Jul 10, 2012 10:49:42 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14772 ms

Basically, we would like to know what the parameter ORIENTDB_HOME should be.

Here is my environment:

1.  Tomcat as the server
2.  OrientDB running as embedded server inside my web application.  Basically the web application will be my DB data manager.
3.  Running on window 2003 server
4.  Application running as tomcat service.

Thanks for your help again.

Louie

Louie Liu

unread,
Jul 10, 2012, 2:41:37 PM7/10/12
to orient-...@googlegroups.com
Also, we did try to bring up the two embedded servers on the same windows server with the following configuration:

0.  Using today's snapshot (July 10, 2012) from maven repo1

1.  Hazelcast.xml on both nodes:

<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-2.1.xsd" xmlns="http://www.hazelcast.com/schema/config"
<group>
<name>orientdb</name>
<password>orientdb</password>
</group>
<network>
<port auto-increment="true">2435</port>
<join>
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54328</multicast-port>
</multicast>
</join>
</network>
<executor-service>
<core-pool-size>1</core-pool-size>
<max-pool-size>16</max-pool-size>
<keep-alive-seconds>60</keep-alive-seconds>
</executor-service>
</hazelcast>

2.  Cluster configuration:

node1:

<!-- CLUSTER PLUGIN, TO TURN ON SET THE 'ENABLED' PARAMETER TO 'true' -->
    <handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
      <parameters>
        <!-- <parameter name="alias" value="europe1" /> -->
        <parameter name="enabled" value="true" />
        <parameter name="default.distributed.db" value="${CATALINA_HOME}/wam-common-odb/conf/default-distributed-db.json" />
        <parameter name="configuration" value="${CATALINA_HOME}/wam-common-odb/conf/hazelcast.xml" />
      </parameters>
    </handler>

node2:

<!-- CLUSTER PLUGIN, TO TURN ON SET THE 'ENABLED' PARAMETER TO 'true' -->
    <handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
      <parameters>
        <!-- <parameter name="alias" value="europe1" /> -->
        <parameter name="enabled" value="true" />
        <parameter name="default.distributed.db" value="${CATALINA_HOME}/wam-common-odb2/conf/default-distributed-db.json" />
        <parameter name="configuration" value="${CATALINA_HOME}/wam-common-odb2/conf/hazelcast.xml" />
      </parameters>
    </handler>

We got the following errors on the second node:

1. From standard out:

Jul 10, 2012 11:31:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.util.concurrent.ExecutionException: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
at com.hazelcast.core.MultiTask.get(MultiTask.java:37)
at com.hazelcast.core.MultiTask.get(MultiTask.java:23)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
at com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:70)
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:38)
at com.hazelcast.impl.ExecutorManager$RequestExecutor.run(ExecutorManager.java:224)
... 5 more
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
... 8 more
Jul 10, 2012 11:31:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.util.concurrent.ExecutionException: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
at com.hazelcast.core.MultiTask.get(MultiTask.java:37)
at com.hazelcast.core.MultiTask.get(MultiTask.java:23)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
at com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:70)
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:38)
at com.hazelcast.impl.ExecutorManager$RequestExecutor.run(ExecutorManager.java:224)
... 5 more
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
... 8 more
Jul 10, 2012 11:31:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.util.concurrent.ExecutionException: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
at com.hazelcast.core.MultiTask.get(MultiTask.java:37)
at com.hazelcast.core.MultiTask.get(MultiTask.java:23)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
at com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:70)
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:38)
at com.hazelcast.impl.ExecutorManager$RequestExecutor.run(ExecutorManager.java:224)
... 5 more
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
... 8 more
Jul 10, 2012 11:31:38 AM com.orientechnologies.common.log.OLogManager log
SEVERE: DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.util.concurrent.ExecutionException: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
at com.hazelcast.core.MultiTask.get(MultiTask.java:37)
at com.hazelcast.core.MultiTask.get(MultiTask.java:23)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
at com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:70)
at com.orientechnologies.orient.server.task.OAlignRequestDistributedTask.call(OAlignRequestDistributedTask.java:38)
at com.hazelcast.impl.ExecutorManager$RequestExecutor.run(ExecutorManager.java:224)
... 5 more
Caused by: java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
... 8 more
Jul 10, 2012 11:31:38 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-18084"]
Jul 10, 2012 11:31:38 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-18013"]
Jul 10, 2012 11:31:38 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17114 ms

2.  From standard err:

2012-07-10 11:31:28:755 INFO OrientDB Server v1.1.0-SNAPSHOT is starting up... [OServer]
2012-07-10 11:31:29:380 INFO -> Loaded memory database 'cache' [OServer]
2012-07-10 11:31:29:739 INFO -> Loaded local database 'srm' [OServer]
2012-07-10 11:31:29:770 INFO Port 0.0.0.0:2424 busy, trying the next available... [OServerNetworkListener]
2012-07-10 11:31:29:786 INFO Listening binary connections on 0.0.0.0:2425 [OServerNetworkListener]
2012-07-10 11:31:29:786 INFO Port 0.0.0.0:2480 busy, trying the next available... [OServerNetworkListener]
2012-07-10 11:31:29:786 INFO Listening http connections on 0.0.0.0:2481 [OServerNetworkListener]
2012-07-10 11:31:29:817 WARN DISTRIBUTED <> opening database srm... [OHazelcastPlugin]
2012-07-10 11:31:29:833 WARN DISTRIBUTED Initializing storage 'srm' [OStorageSynchronizer]
2012-07-10 11:31:29:833 WARN DISTRIBUTED <> opening database cache... [OHazelcastPlugin]
2012-07-10 11:31:29:833 WARN DISTRIBUTED Initializing storage 'cache' [OStorageSynchronizer]
2012-07-10 11:31:29:848 WARN DISTRIBUTED <> opening database data... [OHazelcastPlugin]
2012-07-10 11:31:29:848 WARN DISTRIBUTED <> opening database temp... [OHazelcastPlugin]
2012-07-10 11:31:29:880 INFO Configuring Hazelcast from 'D:\tomcat\apache-tomcat-7.0.27\wam-common-odb2\conf\hazelcast.xml'. [FileSystemXmlConfig]
2012-07-10 11:31:30:333 INFO [10.199.149.33]:2435 [orientdb] Hazelcast Community Edition 2.1.2 (20120530) starting at Address[10.199.149.33]:2435 [system]
2012-07-10 11:31:30:333 INFO [10.199.149.33]:2435 [orientdb] Copyright (C) 2008-2012 Hazelcast.com [system]
2012-07-10 11:31:30:411 INFO [10.199.149.33]:2435 [orientdb] Address[10.199.149.33]:2435 is STARTING [LifecycleServiceImpl]
2012-07-10 11:31:30:599 INFO [10.199.149.33]:2435 [orientdb] 4478 accepted socket connection from /10.199.149.33:2434 [ConnectionManager]
2012-07-10 11:31:36:599 INFO [10.199.149.33]:2435 [orientdb] 

Members [2] {
Member [10.199.149.33]:2434
Member [10.199.149.33]:2435 this
}
 [ClusterManager]
2012-07-10 11:31:38:177 INFO [10.199.149.33]:2435 [orientdb] Address[10.199.149.33]:2435 is STARTED [LifecycleServiceImpl]
2012-07-10 11:31:38:271 WARN DISTRIBUTED <> updated node status to 'aligning' for 10.199.149.33:2435 [OHazelcastPlugin]
2012-07-10 11:31:38:271 WARN DISTRIBUTED -> detected running nodes [10.199.149.33:2434] [OHazelcastPlugin]
2012-07-10 11:31:38:271 WARN DISTRIBUTED --> send align request for database srm [OHazelcastPlugin]
2012-07-10 11:31:38:302 WARN DISTRIBUTED --> send align request for database cache [OHazelcastPlugin]
2012-07-10 11:31:38:302 WARN DISTRIBUTED --> send align request for database data [OHazelcastPlugin]
2012-07-10 11:31:38:302 WARN DISTRIBUTED --> send align request for database temp [OHazelcastPlugin]
2012-07-10 11:31:38:333 INFO OrientDB Server v1.1.0-SNAPSHOT is active. [OServer]DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)DISTRIBUTED -> error on execution of operation in ASYNCH mode against nodes: [Member [10.199.149.33]:2434]
java.lang.AbstractMethodError: com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getLock(Ljava/lang/String;)Ljava/util/concurrent/locks/Lock;
-> com.hazelcast.core.DistributedTask.get(DistributedTask.java:126)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:37)
-> com.hazelcast.core.MultiTask.get(MultiTask.java:23)
-> com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$1.done(OHazelcastPlugin.java:296)
-> com.hazelcast.impl.ExecutorManager$3.run(ExecutorManager.java:355)
-> com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
-> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
-> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
-> java.lang.Thread.run(Thread.java:662)
-> com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
2012-07-10 11:31:38:568 INFO Starting ProtocolHandler ["http-apr-18084"] [Http11AprProtocol]
2012-07-10 11:31:38:599 INFO Starting ProtocolHandler ["ajp-apr-18013"] [AjpAprProtocol]
2012-07-10 11:31:38:615 INFO Server startup in 17114 ms [Catalina]

Please advice.

Thanks

Louie 

Louie Liu

unread,
Jul 11, 2012, 12:37:16 AM7/11/12
to orient-...@googlegroups.com
Never mind, I have fixed the following issue.  It turned out that I was using a wrong jar instead of the distributed jar, I was using the cluster server jar.  Now, cluster is working.  The next steps is to test the updates.

Nice produce, love it.

Thanks

Louie

On Tuesday, July 10, 2012 10:57:00 AM UTC-7, Louie Liu wrote:

Luca Garulli

unread,
Jul 11, 2012, 4:03:19 AM7/11/12
to orient-...@googlegroups.com
Great,
sorry for the delay. We're testing the configuration with 3 nodes stored in:  http://code.google.com/p/orient/source/browse/#svn%2Ftrunk%2Fdistributed%2Fsrc%2Ftest%2Fresources 

Assigning a single port to each server.

Apologize for the lack of configuration, I update it in the next days.

Lvc@

Louie Liu

unread,
Jul 12, 2012, 12:52:22 AM7/12/12
to orient-...@googlegroups.com
Hi, Luca:

Thanks for your help.

I have run into issue with the embedded server, basically I can not connect to the database using remote mode.  Here is the setup:

1.  Embedded sever with distributed configuration running as single node server cluster.
2.  Using the remote mode try to connect to the database from another process within the same JVM.

Using the latest build 1.1-SNAPSHOT up to July 10, 2012.  

Here is the exception I got when I try to connect to the database:

Jul 11, 2012 9:40:39 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 11, 2012 9:42:04 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Resteasy] in context with path [/odb] threw exception
org.jboss.resteasy.spi.UnhandledException: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database
at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
at org.jboss.resteasy.core.AsynchronousDispatcher.invoke(AsynchronousDispatcher.java:243)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:107)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:108)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
at com.orientechnologies.orient.object.db.OObjectDatabaseTx.open(OObjectDatabaseTx.java:95)
at com.orientechnologies.orient.object.db.OObjectDatabaseTxPooled.<init>(OObjectDatabaseTxPooled.java:41)
at com.orientechnologies.orient.object.db.OObjectDatabasePool.createResource(OObjectDatabasePool.java:38)
at com.orientechnologies.orient.object.db.OObjectDatabasePool.createResource(OObjectDatabasePool.java:20)
at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:67)
at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.createNewResource(ODatabasePoolBase.java:56)
at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:66)
at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:64)
at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:52)
at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:114)
at com.westernasset.odb.database.ODatabase.initDatabase(ODatabase.java:34)
at com.westernasset.odb.service.OdbLoadService.initDatabase(OdbLoadService.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
... 23 more
Caused by: java.lang.ClassCastException: com.orientechnologies.orient.client.remote.OStorageRemoteThread cannot be cast to com.orientechnologies.orient.core.storage.OStorageEmbedded
at com.orientechnologies.orient.server.distributed.ODistributedAbstractPlugin.onOpen(ODistributedAbstractPlugin.java:122)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:94)
... 48 more

Please help.

Thanks again.

Louie

Luca Garulli

unread,
Jul 12, 2012, 5:05:40 AM7/12/12
to orient-...@googlegroups.com
Hi,
are you trying to connect locally using the "remote" protocol, right?

Probably the Storage factory makes confusion with them. Can you use the local protocol by the same JVM? Even because in this way you avoid all the network overhead.

Lvc@

Louie Liu

unread,
Jul 12, 2012, 12:11:03 PM7/12/12
to orient-...@googlegroups.com
Yes, after I changed the to the local protocol.  It works now.

Thanks for your help.

Louie

Louie Liu

unread,
Jul 12, 2012, 7:16:17 PM7/12/12
to orient-...@googlegroups.com
Hi, Luca:

Again, I run into some issue with releasing the database back to the connection pool

Here is my setup:

1.  Using OrientDB cluster 1.1.0-SNAPSHOT.
2.  Embedded the database with my web application running on tomcat.
3.  Here is the database configuration:

 <storages>
    <storage name="temp" path="memory:temp" userName="admin" userPassword="admin" loaded-at-startup="true" />
    <storage name="srm" path="local:${CATALINA_HOME}/databases" userName="admin" userPassword="admin" loaded-at-startup="true" />
  </storages>

4.  Using the local engine to access the database :
        
       String localDatabaseUrl ="local:${CATALINA_HOME}/wam-common-odb/databases";
       String  localUsername = "admin";
       String  localPassword  = "admin";

        final OObjectDatabaseTx db = OObjectDatabasePool.global().acquire(localDatabaseUrl, localUsername, localPassword);  
        try {
            final OSchema schema = db.getMetadata().getSchema();
            //setup the database schema
            schema.save();
        } finally {
            db.close();
        }

5.  Get the following exception:

Jul 12, 2012 4:04:11 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 12, 2012 4:04:40 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Resteasy] in context with path [/odb] threw exception
org.jboss.resteasy.spi.UnhandledException: com.orientechnologies.common.concur.lock.OLockException: Cannot release a database URL not acquired before. URL: databases
Caused by: com.orientechnologies.common.concur.lock.OLockException: Cannot release a database URL not acquired before. URL: databases
at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.release(ODatabasePoolAbstract.java:78)
at com.orientechnologies.orient.core.db.ODatabasePoolBase.release(ODatabasePoolBase.java:141)
at com.orientechnologies.orient.object.db.OObjectDatabaseTxPooled.close(OObjectDatabaseTxPooled.java:88)
at com.westernasset.odb.database.ODatabase.initDatabase(ODatabase.java:126)
at com.westernasset.odb.service.OdbLoadService.initDatabase(OdbLoadService.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
... 23 more

Also, if I use the memory storage with the same operation.  There is NO exception and it works.

Please help.

Thanks

Louie

Louie Liu

unread,
Jul 13, 2012, 3:35:50 PM7/13/12
to orient-...@googlegroups.com
By changing the way to get database from database pool object to create the new database instance, it works.

 final OObjectDatabaseTx db = OObjectDatabasePool.global().acquire(localDatabaseUrl, localUsername, localPassword);   (problem)

 final OObjectDatabaseTx db = new OObjectDatabaseTx(localDatabaseUrl).open(localUsername, localPassword); (works)

It looks like the OObjectDatabasePool has bug, or the way I used it is not right.

Please advice.

Also, I would like to know if  creating the new database instance is expensive.  If so, what is your suggestion: database pool approach or save it to the thread local.  Please let us know.

Thanks a lot.

Louie

Louie Liu

unread,
Jul 17, 2012, 2:21:47 PM7/17/12
to orient-...@googlegroups.com
Again, I tested the replication cluster using the following setup:

1.  Embedded server 1.1.0-SNAPSHOT (as of JULY 16, 2012 build).
2.  Using the windows 2003 server
3.  Using the tcp-ip configuration instead of the multicast
4.  Two nodes cluster, the cluster come up successful.
5.  Populate the schema against one node using the java api, I got the following errors:

Jul 17, 2012 11:08:41 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 17, 2012 11:09:55 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Resteasy] in context with path [/odb] threw exception
org.jboss.resteasy.spi.UnhandledException: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record #1:-1
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record #1:-1
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.java:258)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:668)
at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:72)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:221)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:214)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:35)
at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:274)
at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:33)
at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeProviderAbstract.save(OMVRBTreeProviderAbstract.java:160)
at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeProviderAbstract.save(OMVRBTreeProviderAbstract.java:165)
at com.orientechnologies.orient.core.type.tree.OMVRBTreePersistent.saveTreeNode(OMVRBTreePersistent.java:134)
at com.orientechnologies.orient.core.type.tree.OMVRBTreePersistent.commitChanges(OMVRBTreePersistent.java:580)
at com.orientechnologies.orient.core.type.tree.OMVRBTreeDatabaseLazySave.lazySave(OMVRBTreeDatabaseLazySave.java:69)
at com.orientechnologies.orient.core.type.tree.OMVRBTreeDatabaseLazySave.clear(OMVRBTreeDatabaseLazySave.java:65)
at com.orientechnologies.orient.core.type.tree.OMVRBTreePersistent.delete(OMVRBTreePersistent.java:221)
at com.orientechnologies.orient.core.index.OIndexMVRBTreeAbstract.create(OIndexMVRBTreeAbstract.java:149)
at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:132)
at com.orientechnologies.orient.core.index.OIndexOneValue.create(OIndexOneValue.java:47)
at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:76)
at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:68)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:938)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:911)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:907)
at com.westernasset.odb.database.ODatabase.initDatabase(ODatabase.java:49)
at com.westernasset.odb.service.OdbLoadService.initDatabase(OdbLoadService.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
... 23 more
Caused by: java.lang.NullPointerException
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.getMasterNode(OHazelcastPlugin.java:345)
at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.routeOperation2Node(OHazelcastPlugin.java:250)
at com.orientechnologies.orient.server.distributed.ODistributedStorage.createRecord(ODistributedStorage.java:133)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.java:247)
... 56 more

Please help.

Also, here is the configuration:

1.  Hazelcast:

<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-2.1.xsd" xmlns="http://www.hazelcast.com/schema/config"
<group>
<name>orientdb</name>
<password>orientdb</password>
</group>
<network>
<port auto-increment="true">2434</port>
<join>
<multicast enabled="false">
<multicast-group>235.1.1.1</multicast-group>
<multicast-port>2434</multicast-port>
</multicast>
            <tcp-ip enabled="true">
                <hostname>devwarch1</hostname>
                <hostname>devwarch2</hostname>
            </tcp-ip>
</join>
</network>
<executor-service>
<core-pool-size>1</core-pool-size>
<max-pool-size>16</max-pool-size>
<keep-alive-seconds>60</keep-alive-seconds>
</executor-service>
</hazelcast>

2. Default distribute config: 

{
'synchronization' : true,
'clusters' : {
'internal' : { 'synchronization' : false },
'index' : { 'synchronization' : false },
'ODistributedConflict' : { 'synchronization' : false },
'*' : {
'synchronization' : true,
'master' : '$auto',
      'synch-replicas' : 1,
      'asynch-replicas' : "100%",
}
}
}

Please help.

Thanks

Louie

Luca Garulli

unread,
Jul 18, 2012, 4:01:52 AM7/18/12
to orient-...@googlegroups.com
Hi,
have you removed the "distributed-config.json" file under your database? However with latest snapshot it prints a WARN and get $auto as master cfg.

Please, let me know if it's enough.

Lvc@

--
 
 
 

Reply all
Reply to author
Forward
0 new messages