Python社区  »  zookeeper

当我为Kafka服务器运行命令时,ZooKeeper自动关闭

Kumar • 2 年前 • 380 次点击  

我正在努力解决一个非常奇怪的问题。这以前是没有问题的。

我必须启动动物园管理员和卡夫卡。为此,我要做的是:

  1. nohup bin/zookeeper-server-start.sh配置/zookeeper.properties&。

之后,当我运行jps命令时:我可以将Quaorumpermain视为一个进程,这是为ZooKeeper准备的。

现在我跑 2。nohup bin/kafka-server-start.sh配置/server.properties&。

之后,当我运行JPS时,ZooKeeper的进程也会消失,它会自动关闭。

log:

>代码> [2018-072501:31:21833]信息客户端环境:Java.Loop.PATH=/Ur/Java/Pys/lib/AMD64:/Ur/Lb64:/lib64:/lib:/Ur/lib(org .Apache .ZooKeK.ZooKeor) [2018-072501:31:21833]信息客户端环境:Java.IO .tMPDRR=/tMP(org .Apache .ZooKeK.ZooKeor) [2018-072501:31:21833]信息客户端环境:java.编译器= & lt;n& gt;(org .Apache .ZooKeK.ZooKeor) [2018-07-25 01:31:21832]信息客户端环境:os.name=linux(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21832]信息客户端环境:os.arch=amd64(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21832]信息客户端环境:OS.version=3.10.0-862.3.3.el7.x86_64(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21832]信息客户端环境:user.name=kumar.shorav(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21832]信息客户端环境:user.home=/home/kumar.shorav(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21832]信息客户端环境:user.dir=/app/opt/kafka_2.10-0.10.2.1(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21833]信息发起客户端连接,connectString=localhost:2181 sessionTimeout=6000 watcher=org.i0itec.zkclient.zkclient@8dbdac1(org.apache.zookeeper.zookeeper) [2018-07-25 01:31:21849]等待门将状态同步连接的信息(org.i0itec.zkclient.zkclient) [2018-07-25 01:31:21852]信息打开与服务器localhost.localdomain/127.0.0.1:2181的套接字连接。不会尝试使用SASL进行身份验证(未知错误)(org.apache.zookeeper.clientcnxn) [2018-07-25 01:31:21859]与localhost.localdomain/127.0.0.1:2181建立信息套接字连接,发起会话(org.apache.zookeeper.clientcnxn) [2018-07-25 01:31:21862]来自/127.0.0.1:38370的接受信息套接字连接(org.apache.zookeeper.server.nioservercnxnfactory) [2018-07-25 01:31:21870]试图在/127.0.0.1:38370(org.apache.zookeeper.server.zookeeperserver)建立新会话的信息客户端 [2018-07-25 01:31:21871]信息创建新日志文件:log.181(org.apache.zookeeper.server.persistence.filetxlog) [2018-07-25 01:31:21874]错误严重不可恢复错误,来自线程:同步线程:0(org.apache.zookeeper.server.zookeepercriticalthread) java.io.filenotfoundexception:/tmp/zookeeper/version-2/log.181(权限被拒绝) 在java. I.FielOutPoStudio.Open0(原生方法) 在Java.Io.FielOutPoStudio.Opvin(FielOutPoStudio.java:270) 在Java.Io.FielOutPoStudio.lt;init & gt;(FielOutPutsStudio.java:213) 在Java.Io.FielOutPoStudio.lt;init & gt;(FielOutPutsStudio.java:162) 在Org.Apache .ZooKeal.Server持久性.FielxNLog.AppEnter(FielxNLog.java:209) 在Org.Apache .ZooKeal.Server持久性.FielxnSnApLog.AppEnter(FielxnSnApLog.java:314) 在Org.Apache .ZooKeal.Serv.ZKDabas.AppEnter(ZKDabas.java:470) 在Org.Apache .ZooKeal.Server。SyrQueQuestPrimult.Run(SyrQueQuestPrimult.java:140) [2018-07-25 01:31:21877]信息线程同步线程:0退出,错误代码1(org.apache.zookeeper.server.zookeeperserverlistenempl) [2018-07-25 01:31:21877]信息同步请求处理器退出!(org.apache.zookeeper.server.syncrequestprocessor) [2018-07-25 01:31:21878]客户端信息封闭套接字连接/127.0.0.1:38370,sessionid 0x164d01e0A460000(org.apache.zookeeper.server.nioservercnxn) [2018-07-25 01:31:21879]信息无法从服务器sessionid 0x0读取额外数据,可能服务器已关闭套接字,关闭套接字连接并尝试重新连接(org.apache.zookeeper.clientcnxn) [2018-07-25 01:31:21879]信息nioservercnxn工厂退出运行方法(org.apache.zookeeper.server.nioservercnxn factory) [2018-07-25 01:31:21880]信息关闭(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:31:21880]信息关闭(org.apache.zookeeper.server.sessiontrackerimpl) [2018-07-25 01:31:21881]信息关闭(org.apache.zookeeper.server.prerequestprocessor) [2018-07-25 01:31:21881]信息关闭(org.apache.zookeeper.server.syncrequestprocessor) [2018-07-25 01:31:21881]信息预请求处理器退出循环!(org.apache.zookeeper.server.prerequestprocessor) [2018-07-25 01:31:21881]请求处理器信息关闭完成(org.apache.zookeeper.server.finalRequestProcessor) [2018-07-25 01:31:21881]信息正常退出(org.apache.zookeeper.server.zookeeperservermain) [2018-07-25 01:31:23914]信息打开与服务器localhost.localdomain/127.0.0.1:2181的套接字连接。不会尝试使用SASL进行身份验证(未知错误)(org.apache.zookeeper.clientcnxn) [2018-072501:51:13467 ]信息服务器环境:Java.IO .tMPDRR=/tMP(org .Apache .ZooKeal.Server .ZooKeePeServer) [2018-072501:51:13467 ]信息服务器环境:java.编译器= & lt;n& gt;(org .Apache .ZooKeal.Server .ZooKeePeServer) [2018-07-25 01:51:13467]信息服务器环境:os.name=linux(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13468]信息服务器环境:os.arch=amd64(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13468]信息服务器环境:os.version=3.10.0-862.3.3.el7.x86_64(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13468]信息服务器环境:user.name=kumar.shorav(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13468]信息服务器环境:user.home=/home/kumar.shorav(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13468]信息服务器环境:user.dir=/app/opt/kafka_2.10-0.10.2.1(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13477]信息计时时间设置为3000(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13477]信息minsessiontimeout设置为-1(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13477]info maxsessiontimeout设置为-1(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:13489]绑定到端口0.0.0.0/0.0.0.0:2181的信息(org.apache.zookeeper.server.nioservercnxnfactory) [2018-07-25 01:51:41099]来自/127.0.0.1:40262的接受信息套接字连接(org.apache.zookeeper.server.nioservercnxnfactory) [2018-07-25 01:51:41107]试图在/127.0.0.1:40262(org.apache.zookeeper.server.zookeeperserver)建立新会话的信息客户端 [2018-07-25 01:51:41108]信息创建新日志文件:log.181(org.apache.zookeeper.server.persistence.filetxlog) [2018-07-25 01:51:41111]错误严重不可恢复错误,来自线程:同步线程:0(org.apache.zookeeper.server.zookeepercriticalthread) java.io.filenotfoundexception:/tmp/zookeeper/version-2/log.181(权限被拒绝) 在java. I.FielOutPoStudio.Open0(原生方法) 在Java.Io.FielOutPoStudio.Opvin(FielOutPoStudio.java:270) 在Java.Io.FielOutPoStudio.lt;init & gt;(FielOutPutsStudio.java:213) 在Java.Io.FielOutPoStudio.lt;init & gt;(FielOutPutsStudio.java:162) 在Org.Apache .ZooKeal.Server持久性.FielxNLog.AppEnter(FielxNLog.java:209) 在Org.Apache .ZooKeal.Server持久性.FielxnSnApLog.AppEnter(FielxnSnApLog.java:314) 在Org.Apache .ZooKeal.Serv.ZKDabas.AppEnter(ZKDabas.java:470) 在Org.Apache .ZooKeal.Server。SyrQueQuestPrimult.Run(SyrQueQuestPrimult.java:140) [2018-07-25 01:51:41113]信息线程同步线程:0退出,错误代码1(org.apache.zookeeper.server.zookeeperserverlistenempl) [2018-07-25 01:51:41113]信息同步请求处理器退出!(org.apache.zookeeper.server.syncrequestprocessor) [2018-07-25 01:51:41114]客户端信息封闭套接字连接/127.0.0.1:40262,sessionid 0x164D034B9130000(org.apache.zookeeper.server.nioservercnxn) [2018-07-25 01:51:41114]信息nioservercnxn工厂退出运行方法(org.apache.zookeeper.server.nioservercnxn factory) [2018-07-25 01:51:41115]信息关闭(org.apache.zookeeper.server.zookeeperserver) [2018-07-25 01:51:41115]信息关闭(org.apache.zookeeper.server.sessiontrackerimpl) [2018-07-25 01:51:41115]信息关闭(org.apache.zookeeper.server.prerequestprocessor) [2018-07-25 01:51:41115]信息关闭(org.apache.zookeeper.server.syncrequestprocessor) [2018-07-25 01:51:41115]信息预请求处理器退出循环!(org.apache.zookeeper.server.prerequestprocessor) [2018-07-25 01:51:41115]请求处理器信息关闭完成(org.apache.zookeeper.server.finalRequestProcessor) [2018-07-25 01:51:41116]信息正常退出(org.apache.zookeeper.server.zookeeperservermain) < /代码>

我不知道这是为什么突然出现的。 请看一看,帮我出去。

.

  1. nohup bin/zookeeper-server-start.sh配置/zookeeper.properties&

之后,当我运行jps命令时:我可以将Quaorumpermain视为一个进程,也就是说对于ZooKeeper。

现在我跑 2。nohup bin/kafka-server-start.sh配置/server.properties&

之后,当我运行JPS时,对ZooKeeper的处理也会消失,它会自动关闭。

原木:




    
[2018-07-25 01:31:21,832] INFO Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:java.io.tmpdir=/tmp (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:os.name=Linux (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:os.arch=amd64 (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:os.version=3.10.0-862.3.3.el7.x86_64 (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:user.name=kumar.shorav (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:user.home=/home/kumar.shorav (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,832] INFO Client environment:user.dir=/app/opt/kafka_2.10-0.10.2.1 (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,833] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@8dbdac1 (org.apache.zookeeper.ZooKeeper)
[2018-07-25 01:31:21,849] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient)
[2018-07-25 01:31:21,852] INFO Opening socket connection to server localhost.localdomain/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2018-07-25 01:31:21,859] INFO Socket connection established to localhost.localdomain/127.0.0.1:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2018-07-25 01:31:21,862] INFO Accepted socket connection from /127.0.0.1:38370 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-07-25 01:31:21,870] INFO Client attempting to establish new session at /127.0.0.1:38370 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:31:21,871] INFO Creating new log file: log.181 (org.apache.zookeeper.server.persistence.FileTxnLog)
[2018-07-25 01:31:21,874] ERROR Severe unrecoverable error, from thread : SyncThread:0 (org.apache.zookeeper.server.ZooKeeperCriticalThread)
java.io.FileNotFoundException: /tmp/zookeeper/version-2/log.181 (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
        at org.apache.zookeeper.server.persistence.FileTxnLog.append(FileTxnLog.java:209)
        at org.apache.zookeeper.server.persistence.FileTxnSnapLog.append(FileTxnSnapLog.java:314)
        at org.apache.zookeeper.server.ZKDatabase.append(ZKDatabase.java:470)
        at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:140)
[2018-07-25 01:31:21,877] INFO Thread SyncThread:0 exits, error code 1 (org.apache.zookeeper.server.ZooKeeperServerListenerImpl)
[2018-07-25 01:31:21,877] INFO SyncRequestProcessor exited! (org.apache.zookeeper.server.SyncRequestProcessor)
[2018-07-25 01:31:21,878] INFO Closed socket connection for client /127.0.0.1:38370 which had sessionid 0x164d01e0a460000 (org.apache.zookeeper.server.NIOServerCnxn)
[2018-07-25 01:31:21,879] INFO Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
[2018-07-25 01:31:21,879] INFO NIOServerCnxn factory exited run method (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-07-25 01:31:21,880] INFO shutting down (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:31:21,880] INFO Shutting down (org.apache.zookeeper.server.SessionTrackerImpl)
[2018-07-25 01:31:21,881] INFO Shutting down (org.apache.zookeeper.server.PrepRequestProcessor)
[2018-07-25 01:31:21,881] INFO Shutting down (org.apache.zookeeper.server.SyncRequestProcessor)
[2018-07-25 01:31:21,881] INFO PrepRequestProcessor exited loop! (org.apache.zookeeper.server.PrepRequestProcessor)
[2018-07-25 01:31:21,881] INFO shutdown of request processor complete (org.apache.zookeeper.server.FinalRequestProcessor)
[2018-07-25 01:31:21,881] INFO Exiting normally (org.apache.zookeeper.server.ZooKeeperServerMain)
[2018-07-25 01:31:23,914] INFO Opening socket connection to server localhost.localdomain/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)

[2018-07-25 01:51:13,467] INFO Server environment:java.io.tmpdir=/tmp (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,467] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,467] INFO Server environment:os.name=Linux (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,468] INFO Server environment:os.arch=amd64 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,468] INFO Server environment:os.version=3.10.0-862.3.3.el7.x86_64 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,468] INFO Server environment:user.name=kumar.shorav (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,468] INFO Server environment:user.home=/home/kumar.shorav (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,468] INFO Server environment:user.dir=/app/opt/kafka_2.10-0.10.2.1 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,477] INFO tickTime set to 3000 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,477] INFO minSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,477] INFO maxSessionTimeout set to -1 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:13,489] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-07-25 01:51:41,099] INFO Accepted socket connection from /127.0.0.1:40262 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-07-25 01:51:41,107] INFO Client attempting to establish new session at /127.0.0.1:40262 (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:41,108] INFO Creating new log file: log.181 (org.apache.zookeeper.server.persistence.FileTxnLog)
[2018-07-25 01:51:41,111] ERROR Severe unrecoverable error, from thread : SyncThread:0 (org.apache.zookeeper.server.ZooKeeperCriticalThread)
java.io.FileNotFoundException: /tmp/zookeeper/version-2/log.181 (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
        at org.apache.zookeeper.server.persistence.FileTxnLog.append(FileTxnLog.java:209)
        at org.apache.zookeeper.server.persistence.FileTxnSnapLog.append(FileTxnSnapLog.java:314)
        at org.apache.zookeeper.server.ZKDatabase.append(ZKDatabase.java:470)
        at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:140)
[2018-07-25 01:51:41,113] INFO Thread SyncThread:0 exits, error code 1 (org.apache.zookeeper.server.ZooKeeperServerListenerImpl)
[2018-07-25 01:51:41,113] INFO SyncRequestProcessor exited! (org.apache.zookeeper.server.SyncRequestProcessor)
[2018-07-25 01:51:41,114] INFO Closed socket connection for client /127.0.0.1:40262 which had sessionid 0x164d034b9130000 (org.apache.zookeeper.server.NIOServerCnxn)
[2018-07-25 01:51:41,114] INFO NIOServerCnxn factory exited run method (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2018-07-25 01:51:41,115] INFO shutting down (org.apache.zookeeper.server.ZooKeeperServer)
[2018-07-25 01:51:41,115] INFO Shutting down (org.apache.zookeeper.server.SessionTrackerImpl)
[2018-07-25 01:51:41,115] INFO Shutting down (org.apache.zookeeper.server.PrepRequestProcessor)
[2018-07-25 01:51:41,115] INFO Shutting down (org.apache.zookeeper.server.SyncRequestProcessor)
[2018-07-25 01:51:41,115] INFO PrepRequestProcessor exited loop! (org.apache.zookeeper.server.PrepRequestProcessor)
[2018-07-25 01:51:41,115] INFO shutdown of request processor complete (org.apache.zookeeper.server.FinalRequestProcessor)
[2018-07-25 01:51:41,116] INFO Exiting normally (org.apache.zookeeper.server.ZooKeeperServerMain)

我不知道这是为什么突然出现的。 请看一下,帮我出去。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/34009
 
380 次点击  
分享到微博
文章 [ 1 ]  |  最新文章 2 年前
robot_alien
Reply   •   1 楼
robot_alien    1 年前

如果你仔细看你的日志,特别是, java.io.FileNotFoundException: /tmp/zookeeper/version-2/log.181 (Permission denied) 它讨论了datadir目录权限更改。 FYI dataDir 是在中指定的目录快照 zookeeper.properties 我想在你的情况下是: /tmp/zookeeper/... 某物。

你能在linux/putty上检查一下这个文件夹被授予了什么权限吗?看起来权限已经改变了,这导致了上述问题。 如果这对你有用,请告诉我。谢谢!