zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erhhung Yuan" <erhh...@gmail.com>
Subject Cannot (re)start ZooKeeper via zkServer.sh over PLINK
Date Thu, 02 Feb 2012 01:13:29 GMT
I have a working ZooKeeper 3.3.3 installed on a standard
32-bit Amazon EC2 Linux AMI, and the server starts fine
with the following line added to my /etc/rc.local script:

/var/lib/zookeeper/bin/zkServer.sh start

I'm managing the server over SSH on Windows over PuTTY,
and everything works wonderfully. However, I'd like to
automate basic admin tasks via scripts, so I use PLINK
to login and run the zkServer.sh script with restart:

plink.exe -t -I key.ppk ec2-user@ec-host
    sudo /var/lib/zookeeper/bin/zkServer.sh restart

PLINK connects fine using this command, and I get this
encouraging output:

JMX enabled by default
Using config: /var/lib/zookeeper/bin/../conf/zoo.cfg
JMX enabled by default
Using config: /var/lib/zookeeper/bin/../conf/zoo.cfg
Stopping zookeeper ...
/var/lib/zookeeper/bin/zkServer.sh: line 90: kill:
   (3877) - No such process
JMX enabled by default
Using config: /var/lib/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ...

However, when PLINK connection ends right afterwards,
I don't see the java process running. I'm able to use
PLINK to manage many other services that are normally
controlled using the 'service' command, so is there
something I need to do different to run java from a
PLINK connection? The -t option is supposed to supply
pseudo TTY (sudo won't even work without a TTY), but
zkServer.sh works fine over a PuTTY session, after I
exit and reconnect.

View raw message