zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adrien ruffie <adriennolar...@hotmail.fr>
Subject zookeeper as systemd
Date Fri, 13 Jul 2018 15:30:11 GMT
Hello Zookeeper's users,


I have 2 questions for you.


what is the real difference between these 2 following commands ? (I don't find any documentation)


zkServer.sh start-foreground

and

zkServer.sh start



My second question is, how I can correctly start my zookeeper as a systemclt service ?

What is the common best template to write into /etc/systemd/system/zookeeper.service ?

Do you use Restart=always ? RestartSec=0s ?

What is "After=network.target" ?

If my Zookeeper does not really start in 300 sec, the process will be shutdown ?


Do you have any example of zookeeper service file ?


Because our zookeeper.service is right now:


[Unit]
Description=ZooKeeper

[Service]
Type=simple
User=zookeeper
Group=zookeeper
ExecStart=/usr/local/zookeeper-3.4.9/bin/zkServer.sh start-foreground

TimeoutSec=300

[Install]
WantedBy=multi-user.target

------------------- But I found this following on a blog:


[Unit]
Description=Apache Zookeeper
After=network.target

[Service]
Type=forking
User=zookeeper
Group=zookeeper
SyslogIdentifier=zookeeper
Restart=always
RestartSec=0s
ExecStart=/usr/bin/zookeeper-server start
ExecStop=/usr/bin/zookeeper-server stop
ExecReload=/usr/bin/zookeeper-server restart

[Install]
WantedBy=multi-user.target


Thank you very much and best regards

Adrien

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message