zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2925) ZooKeeper server fails to start on first-startup due to race to create dataDir & snapDir
Date Wed, 17 Oct 2018 01:54:00 GMT

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

Hadoop QA commented on ZOOKEEPER-2925:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12894475/ZOOKEEPER-2925.patch
  against trunk revision 7b679bc9dd98f06ee10bbb0978cfee5dab7b74dc.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3706//console

This message is automatically generated.

> ZooKeeper server fails to start on first-startup due to race to create dataDir &
snapDir
> ----------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2925
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2925
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: other
>    Affects Versions: 3.4.6
>            Reporter: Robert P. Thille
>            Priority: Major
>              Labels: easyfix, newbie, patch
>             Fix For: 3.4.10
>
>         Attachments: ZOOKEEPER-2925.patch
>
>
> Due to two threads trying to create the dataDir and snapDir, and the java.io.File.mkdirs()
call returning false both for errors and for the directory already existing, sometimes ZooKeeper
will fail to start with the following stack trace:
> {noformat}
> 2017-10-25 22:30:40,069 [myid:] - INFO  [main:ZooKeeperServerMain@95] - Starting server
> 2017-10-25 22:30:40,075 [myid:] - INFO  [main:Environment@100] - Server environment:zookeeper.version=3.4.6-mdavis8efb625--1,
built on 10/25/2017 01:12 GMT
> [ More 'Server environment:blah blah blah' messages trimmed]
> 2017-10-25 22:30:40,077 [myid:] - INFO  [main:Environment@100] - Server environment:user.dir=/
> 2017-10-25 22:30:40,081 [myid:] - ERROR [main:ZooKeeperServerMain@63] - Unexpected exception,
exiting abnormally
> java.io.IOException: Unable to create data directory /bp2/data/version-2
>     at org.apache.zookeeper.server.persistence.FileTxnSnapLog.<init>(FileTxnSnapLog.java:85)
>     at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:104)
>     at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
>     at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
>     at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
>     at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
> 2017-10-25 22:30:40,085 [myid:] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144]
- Purge task completed.
> {noformat}
> this is caused by the QuorumPeerMain thread and the PurgeTask thread both competing to
create the directories.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message