Error already running as process when zookeeper is started

Source: Internet
Author: User

When zookeeper is started today, the following error occurs:

[Root @ hadoop-one 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 ..

After reading the process 947, we found that it was a Linux system process and there should be no conflict. Check several port numbers that zookeeper will use, and they are not in use.

Later, open the bin/zkserver. Sh STARTUP script and search for the above part:

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

When you see $ zoopidfile, you may think that the process ID file already exists, and the file cannot be started.

Go to datadir and check that there is a zookeeper_server.pid. The last modification time is a few days ago. The last time the machine was shut down due to an abnormal power failure, This PID file may be left behind.

Delete, restart, and OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.