You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "mark kozikowski (JIRA)" <ji...@apache.org> on 2017/03/30 14:27:42 UTC

[jira] [Commented] (ZOOKEEPER-1061) Zookeeper stop fails if start called twice

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949160#comment-15949160 ] 

mark kozikowski commented on ZOOKEEPER-1061:
--------------------------------------------

I believe there is a small error in the patch for the zookeeper start script.
The section in question relates to 'start'

+        echo FAILED TO WRITE PID
+        exit 1

I would like to see the 'just started' zookeeper stopped if the pid file failed to write
Otherwise, we lose the ability to stop it later, and we might have start issues again
if we try to restart it.

Mark


> Zookeeper stop fails if start called twice
> ------------------------------------------
>
>                 Key: ZOOKEEPER-1061
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1061
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.3.2
>            Reporter: Ted Dunning
>            Assignee: Ted Dunning
>             Fix For: 3.4.0
>
>         Attachments: ZOOKEEPER-1061.patch
>
>
> The zkServer.sh script doesn't check properly to see if a previously started
> server is still running.  If you call start twice, the second invocation
> will over-write the PID file with a process that then fails due to port
> occupancy.
> This means that stop will subsequently fail.
> Here is a reference that describes how init scripts should normally work:
> http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)