Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E31F73EE for ; Mon, 10 Oct 2011 10:08:56 +0000 (UTC) Received: (qmail 33856 invoked by uid 500); 10 Oct 2011 10:08:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 33825 invoked by uid 500); 10 Oct 2011 10:08:56 -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 33818 invoked by uid 99); 10 Oct 2011 10:08:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 10:08:56 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 10:08:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 64D8F3006DA for ; Mon, 10 Oct 2011 10:08:30 +0000 (UTC) Date: Mon, 10 Oct 2011 10:08:30 +0000 (UTC) From: "Kristian Waagan (Updated) (JIRA)" To: derby-dev@db.apache.org Message-ID: <676000899.14172.1318241310414.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-3639) Slave on Windows stops replication when network connection is broken, failover fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kristian Waagan updated DERBY-3639: ----------------------------------- Issue & fix info: Workaround attached (was: Patch Available,Workaround attached) Clearing patch available, a new patch is required. > Slave on Windows stops replication when network connection is broken, failover fails > ------------------------------------------------------------------------------------ > > Key: DERBY-3639 > URL: https://issues.apache.org/jira/browse/DERBY-3639 > Project: Derby > Issue Type: Bug > Components: Replication > Affects Versions: 10.4.1.3 > Environment: Master on Solaris 10 x86, Slave on Windows XP SP2. > Slave VM: Sun's Java HotSpot Client VM build 1.6.0_03-b05. > Reporter: John H. Embretsen > Assignee: Kristian Waagan > Priority: Minor > Labels: derby_triage10_5_2 > Attachments: derby-3639-1a-handle_connection_reset.diff, derby.log > > > Replication: Failover on slave fails after network connection is broken (network cable to slave pulled out); database is shut down due to an "unexpected error". > Same experiment with a replicated embedded database on Linux (FC5) and Windows resulted in success on Linux and failure on Windows. > Documentation (admin guide, "Replication failure handling") says: > "Slave loses connection with master: The slave tries to reestablish the connection with the master by listening on the specified host and port. It will not give up until it is explicitly requested to do so by either the failover=true or stopSlave=true connection URL attribute. If a failover is requested, the slave applies all received log records and boots the database as described in Forcing a failover." > Slave console: > java -jar lib\derbyrun.jar ij > ij version 10.4 > ij> connect 'jdbc:derby:replicDB;startSlave=true;slaveHost=0.0.0.0'; > ERROR XRE08: Replication slave mode started successfully for database 'replicDB'. Connection refused because the database is in replication slave mode > . > ij> connect 'jdbc:derby:replicDB'; > ERROR 08004: Connection refused to database 'replicDB' because it is in replication slave mode. > ij> -- network cable unplugged from slave > ij> connect 'jdbc:derby:replicDB;failover=true'; > ERROR XRE11: Could not perform operation 'failover' because the database 'replicDB' has not been booted. > ij> connect 'jdbc:derby:replicDB'; > ij> > The slave's derby.log reported the following after the network cable was pulled and the failover command was issued: > ---- BEGIN REPLICATION ERROR MESSAGE (4/22/08 2:01 PM) ---- > Replication slave got a fatal error for database 'replicDB'. Replication will be stopped. > ERROR XRE03: Unexpected replication error. See derby.log for details. > at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > at org.apache.derby.impl.store.replication.slave.SlaveController$SlaveLogReceiverThread.run(Unknown Source) > Caused by: java.net.SocketException: Connection reset > at java.net.SocketInputStream.read(Unknown Source) > at java.net.SocketInputStream.read(Unknown Source) > at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source) > at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source) > at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) > at java.io.ObjectInputStream.readObject0(Unknown Source) > at java.io.ObjectInputStream.readObject(Unknown Source) > at org.apache.derby.impl.store.replication.net.SocketConnection.readMessage(Unknown Source) > at org.apache.derby.impl.store.replication.net.ReplicationMessageReceive.readMessage(Unknown Source) > [snipped further stack traces] > -------------------- END REPLICATION ERROR MESSAGE --------------------- > Replication slave role was stopped for database 'replicDB'. > Replication slave role was stopped for database 'replicDB'. > 2008-04-22 12:01:42.921 GMT: > Shutting down instance 601a400f-0119-7600-eb23-000000383460 > ---------------------------------------------------------------- > Full derby.log from the slave is attached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira