D
D
DDwrt1002020-06-25 12:26:34
CentOS
DDwrt100, 2020-06-25 12:26:34

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


Here is what is written in zookeper.service
[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


What could be the problem ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nicknme, 2021-07-16
@nicknme

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

https://gist.github.com/martinhynar/286dee76f4a5f3...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question