[jira] [Comment Edited] (ZOOKEEPER-4276) Serving only with secureClientPort fails

2024-02-20 Thread Abhilash Kishore (Jira)


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

Abhilash Kishore edited comment on ZOOKEEPER-4276 at 2/20/24 9:36 PM:
--

[~andor] I have a PR out - https://github.com/apache/zookeeper/pull/2117 . Can 
I get your review?


was (Author: abhilash1in):
[~andor] I have a PR out - https://github.com/apache/zookeeper/pull/2117 . I 
can get your review?

> Serving only with secureClientPort fails
> 
>
> Key: ZOOKEEPER-4276
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4276
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.7.0, 3.5.8, 3.6.2, 3.8.0
>Reporter: Kei Kori
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> clientPort in zoo.cfg is forcefully complemented from client address by 
> QuorumPeerConfig#setupClientPort even though secureClientPort is set and 
> matches with client address' port.
> Because of this behavior, in case rolling update with replacing clientPort to 
> secureClientPort in the same port number following [Upgrading existing 
> non-TLS cluster with no 
> downtime|https://zookeeper.apache.org/doc/r3.7.0/zookeeperAdmin.html#Upgrading+existing+nonTLS+cluster]
>  conflicts and gets errors below.
> {code}
> 2021-03-29 23:21:58,638 - INFO  [main:NettyServerCnxnFactory@590] - binding 
> to port /0.0.0.0:2281
> 2021-03-29 23:21:58,748 - INFO  [main:NettyServerCnxnFactory@595] - bound to 
> port 2281
> 2021-03-29 23:21:58,749 - INFO  [main:NettyServerCnxnFactory@590] - binding 
> to port 0.0.0.0/0.0.0.0:2281
> 2021-03-29 23:21:58,753 - ERROR [main:QuorumPeerMain@101] - Unexpected 
> exception, exiting abnormally
> java.net.BindException: Address already in use
> {code}
> QuorumPeerConfig#setupClientPort should complement only when both clientPort 
> and secureClientPort are empty, and allow serving zookeeper server only with 
> secure client port.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ZOOKEEPER-4276) Serving only with secureClientPort fails

2024-02-20 Thread Abhilash Kishore (Jira)


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

Abhilash Kishore commented on ZOOKEEPER-4276:
-

[~andor] I have a PR out - https://github.com/apache/zookeeper/pull/2117 . I 
can get your review?

> Serving only with secureClientPort fails
> 
>
> Key: ZOOKEEPER-4276
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4276
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.7.0, 3.5.8, 3.6.2, 3.8.0
>Reporter: Kei Kori
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> clientPort in zoo.cfg is forcefully complemented from client address by 
> QuorumPeerConfig#setupClientPort even though secureClientPort is set and 
> matches with client address' port.
> Because of this behavior, in case rolling update with replacing clientPort to 
> secureClientPort in the same port number following [Upgrading existing 
> non-TLS cluster with no 
> downtime|https://zookeeper.apache.org/doc/r3.7.0/zookeeperAdmin.html#Upgrading+existing+nonTLS+cluster]
>  conflicts and gets errors below.
> {code}
> 2021-03-29 23:21:58,638 - INFO  [main:NettyServerCnxnFactory@590] - binding 
> to port /0.0.0.0:2281
> 2021-03-29 23:21:58,748 - INFO  [main:NettyServerCnxnFactory@595] - bound to 
> port 2281
> 2021-03-29 23:21:58,749 - INFO  [main:NettyServerCnxnFactory@590] - binding 
> to port 0.0.0.0/0.0.0.0:2281
> 2021-03-29 23:21:58,753 - ERROR [main:QuorumPeerMain@101] - Unexpected 
> exception, exiting abnormally
> java.net.BindException: Address already in use
> {code}
> QuorumPeerConfig#setupClientPort should complement only when both clientPort 
> and secureClientPort are empty, and allow serving zookeeper server only with 
> secure client port.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ZOOKEEPER-2332) Zookeeper failed to start for empty txn log

2024-02-20 Thread fanyang (Jira)


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

fanyang commented on ZOOKEEPER-2332:


Hello everyone, I'm creating a new PR to fix this.
https://github.com/apache/zookeeper/pull/2141

I think a distinction should be made between a case where the empty txn log is 
at the end of the list, and a case where the empty txn log is in the middle of 
the list. In the former case, it is safe to delete the empty txn log, but in 
the latter case, this may indicate a real occurrence of data corruption (e.g. 
loss of filesystem metadata). So this PR I'm submitting only automatically 
handles the former case.

> Zookeeper failed to start for empty txn log
> ---
>
> Key: ZOOKEEPER-2332
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2332
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.6
>Reporter: Shaohui Liu
>Assignee: Shaohui Liu
>Priority: Critical
>  Labels: pull-request-available
> Attachments: ZOOKEEPER-2332-v001.diff
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We found that the zookeeper server with version 3.4.6 failed to start for 
> there is a empty txn log in log dir.  
> I think we should skip the empty log file during restoring the datatree. 
> Any suggestion?
> {code}
> 2015-11-27 19:16:16,887 [myid:] - ERROR [main:ZooKeeperServerMain@63] - 
> Unexpected exception, exiting abnormally
> java.io.EOFException
> at java.io.DataInputStream.readInt(DataInputStream.java:392)
> at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
> at 
> org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:64)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:576)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:595)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:561)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:643)
> at 
> org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:158)
> at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
> at 
> org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272)
> at 
> org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399)
> at 
> org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122)
> at 
> org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:113)
> 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)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (ZOOKEEPER-2332) Zookeeper failed to start for empty txn log

2024-02-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated ZOOKEEPER-2332:
--
Labels: pull-request-available  (was: )

> Zookeeper failed to start for empty txn log
> ---
>
> Key: ZOOKEEPER-2332
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2332
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.4.6
>Reporter: Shaohui Liu
>Assignee: Shaohui Liu
>Priority: Critical
>  Labels: pull-request-available
> Attachments: ZOOKEEPER-2332-v001.diff
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We found that the zookeeper server with version 3.4.6 failed to start for 
> there is a empty txn log in log dir.  
> I think we should skip the empty log file during restoring the datatree. 
> Any suggestion?
> {code}
> 2015-11-27 19:16:16,887 [myid:] - ERROR [main:ZooKeeperServerMain@63] - 
> Unexpected exception, exiting abnormally
> java.io.EOFException
> at java.io.DataInputStream.readInt(DataInputStream.java:392)
> at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
> at 
> org.apache.zookeeper.server.persistence.FileHeader.deserialize(FileHeader.java:64)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.inStreamCreated(FileTxnLog.java:576)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.createInputArchive(FileTxnLog.java:595)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.goToNextLog(FileTxnLog.java:561)
> at 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:643)
> at 
> org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:158)
> at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
> at 
> org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272)
> at 
> org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399)
> at 
> org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122)
> at 
> org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:113)
> 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)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)