启动zookeeper报错already running as process

今天启动zookeeper的时候报错:

[[email protected] zookeeper-3.4.5]# bin/zkServer.sh start
JMX enabled by default
Using config: /root/zookeeper/zookeeper-3.4.5/bin/../conf/zoo.cfg
Starting zookeeper ... already running as process 947..

看了下947这个进程,发现是linux系统进程,应该不会冲突。又检查了下zookeeper会使用到的几个端口号,也都没有被占用。

后来打开bin/zkServer.sh启动脚本,搜了下会抛出上面那段话的地方:

    echo  -n "Starting zookeeper ... "
    if [ -f $ZOOPIDFILE ]; then
      if kill -0 `cat $ZOOPIDFILE` > /dev/null 2>&1; then
         echo $command already running as process `cat $ZOOPIDFILE`.
         exit 0
      fi
    fi

看到$ZOOPIDFILE,想到应该是进程ID文件已经存在,导致启不起来。

去dataDir下看,果然有一个zookeeper_server.pid,最后一次修改时间是几天前了。由于机器上次是因为断电异常关闭,大概导致了这个pid file的残留。

删掉,重启,OK。

时间: 2024-10-26 20:50:59

启动zookeeper报错already running as process的相关文章

【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.

idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration. 注意: 最简单的方法,就是你重新创建一个新的测试类,在里面重新写一遍测试方法,代码都可以粘贴过去. 解决方法: 1.打开本项目的.idea文件夹,找到文件夹中的workspace.xml文件 2.搜索 Proper

liunx启动mongodb报错 mongodb child process failed, exited with error number 14

mongodb启动报错:mongodb child process failed, exited with error number 14,查看mongodb.cnf日志,发现其中有一条:Too many open files at src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp 79. 设置ulimit -n 10000.完美! 原文地址:https://www.cnblogs.com/shilang/p/1019748

Node升级 启动RN报错:react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that

1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle

ceph升级到10.2.3 版本启动服务报错:Unknown lvalue 'TasksMax' in section 'Service'

#### ceph软件包升级完成,执行命令重启服务 sudo systemctl restart [email protected]"$HOSTNAME" #### 故障现象 服务可以启动,启动后显示有报错信息: Nov 23 17:14:45 ceph-6-12 systemd[1]:        [/usr/lib/systemd/system/[email protected]:18] Unknown lvalue 'TasksMax' in section 'Service'

(转)启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结

启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结 原文:http://blog.51cto.com/11863547/1905929 http://blog.csdn.net/debimeng/article/details/74296152?utm_source=itdadao&utm_medium=referral Failed to start LSB: Bring up/down networking 遇到这个错误好

Address localhost:1099 is already in use(IDEA启动Tomcat报错1099 is already in use)

IDEA中启动Tomcat报错,Error running Tomcat7.0.52: Address localhost:1099 is already in use 或者是 java.rmi.server.ExportException: Port already in use: 1099 ,表示1099端口被其他进程占用了. 解决方法: 1. win+R,运行,输入cmd,进入命令提示符 2. 输入netstat -aon | findstr 1099,找到占用1099端口的进程ID:PI

启动网卡报错Failed to start LSB: Bring up/down network

启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结 centos7.5 操作系统安装到vmware后,修改网卡配置启动报错.具体的报错提示如下:[root@centos7 ~]# systemctl restart networkJob for network.service failed because the control process exited with error code. See "systemctl st

windows平台在tomcat中启动cas报错解决

windows平台在tomcat中启动cas报错: Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path, 系统找不到指定的路径.] 解决办法:将jansi.dll文件放到C:\Windows\System32目录下即可. 注意:jansi.dll文件在使用gradle编译打包cas时会下载到C:\Users\${用户名}\.gradle

436启动cman报错

rhel6.2启动cman报错 Waiting for quorum... Timed-out waiting for cluster 解决方法: 修改/etc/init.d/cman配置文件 vim /etc/init.d/cman CMAN_QUORUM_TIMEOUT=45 改为 CMAN_QUORUM_TIMEOUT=0 然后重启cman即可