Ashwath created ZOOKEEPER-2773:
----------------------------------

             Summary: zookeeper-service
                 Key: ZOOKEEPER-2773
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2773
             Project: ZooKeeper
          Issue Type: Bug
          Components: quorum
    Affects Versions: 3.4.10
         Environment: Linux
            Reporter: Ashwath
             Fix For: 3.4.10


Hi
I run zookeeper in 3 Linux Machines. 

1.I downloaded zookeeper-3.4.10.jar file and extracted that.
2.I copy zoo_sample to zoo.cfg and edited datadir and added 3 ip address.
3.I created a new file called myid and insert numbers into that.
Now I am running zookeeper cluster successfully..but

When I am trying to run it as a service I am getting following error

zookeeper.service - Apache ZooKeeper
  Loaded: loaded (/lib/systemd/system/zookeeper.service; disabled; vendor 
preset: enabled)
  Active: activating (auto-restart) (Result: exit-code) since Wed 2017-05-03 
09:56:28 IST; 1s ago
 Process: 678 ExecStart=/home/melon/software/ZooKeeper/zk/bin/zkServer.sh 
start-foreground (code=exited
Main PID: 678 (code=exited, status=127)

May 03 09:56:28 deds14 systemd[1]: zookeeper.service: Unit entered failed state.
May 03 09:56:28 deds14 systemd[1]: zookeeper.service: Failed with result 
'exit-code'.

Here the code I added

Unit]
Description=Apache ZooKeeper
After=network.target
ConditionPathExists=/home/melon/software/ZooKeeper/zookeeper-3.4.10-beta/conf/zoo.cfg
ConditionPathExists=/home/melon/software/ZooKeeper/zookeeper-3.4.10-beta/conf/log4j.properties

[Service]
Environment="ZOOCFGDIR=/home/melon/software/ZooKeeper/zookeeper-3.4.10-beta/conf"
SyslogIdentifier=zookeeper
WorkingDirectory=/home/melon/software/ZooKeeper
ExecStart=/home/melon/software/ZooKeeper/zookeeper-3.4.10-beta/bin/zkServer.sh 
start-foreground
Restart=on-failure
RestartSec=20
User=root
Group=root

Thank you




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to