You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by pramavyt s <pr...@gmail.com> on 2020/08/27 13:58:18 UTC

Derby Replication Issue

Hello,

I am trying to setup replication b/w two Derby databases. Its embedded with
an application. Configuration for replication is done as per the
documentation here
<https://db.apache.org/derby/docs/10.4/adminguide/cadminreplicstartrun.html>

When the application tries to start master instance, I get to see the
message.

Lost DB connection URL=
jdbc:derby:db/NMS;startMaster=true;slaveHost=10.200.10.66 + REASON=
The log files on the master and slave are not in synch for replicated
database 'db/NMS'. The master log instant is 1:200335, whereas the
slave log instant is 1:196097. This is fatal for replication -
replication will be stopped.:


There is some exchange happening on the replication port b/w master &
slave. But master quits with the message. Per the documentation,before
starting master, the database is copied to the slave location. And no
transaction happens in master after that. What does the message ( mismatch
in log instance) mean? What could I be missing?

Re: Derby Replication Issue

Posted by Oskar Z <os...@yahoo.com>.
You have to make sure that you shutdown the DB (or freeze), copy it over to slave, start master and start slave. And if you shutdown the DB, you must make sure that no calls are made to the DB that will start it up.

Regards,
Oskar

> On Aug 27, 2020, at 2:21 PM, pramavyt s <pr...@gmail.com> wrote:
> 
> @ Michael, thanks for your feedback. It looks like replication is supported in embedded mode as well .
> 
> From the documentation , we have the following reference:
> 
> "You can perform replication on a database that runs in either embedded mode or Network Server mode."
> 
> https://db.apache.org/derby/docs/10.4/adminguide/cadminreplication.html <https://db.apache.org/derby/docs/10.4/adminguide/cadminreplication.html> 
>  
> 
> On Thu, Aug 27, 2020 at 11:20 PM Michael Remijan <mjremijan@live.com <ma...@live.com>> wrote:
> Embedded database can only be accessed by the application, nothing external. Seems to me like replication between embedded databases wouldn’t work.
> 
>  
> 
> From: pramavyt s <pramavyt@gmail.com <ma...@gmail.com>> 
> Sent: Thursday, August 27, 2020 8:58 AM
> To: derby-user@db.apache.org <ma...@db.apache.org>
> Subject: Derby Replication Issue
> 
>  
> 
>  
> 
> Hello,
> 
> I am trying to setup replication b/w two Derby databases. Its embedded with an application. Configuration for replication is done as per the documentation here <https://db.apache.org/derby/docs/10.4/adminguide/cadminreplicstartrun.html>
> When the application tries to start master instance, I get to see the message. 
> 
> Lost DB connection URL= jdbc:derby:db/NMS;startMaster=true;slaveHost=10.200.10.66 + REASON= The log files on the master and slave are not in synch for replicated database 'db/NMS'. The master log instant is 1:200335, whereas the slave log instant is 1:196097. This is fatal for replication - replication will be stopped.:
>  
> 
> There is some exchange happening on the replication port b/w master & slave. But master quits with the message. Per the documentation,before starting master, the database is copied to the slave location. And no transaction happens in master after that. What does the message ( mismatch in log instance) mean? What could I be missing?
> 
>  
> 
>  
> 


Re: Derby Replication Issue

Posted by pramavyt s <pr...@gmail.com>.
@ Michael, thanks for your feedback. It looks like replication is supported
in embedded mode as well .

From the documentation , we have the following reference:

"You can perform replication on a database that runs in either embedded
mode or Network Server mode."

https://db.apache.org/derby/docs/10.4/adminguide/cadminreplication.html


On Thu, Aug 27, 2020 at 11:20 PM Michael Remijan <mj...@live.com> wrote:

> Embedded database can only be accessed by the application, nothing
> external. Seems to me like replication between embedded databases wouldn’t
> work.
>
>
>
> *From:* pramavyt s <pr...@gmail.com>
> *Sent:* Thursday, August 27, 2020 8:58 AM
> *To:* derby-user@db.apache.org
> *Subject:* Derby Replication Issue
>
>
>
>
>
> Hello,
>
> I am trying to setup replication b/w two Derby databases. Its embedded
> with an application. Configuration for replication is done as per the
> documentation here
> <https://db.apache.org/derby/docs/10.4/adminguide/cadminreplicstartrun.html>
>
> When the application tries to start master instance, I get to see the
> message.
>
> Lost DB connection URL= jdbc:derby:db/NMS;startMaster=true;slaveHost=10.200.10.66 + REASON= The log files on the master and slave are not in synch for replicated database 'db/NMS'. The master log instant is 1:200335, whereas the slave log instant is 1:196097. This is fatal for replication - replication will be stopped.:
>
>
>
> There is some exchange happening on the replication port b/w master &
> slave. But master quits with the message. Per the documentation,before
> starting master, the database is copied to the slave location. And no
> transaction happens in master after that. What does the message ( mismatch
> in log instance) mean? What could I be missing?
>
>
>
>
>

RE: Derby Replication Issue

Posted by Michael Remijan <mj...@live.com>.
Embedded database can only be accessed by the application, nothing external. Seems to me like replication between embedded databases wouldn’t work.

From: pramavyt s <pr...@gmail.com>
Sent: Thursday, August 27, 2020 8:58 AM
To: derby-user@db.apache.org
Subject: Derby Replication Issue




Hello,

I am trying to setup replication b/w two Derby databases. Its embedded with an application. Configuration for replication is done as per the documentation here<https://db.apache.org/derby/docs/10.4/adminguide/cadminreplicstartrun.html>

When the application tries to start master instance, I get to see the message.

Lost DB connection URL= jdbc:derby:db/NMS;startMaster=true;slaveHost=10.200.10.66 + REASON= The log files on the master and slave are not in synch for replicated database 'db/NMS'. The master log instant is 1:200335, whereas the slave log instant is 1:196097. This is fatal for replication - replication will be stopped.:



There is some exchange happening on the replication port b/w master & slave. But master quits with the message. Per the documentation,before starting master, the database is copied to the slave location. And no transaction happens in master after that. What does the message ( mismatch in log instance) mean? What could I be missing?