You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Raghav <ra...@gmail.com> on 2017/08/20 19:14:30 UTC

Zookeeper settings question - Help Needed

Hi

Can someone please tell me if I can use multi server setup config/zoo.cfg
with just 1 server or is it must to have more than 1 zk server for a multi
server setup ?

I have been unsuccessful so far trying to get a 1 node zookeeper server to
work. My settings are as follows as I don't have more servers at the moment.

tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888


Thanks.

-- 
Raghav

Re: Zookeeper settings question - Help Needed

Posted by Raghav <ra...@gmail.com>.
Thanks Sumit. This helped. Really appreciate your help.

On Sun, Aug 20, 2017 at 1:05 PM, sumit monga <sk...@gmail.com> wrote:

> Edit for my above reply, if dataDir is at /var/lib/zookeeper/ , then place
> the myid file at /var/lib/zookeeper/myid and try to start zookeeper server.
>
> On Mon, Aug 21, 2017 at 1:13 AM, sumit monga <sk...@gmail.com>
> wrote:
>
> > @Raghav - Have u created inside the dataDir directory , a data directory
> > with file myid that contains the server id which in your case will be 1
> as
> > you are specifying server.1 in the config file. So your dataDir structure
> > will contain a file at the path like /var/lib/zookeeper/data/myid which
> > will contain 1 as your server id. Give it a try.
> >
> > - Sumit
> >
> > On Mon, Aug 21, 2017 at 12:44 AM, Raghav <ra...@gmail.com> wrote:
> >
> >> Hi
> >>
> >> Can someone please tell me if I can use multi server setup
> config/zoo.cfg
> >> with just 1 server or is it must to have more than 1 zk server for a
> multi
> >> server setup ?
> >>
> >> I have been unsuccessful so far trying to get a 1 node zookeeper server
> to
> >> work. My settings are as follows as I don't have more servers at the
> >> moment.
> >>
> >> tickTime=2000
> >> dataDir=/var/lib/zookeeper/
> >> clientPort=2181
> >> initLimit=5
> >> syncLimit=2
> >> server.1=zoo1:2888:3888
> >>
> >>
> >> Thanks.
> >>
> >> --
> >> Raghav
> >>
> >
> >
>



-- 
Raghav

Re: Zookeeper settings question - Help Needed

Posted by sumit monga <sk...@gmail.com>.
Edit for my above reply, if dataDir is at /var/lib/zookeeper/ , then place
the myid file at /var/lib/zookeeper/myid and try to start zookeeper server.

On Mon, Aug 21, 2017 at 1:13 AM, sumit monga <sk...@gmail.com> wrote:

> @Raghav - Have u created inside the dataDir directory , a data directory
> with file myid that contains the server id which in your case will be 1 as
> you are specifying server.1 in the config file. So your dataDir structure
> will contain a file at the path like /var/lib/zookeeper/data/myid which
> will contain 1 as your server id. Give it a try.
>
> - Sumit
>
> On Mon, Aug 21, 2017 at 12:44 AM, Raghav <ra...@gmail.com> wrote:
>
>> Hi
>>
>> Can someone please tell me if I can use multi server setup config/zoo.cfg
>> with just 1 server or is it must to have more than 1 zk server for a multi
>> server setup ?
>>
>> I have been unsuccessful so far trying to get a 1 node zookeeper server to
>> work. My settings are as follows as I don't have more servers at the
>> moment.
>>
>> tickTime=2000
>> dataDir=/var/lib/zookeeper/
>> clientPort=2181
>> initLimit=5
>> syncLimit=2
>> server.1=zoo1:2888:3888
>>
>>
>> Thanks.
>>
>> --
>> Raghav
>>
>
>

Re: Zookeeper settings question - Help Needed

Posted by sumit monga <sk...@gmail.com>.
@Raghav - Have u created inside the dataDir directory , a data directory
with file myid that contains the server id which in your case will be 1 as
you are specifying server.1 in the config file. So your dataDir structure
will contain a file at the path like /var/lib/zookeeper/data/myid which
will contain 1 as your server id. Give it a try.

- Sumit

On Mon, Aug 21, 2017 at 12:44 AM, Raghav <ra...@gmail.com> wrote:

> Hi
>
> Can someone please tell me if I can use multi server setup config/zoo.cfg
> with just 1 server or is it must to have more than 1 zk server for a multi
> server setup ?
>
> I have been unsuccessful so far trying to get a 1 node zookeeper server to
> work. My settings are as follows as I don't have more servers at the
> moment.
>
> tickTime=2000
> dataDir=/var/lib/zookeeper/
> clientPort=2181
> initLimit=5
> syncLimit=2
> server.1=zoo1:2888:3888
>
>
> Thanks.
>
> --
> Raghav
>