You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by "Alex.Chen" <on...@gmail.com> on 2017/03/29 07:36:04 UTC

cannot add cluster to zk

Hi, I am a new user for helix, and I try to add a cluster in zk, however, i
get error message as follow:


[root@MyCentOS7VM bin]# ./helix-admin.sh --zkSvr 192.168.149.150:2181
--addCluster fedis
Exception in thread "main" org.apache.helix.HelixException: cluster fedis
is not setup yet
at
org.apache.helix.manager.zk.ZKHelixAdmin.addStateModelDef(ZKHelixAdmin.java:773)
at
org.apache.helix.tools.ClusterSetup.addStateModelDef(ClusterSetup.java:346)
at org.apache.helix.tools.ClusterSetup.addCluster(ClusterSetup.java:157)
at
org.apache.helix.tools.ClusterSetup.processCommandLineArgs(ClusterSetup.java:1074)
at org.apache.helix.tools.ClusterSetup.main(ClusterSetup.java:1540)

my zk is zookeeper-3.4.6, I use follow cmd to start my zk

[lday@MyCentOS7VM ~]$ sudo sh zkServer.sh start
JMX enabled by default
Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
  arting zookeeper ... STARTED


and my zk log is as below:

2017-03-29 15:18:08,400 [myid:] - INFO  [main:NIOServerCnxnFactory@94] -
binding to port 0.0.0.0/0.0.0.0:2181
2017-03-29 15:18:30,808 [myid:] - INFO  [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection
from /192.168.149.150:50117
2017-03-29 15:18:30,813 [myid:] - INFO  [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish
new session at /192.168.149.150:50117
2017-03-29 15:18:30,815 [myid:] - INFO  [SyncThread:0:FileTxnLog@199] -
Creating new log file: log.ccc8
2017-03-29 15:18:30,825 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617]
- Established session 0x15b18edca690000 with negotiated timeout 30000 for
client /192.168.149.150:50117
2017-03-29 15:18:31,225 [myid:] - WARN  [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid
0x15b18edca690000, likely client has closed socket
        at
org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
        at
org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
        at java.lang.Thread.run(Thread.java:745)
2017-03-29 15:18:31,229 [myid:] - INFO  [NIOServerCxn.Factory:
0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for
client /192.168.149.150:50117 which had sessionid 0x15b
18edca690000

However, if i follow the instrument from helix quickstart page:

./start-standalone-zookeeper.sh 2181 &
./helix-admin.sh --zkSvr localhost:2181 --addCluster fedis

then the cluster fedis could be added

what's the difference between zkServer.sh and
start-standalone-zookeeper.sh,   do i need to change some setting when
using zookeeper-3.4.6?

any help are appreciated


alex.chen

Re: cannot add cluster to zk

Posted by "Alex.Chen" <on...@gmail.com>.
kshore,
     my zoo.cfg is attached. zk is still running after run addCluster,  i
use helix 0.6.7

zoo.cfg:
================================
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/opt/zookeeper-3.4.6/data
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=192.168.149.150:2888:3888

2017-03-29 15:48 GMT+08:00 kishore g <g....@gmail.com>:

> looks like Zookeeper is not configured properly. Can you paste the
> contents of /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg After you run
> addCluster command, is the zookeeper still up and running?
>
> which version of Helix are you using
>
> On Wed, Mar 29, 2017 at 12:36 AM, Alex.Chen <on...@gmail.com> wrote:
>
>> Hi, I am a new user for helix, and I try to add a cluster in zk, however,
>> i get error message as follow:
>>
>>
>> [root@MyCentOS7VM bin]# ./helix-admin.sh --zkSvr 192.168.149.150:2181
>> --addCluster fedis
>> Exception in thread "main" org.apache.helix.HelixException: cluster
>> fedis is not setup yet
>> at org.apache.helix.manager.zk.ZKHelixAdmin.addStateModelDef(ZK
>> HelixAdmin.java:773)
>> at org.apache.helix.tools.ClusterSetup.addStateModelDef(Cluster
>> Setup.java:346)
>> at org.apache.helix.tools.ClusterSetup.addCluster(ClusterSetup.java:157)
>> at org.apache.helix.tools.ClusterSetup.processCommandLineArgs(C
>> lusterSetup.java:1074)
>> at org.apache.helix.tools.ClusterSetup.main(ClusterSetup.java:1540)
>>
>> my zk is zookeeper-3.4.6, I use follow cmd to start my zk
>>
>> [lday@MyCentOS7VM ~]$ sudo sh zkServer.sh start
>> JMX enabled by default
>> Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
>>   arting zookeeper ... STARTED
>>
>>
>> and my zk log is as below:
>>
>> 2017-03-29 15:18:08,400 [myid:] - INFO  [main:NIOServerCnxnFactory@94] -
>> binding to port 0.0.0.0/0.0.0.0:2181
>> 2017-03-29 15:18:30,808 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
>> /0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection
>> from /192.168.149.150:50117
>> 2017-03-29 15:18:30,813 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
>> /0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new
>> session at /192.168.149.150:50117
>> 2017-03-29 15:18:30,815 [myid:] - INFO  [SyncThread:0:FileTxnLog@199] -
>> Creating new log file: log.ccc8
>> 2017-03-29 15:18:30,825 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617]
>> - Established session 0x15b18edca690000 with negotiated timeout 30000 for
>> client /192.168.149.150:50117
>> 2017-03-29 15:18:31,225 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0
>> /0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
>> EndOfStreamException: Unable to read additional data from client
>> sessionid 0x15b18edca690000, likely client has closed socket
>>         at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn
>> .java:228)
>>         at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServ
>> erCnxnFactory.java:208)
>>         at java.lang.Thread.run(Thread.java:745)
>> 2017-03-29 15:18:31,229 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
>> /0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /
>> 192.168.149.150:50117 which had sessionid 0x15b
>> 18edca690000
>>
>> However, if i follow the instrument from helix quickstart page:
>>
>> ./start-standalone-zookeeper.sh 2181 &
>> ./helix-admin.sh --zkSvr localhost:2181 --addCluster fedis
>>
>> then the cluster fedis could be added
>>
>> what's the difference between zkServer.sh and
>> start-standalone-zookeeper.sh,   do i need to change some setting when
>> using zookeeper-3.4.6?
>>
>> any help are appreciated
>>
>>
>> alex.chen
>>
>>
>>
>

Re: cannot add cluster to zk

Posted by kishore g <g....@gmail.com>.
looks like Zookeeper is not configured properly. Can you paste the contents
of /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg After you run addCluster
command, is the zookeeper still up and running?

which version of Helix are you using

On Wed, Mar 29, 2017 at 12:36 AM, Alex.Chen <on...@gmail.com> wrote:

> Hi, I am a new user for helix, and I try to add a cluster in zk, however,
> i get error message as follow:
>
>
> [root@MyCentOS7VM bin]# ./helix-admin.sh --zkSvr 192.168.149.150:2181
> --addCluster fedis
> Exception in thread "main" org.apache.helix.HelixException: cluster fedis
> is not setup yet
> at org.apache.helix.manager.zk.ZKHelixAdmin.addStateModelDef(ZK
> HelixAdmin.java:773)
> at org.apache.helix.tools.ClusterSetup.addStateModelDef(Cluster
> Setup.java:346)
> at org.apache.helix.tools.ClusterSetup.addCluster(ClusterSetup.java:157)
> at org.apache.helix.tools.ClusterSetup.processCommandLineArgs(C
> lusterSetup.java:1074)
> at org.apache.helix.tools.ClusterSetup.main(ClusterSetup.java:1540)
>
> my zk is zookeeper-3.4.6, I use follow cmd to start my zk
>
> [lday@MyCentOS7VM ~]$ sudo sh zkServer.sh start
> JMX enabled by default
> Using config: /opt/zookeeper-3.4.6/bin/../conf/zoo.cfg
>   arting zookeeper ... STARTED
>
>
> and my zk log is as below:
>
> 2017-03-29 15:18:08,400 [myid:] - INFO  [main:NIOServerCnxnFactory@94] -
> binding to port 0.0.0.0/0.0.0.0:2181
> 2017-03-29 15:18:30,808 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
> /0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from
> /192.168.149.150:50117
> 2017-03-29 15:18:30,813 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
> /0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new
> session at /192.168.149.150:50117
> 2017-03-29 15:18:30,815 [myid:] - INFO  [SyncThread:0:FileTxnLog@199] -
> Creating new log file: log.ccc8
> 2017-03-29 15:18:30,825 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617]
> - Established session 0x15b18edca690000 with negotiated timeout 30000 for
> client /192.168.149.150:50117
> 2017-03-29 15:18:31,225 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0
> /0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
> EndOfStreamException: Unable to read additional data from client sessionid
> 0x15b18edca690000, likely client has closed socket
>         at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn
> .java:228)
>         at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServ
> erCnxnFactory.java:208)
>         at java.lang.Thread.run(Thread.java:745)
> 2017-03-29 15:18:31,229 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0
> /0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /
> 192.168.149.150:50117 which had sessionid 0x15b
> 18edca690000
>
> However, if i follow the instrument from helix quickstart page:
>
> ./start-standalone-zookeeper.sh 2181 &
> ./helix-admin.sh --zkSvr localhost:2181 --addCluster fedis
>
> then the cluster fedis could be added
>
> what's the difference between zkServer.sh and
> start-standalone-zookeeper.sh,   do i need to change some setting when
> using zookeeper-3.4.6?
>
> any help are appreciated
>
>
> alex.chen
>
>
>