[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588467#comment-14588467
 ] 

Alex Elent commented on ZOOKEEPER-2095:
---------------------------------------

Not sure if relevant but I was not able to get systemd working with Zookeeper 
without adding "Type=forking"

This is my final config:

{noformat}
[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
{noformat}

> Add Systemd startup/conf files
> ------------------------------
>
>                 Key: ZOOKEEPER-2095
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2095
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: contrib
>            Reporter: Guillaume ALAUX
>            Priority: Minor
>         Attachments: ZOOKEEPER-2095.patch
>
>
> As adoption of systemd by distributions grows, it would be nice to have 
> systemd configuration and startup files for Zookeeper in the upstream tree. I 
> would thus like to contribute the following patch which brings the followings 
> systemd files:
> - {{sysusers.d_zookeeper.conf}}: creates {{zookeeper}} Linux system user to 
> run Zookeeper
> - {{tmpfiles.d_zookeeper.conf}}: creates temporary {{/var/log/zookeeper}} and 
> {{/var/lib/zookeeper} directories
> - {{zookeeper.service}}: regular systemd startup _script_
> - {{zookeeper@.service}}: systemd startup _script_ for specific use (for 
> instance when Zookeeper is invoked to support some other piece of software – 
> [example for 
> Kafka|http://pkgbuild.com/git/aur-mirror.git/tree/kafka/systemd_kafka.service#n3],
>  [example for 
> Storm|http://pkgbuild.com/git/aur-mirror.git/tree/storm/systemd_storm-nimbus.service#n3])



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to