Replication failed

#1

Dear support members,

I am trying to set up a replication url in objectdb.conf and have the the following error in the log files:

[ObjectDB 2.3.4] javax.persistence.PersistenceException
Failed to connect to server 127.0.0.1:6136 (Connection refused) (error 522)
at com.objectdb.jpa.EMF.createEntityManager(EMF.java:176)

My objectdb.conf:

<general>
  <temp path="$temp/ObjectDB" threshold="64mb" />
  <network inactivity-timeout="0" />
  <log path="$objectdb/log/" max="8mb" stdout="false" stderr="false" />
  <log-archive path="$objectdb/log/archive/" retain="90" />
  <logger name="*" level="info" />
</general>

<database>
  <size initial="256kb" resize="256kb" page="2kb" />
  <recovery enabled="true" sync="true" path="." max="128mb" />
  <recording enabled="true" sync="false" path="." mode="write" />
  <locking version-check="true" />
  <processing cache="128mb" max-threads="10" />
  <query-cache results="64mb" programs="500" />
</database>

<server>
  <connection port="6136" max="200" />
  <data path="$objectdb/db-files" />
  <replication url="objectdb://127.0.0.1:6000/cp.odb;user=admin;password=admin" />
</server>

on a windows machine, this works properly and objectdb is starting and executing data manipulation fine but on debian I got this error. The directory '$replication' and the files in the directory however are created but only once - is there anything special to do with permissions on file access?

Many thanks for help or tips!

#2

It is unclear why you get this exception.

Check for additional stack traces in the log files of both the master and the slave.

You should also try a newer ObjectDB version (build 2.4.1_01).

Other ideas: verify that both servers on 6136 and 6000 are running, start with an empty database or with an up to date copy of the master database in the slave $replication directory, and provide maximum permissions.

ObjectDB Support

Reply