Answer the question
In order to leave comments, you need to log in
Why doesn't Zookeper want to go up as a service?
Good afternoon, I'm trying to create a Zookeper service in Centos 7.
When manually launched from the console, ZK starts and I can connect to it using zkCli.sh.
However, when I register in the service, then ZK starts and immediately cuts down.
Redirecting to /bin/systemctl status zookeper.service
● zookeper.service - zookeper
Loaded: loaded (/etc/systemd/system/zookeper.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2020-06-25 12:21:50 MSK; 30s ago
Process: 2184 ExecStart=/opt/zookeper/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start (code=exited, status=0/SUCCESS)
Main PID: 2184 (code=exited, status=0/SUCCESS)
Jun 25 12:21:49 zookeeper.3sis systemd[1]: Started zookeper.
Jun 25 12:21:49 zookeeper.3sis zkServer.sh[2184]: /usr/bin/java
Jun 25 12:21:49 zookeeper.3sis zkServer.sh[2184]: ZooKeeper JMX enabled by default
Jun 25 12:21:49 zookeeper.3sis zkServer.sh[2184]: Using config: /opt/zookeper/apache-zookeeper-3.6.1-bin/bin/../conf/zoo.cfg
Jun 25 12:21:50 zookeeper.3sis zkServer.sh[2184]: Starting zookeeper ... STARTED
[Unit]
Description=zookeper
After=syslog.target
[Service]
Type=simple
TimeoutStartSec=10min
ExecStart=/opt/zookeper/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Answer the question
In order to leave comments, you need to log in
ExecStart=/opt/zookeeper/bin/zkServer.sh --config /etc/opt/zookeeper start-foreground
ExecStop=/opt/zookeeper/bin/zkServer.sh --config /etc/opt/zookeeper stop
ExecReload=/opt/zookeeper/bin/zkServer.sh --config /etc/opt/zookeeper restart
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question