[
https://issues.apache.org/jira/browse/DERBY-3189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558598#action_12558598
]
Øystein Grøvlen commented on DERBY-3189:
----------------------------------------
It seems like some clean-up is missing if startMaster fails. This
happened when I tried to connect to a non-existing slave:
(Please, tell me if I should rather report such bugs in new JIRAs)
> java org.apache.derby.tools.ij
ij version 10.4
ij> connect 'jdbc:derby:test;create=true';
ij> connect 'jdbc:derby:test;startMaster=true;slaveHost=localhost';
ERROR XRE04: Could not establish a connection to the peer of the replicated
database 'null'.
ij> quit;
Exception in thread "main" java.lang.NullPointerException
at
org.apache.derby.impl.services.replication.master.MasterController.flushedTo(MasterController.java:278)
at
org.apache.derby.impl.store.raw.log.LogToFile.flush(LogToFile.java:3953)
at
org.apache.derby.impl.store.raw.log.LogToFile.flush(LogToFile.java:1762)
at
org.apache.derby.impl.store.raw.log.LogToFile.checkpointWithTran(LogToFile.java:1653)
at
org.apache.derby.impl.store.raw.log.LogToFile.checkpoint(LogToFile.java:1469)
at org.apache.derby.impl.store.raw.RawStore.stop(RawStore.java:363)
at
org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:405)
at
org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:349)
at
org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:235)
at
org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(BaseMonitor.java:201)
at
org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:205) at
org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:119)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at org.apache.derby.impl.tools.ij.utilMain.cleanupGo(utilMain.java:416)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:249)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:215)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181)
at org.apache.derby.impl.tools.ij.Main.main(Main.java:73)
at org.apache.derby.tools.ij.main(ij.java:59)
> Replication: Add connection url command options for starting and stopping
> master
> --------------------------------------------------------------------------------
>
> Key: DERBY-3189
> URL: https://issues.apache.org/jira/browse/DERBY-3189
> Project: Derby
> Issue Type: Sub-task
> Components: JDBC
> Affects Versions: 10.4.0.0
> Reporter: Jørgen Løland
> Assignee: V.Narayanan
> Attachments: derby-3189-1a.diff, derby-3189-1a.stat,
> StopMaster_impl_3189_v1.diff, StopMaster_impl_3189_v1.stat,
> StopMaster_impl_3189_v2.diff, StopMaster_impl_3189_v2.diff,
> StopMaster_impl_3189_v2.stat, StopMaster_impl_3189_v2.stat
>
>
> Add commands to start and stop the replication master using properties or
> connection url. Example:
> 'jdbc:derby:<host><masterdb>;startMaster=true';
> 'jdbc:derby:<host><masterdb>;stopMaster=true';
> Connection url options that must be recognized:
> startMaster=true
> stopMaster=true
> slaveHost=<host> (required)
> slavePort=<port> (optional, defaults to 8001)
> See functional specification on Derby-2872 for further details.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.