Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 25199 invoked from network); 25 Feb 2008 20:39:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2008 20:39:44 -0000 Received: (qmail 26542 invoked by uid 500); 25 Feb 2008 20:39:39 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 26329 invoked by uid 500); 25 Feb 2008 20:39:38 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 26320 invoked by uid 99); 25 Feb 2008 20:39:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 12:39:38 -0800 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 20:38:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 00BEA234C03D for ; Mon, 25 Feb 2008 12:38:52 -0800 (PST) Message-ID: <1688533851.1203971932001.JavaMail.jira@brutus> Date: Mon, 25 Feb 2008 12:38:52 -0800 (PST) From: "Ole Solberg (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-3463) Slave db is still in replication slave mode after failover if there was replication load before failover. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Slave db is still in replication slave mode after failover if there was replication load before failover. --------------------------------------------------------------------------------------------------------- Key: DERBY-3463 URL: https://issues.apache.org/jira/browse/DERBY-3463 Project: Derby Issue Type: Bug Components: Replication Environment: Trunk, svn r630806 Reporter: Ole Solberg Fix For: 10.4.0.0 Slave db is still in replication slave mode after failover if there was replication load before failover. I.e. connect to slave after failover is refused. Case A) below. (Connect to master after failover is OK.) If however there is no replication load on master db before failover connection to slave succeeds, but connection to master fails(hang). Trunk svn r630806 A) Replication load. ------------------- Master and slave servers started. Master: create master db. Master: freeze db Copy master db to slave. Master: unfreeze db. Slave: jdbc:derby://localhost:4527//home/os136789/Replication/testing/db_slave/wombat;startSlave=true;slaveHost=localhost;slavePort=6666 Master: jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat;startMaster=true;slaveHost=localhost;slavePort=6666 Slave: SQLException: -1 XRE08 DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE08, SQLERRMC: Replication slave mode started successfully for database '/home/os136789/Replication/testing/db_slave/wombat'. Connection refused because the database is in replication slave mode. Running tests against master. Master: jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat;failover=true SQLException: -1 XRE20 DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE20, SQLERRMC: Failover performed successfully for database '/home/os136789/Replication/testing/db_master/wombat', the database has been shutdown. Slave: /usr/local/java/jdk1.6/jre/lib/../bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.connection.slave=jdbc:derby://localhost:4527//home/os136789/Replication/testing/db_slave/wombat -classpath /home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbyclient.jar:/home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbytools.jar org.apache.derby.tools.ij /home/os136789/Replication/testing/verify_ReplicationTestRun.sql ERROR 08004: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08004, SQLERRMC: Connection refused to database '/home/os136789/Replication/testing/db_slave/wombat' because it is in replication slave mode. Master: /usr/local/java/jdk1.6/jre/lib/../bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.connection.master=jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat -classpath /home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbyclient.jar:/home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbytools.jar org.apache.derby.tools.ij /home/os136789/Replication/testing/verify_ReplicationTestRun.sql (Connection OK) Test run logfile.out plus derby.log from master and slave: Attachement: replicationLoad.tar >From slave derby.log: ERROR XSLA7: Cannot redo operation null in the log. at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:300) at org.apache.derby.impl.store.raw.log.FileLogger.redo(FileLogger.java:1525) at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:920) at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:334) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1999) at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:553) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:419) at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessManager.java:1019) at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1999) at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:291) at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:553) at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:419) at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:793) at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:205) at org.apache.derby.impl.db.SlaveDatabase.bootBasicDatabase(SlaveDatabase.java:425) at org.apache.derby.impl.db.SlaveDatabase.access$000(SlaveDatabase.java:70) at org.apache.derby.impl.db.SlaveDatabase$SlaveDatabaseBootThread.run(SlaveDatabase.java:312) at java.lang.Thread.run(Thread.java:619) Caused by: ERROR XSDFI: Error encountered while trying to write data to disk during database recovery. Check that the database disk is not full. If it is then delete unnecessary files, and retry connecting to the database. It is also possible that the file system is read only, or the disk has failed, or some other problem with the media. System encountered error while processing page Page(2,Container(0, 336)). B) No replication load. ------------------- Master and slave servers started. Master: create master db. Master: freeze db Copy master db to slave. Master: unfreeze db. Slave: jdbc:derby://localhost:4527//home/os136789/Replication/testing/db_slave/wombat;startSlave=true;slaveHost=localhost;slavePort=6666 Master: jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat;startMaster=true;slaveHost=localhost;slavePort=6666 Slave: SQLException: -1 XRE08 DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE08, SQLERRMC: Replication slave mode started successfully for database '/home/os136789/Replication/testing/db_slave/wombat'. Connection refused because the database is in replication slave mode. NOT Running tests against master. Master: jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat;failover=true failOver_direct Got SQLException: -1 XRE20 DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE20, SQLERRMC: Failover performed successfully for database '/home/os136789/Replication/testing/db_master/wombat', the database has been shutdown. Slave: /usr/local/java/jdk1.6/jre/lib/../bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.connection.slave=jdbc:derby://localhost:4527//home/os136789/Replication/testing/db_slave/wombat -classpath /home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbyclient.jar:/home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbytools.jar org.apache.derby.tools.ij /home/os136789/Replication/testing/verify_ReplicationTestRun.sql (Connection OK) Master: /usr/local/java/jdk1.6/jre/lib/../bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.connection.master=jdbc:derby://localhost:1527//home/os136789/Replication/testing/db_master/wombat -classpath /home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbyclient.jar:/home/os136789/Apache/myDerbySandbox/trunk/jars/insane/derbytools.jar org.apache.derby.tools.ij /home/os136789/Replication/testing/verify_ReplicationTestRun.sql Failure: Hangs! (On 'show schemas;') Test run logfile.out plus derby.log from master and slave: Attachement: NOreplicationLoad.tar -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.