zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Pruitt <bpru...@opentext.com>
Subject RE: [EXTERNAL] - Re: multiple servers on localhost
Date Mon, 28 Aug 2017 12:29:43 GMT
Yep.  I eventually broke the ZK into three separate folders and launched 3 ZK's successfully.
 They found each other, elected a leader, etc.
I then got a Solr Collection defined and connected.
This was all to get past the initial ZK learning curve.  Next, up is doing same on separate
VM's today's mission statement.  :>)

I would like to find a source to help decipher ZK logs, they are a bit obscure.

Thanks for your help.

-S

-----Original Message-----
From: Abraham Fine [mailto:afine@apache.org] 
Sent: Friday, August 25, 2017 2:57 PM
To: user@zookeeper.apache.org
Subject: Re: [EXTERNAL] - Re: multiple servers on localhost

Hey Steve-

I'm not much of a batch scripting expert but my guess here is that the zkServer.cmd is not
behaving as expected.

It does not appear take the same arguments as zkServer.sh does. This has been an issue for
quite a while, see:
https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_ZOOKEEPER-2D1122&d=DwICaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=ksx9qnQFG3QvxkP54EBPEzv1HHDjlk-MFO-7EONGCtY&m=0KRaSnJZ4ViP1zm5OORDCLBWQ9pTQVZHT4Bg0M6gows&s=7ptw4zip2btMk1phHWXkq1mamLEOeCo6Nbq0iIlHZ70&e=


Reading through the scripts it doesn't look like zkServer.cmd takes any input, it just uses
the default cfg all the time. Would you be able to try launching ZooKeeper without using the
script. Alternatively, I think you could try modifying the zkEnv.cmd to point to the zoo1.cfg
file (replace "set ZOOCFG=%ZOOCFGDIR%\zoo.cfg").

Thanks,
Abe

On Fri, Aug 25, 2017, at 04:31, Steve Pruitt wrote:
> No, sorry.  For brevity's sake, I thought that snippet was enough.  
> Here is the full stack.  The mystery to me is why the error message 
> refers to zoo.cfg.
> 
> My startup command references a different cfg file.
> 
> C:\Servers\zookeeper-3.4.6\bin>zkServer.cmd start zoo1.cfg
> 
> 2017-08-25 07:25:12,555 [myid:] - ERROR [main:ZooKeeperServerMain@54] 
> - Invalid arguments, exiting abnormally
> java.lang.NumberFormatException: For input string:
> "C:\Servers\zookeeper-3.4.6\bin\..\conf\zoo.cfg"
>         at java.lang.NumberFormatException.forInputString(Unknown Source)
>         at java.lang.Integer.parseInt(Unknown Source)
>         at java.lang.Integer.parseInt(Unknown Source)
>         at
>         org.apache.zookeeper.server.ServerConfig.parse(ServerConfig.java:60)
>         at
>         org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:83)
>         at
>         org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
>         at
>         org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
>         at
>         
> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.
> java:78)
> 2017-08-25 07:25:12,558 [myid:] - INFO  [main:ZooKeeperServerMain@55] 
> -
> Usage: ZooKeeperServerMain configfile | port datadir [ticktime] 
> [maxcnxns]
> Usage: ZooKeeperServerMain configfile | port datadir [ticktime] 
> [maxcnxns]
> 
> -----Original Message-----
> From: Abraham Fine [mailto:afine@apache.org]
> Sent: Thursday, August 24, 2017 2:27 PM
> To: user@zookeeper.apache.org
> Subject: [EXTERNAL] - Re: multiple servers on localhost
> 
> Hi Steve-
> 
> Is that the entire stack trace?
> 
> Abe
> 
> On Thu, Aug 24, 2017, at 10:59, Steve Pruitt wrote:
> > I am in ZK learn mode.  I followed a setup I found for an initial ZK 
> > ensemble evaluation setup for running on same machine (Windows).  
> > Once I know a bit more I plan to push the setup to different VM's.
> > 
> > I think the setup I ofund is no longer valid for version 3.4.6.
> > 
> > The data dir's were created as below, each with the myid file set to
> > 1,2,3 respectively:
> > C:\ProgramData\ZooKeeper\1\data
> > C:\ProgramData\ZooKeeper\2\data
> > C:\ProgramData\ZooKeeper\3\data
> > 
> > In the zookeeper-3.4.6\conf folder I have zoo1.cfg, zoo2.cfg, zoo3.cfg. 
> > They all look as below.  But, I incremented the folder name (2 and 
> > 3) and incremented all port numbers in each cfg file.
> > 
> > dataDir=/ProgramData/ZooKeeper/1/data
> > # the port at which the clients will connect
> > clientPort=2181
> > server.1=localhost:2888:3888
> > server.2=localhost:2889:3889
> > server.3=localhost:2890:3890
> > 
> > Next, I tried executing ZK via:  zkServer.cmd start zoo1.cfg.  
> > Startup fails and I get:
> > 
> > [myid:] - ERROR [main:ZooKeeperServerMain@54] - Invalid arguments, 
> > exiting abnormally
> > java.lang.NumberFormatException: For input string:
> > "C:\Servers\zookeeper-3.4.6\bin\..\conf\zoo.cfg"
> >         at java.lang.NumberFormatException.forInputString(Unknown 
> > Source)
> > 
> > 
> > Looking online it looks like this setup is no longer supported.  You 
> > can't pass the cfg file as an argument.  Is the only way to have all 
> > ZK's running on same machine a separate folder for each server?
> > 
> > Next, I plan to run SolrCloud with my setup.
> > 
> > Thanks.
> > 
> > -S
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
Mime
View raw message