Yes thanks, Aniruddha.

I was able to dig in the startup scripts and make sure I pass:

-Djava.net.preferIPv4Stack=true

That was the key to my issue.

-----Original Message-----
From: Aniruddha Laud [mailto:[email protected]] 
Sent: Wednesday, August 29, 2012 11:50 AM
To: [email protected]
Subject: Re: JRE 7 compatibility?

I think the issue is with zookeeper and IPV6, not netty. A simple fix in your 
situation would be to use 127.0.0.1 instead of localhost (which is resolved to 
the ipv6 address), or force usage of ipv4 (the way it's done in the startup 
scripts).

On Tue, Aug 28, 2012 at 8:54 PM, Adam Lacey <[email protected]> wrote:

> I'm wondering about the compatibility of the bookkeeper and hedwig 
> projects (and other dependencies) with JRE 7.
>
> I'm wondering about this because of a multiple low level socket 
> connection error I get when I try to run the 'localbookie' bookkeeper 
> instance, and a Hedwig hub and have connections between them.
>
> There are multiple errors - but the main one happens in Hedwig main 
> trying to connect to a bookie instance: address family not supported.  
> Another sample error message:
>
> 2012-08-28 17:51:58,369 - INFO  - [main:Environment@98] - Client 
> environment:java.io.tmpdir=C:\Users\alacey\AppData\Local\Temp\
> 2012-08-28 17:51:58,370 - INFO  - [main:Environment@98] - Client 
> environment:java.compiler=<NA>
> 2012-08-28 17:51:58,371 - INFO  - [main:Environment@98] - Client 
> environment:os.name=Windows 7
> 2012-08-28 17:51:58,371 - INFO  - [main:Environment@98] - Client
> environment:os.arch=amd64
> 2012-08-28 17:51:58,372 - INFO  - [main:Environment@98] - Client
> environment:os.version=6.1
> 2012-08-28 17:51:58,372 - INFO  - [main:Environment@98] - Client 
> environment:user.name=alacey
> 2012-08-28 17:51:58,373 - INFO  - [main:Environment@98] - Client 
> environment:user.home=C:\Users\alacey
> 2012-08-28 17:51:58,373 - INFO  - [main:Environment@98] - Client
> environment:user.dir=C:\projects\PubSub\bookkeeper-src\branches\branch
> -4.1
> 2012-08-28 17:51:58,375 - INFO  - [main:ZooKeeper@433] - Initiating 
> client connection, connectString=localhost:2181 sessionTimeout=2000 
> watcher=org.apache.hedwig.admin.HedwigAdmin$MyWatcher@1fff7a1e
> 2012-08-28 17:51:58,381 - DEBUG - [main:ClientCnxn@99] - 
> zookeeper.disableAutoWatchReset is false
> 2012-08-28 17:51:58,411 - DEBUG - [main:HedwigAdmin@90] - Connecting 
> to zookeeper localhost:2181, timeout = 2000
> 2012-08-28 17:51:58,429 - INFO  -
> [main-SendThread():ClientCnxn$SendThread@933] - Opening socket 
> connection to server /0:0:0:0:0:0:0:1:2181
> 2012-08-28 17:51:58,446 - ERROR - [main:BookKeeper@198] - Unconnected 
> zookeeper handle passed to bookkeeper Exception in thread "main" 
> java.io.IOException:
> org.apache.zookeeper.KeeperException$ConnectionLossException:
> KeeperErrorCode = ConnectionLoss
>         at
> org.apache.hedwig.admin.console.HedwigConsole.<init>(HedwigConsole.java:825)
>         at
> org.apache.hedwig.admin.console.HedwigConsole.main(HedwigConsole.java:
> 1039) Caused by: 
> org.apache.zookeeper.KeeperException$ConnectionLossException:
> KeeperErrorCode = ConnectionLoss
>         at
> org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
>         at
> org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:199)
>         at
> org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:171)
>         at org.apache.hedwig.admin.HedwigAdmin.<init>(HedwigAdmin.java:95)
>         at
> org.apache.hedwig.admin.console.HedwigConsole.<init>(HedwigConsole.java:822)
>         ... 1 more
>
> I am running this on Windows 7.
>
> I understand there is a known issue in Netty with IPv6 - and that this 
> is resolved with JRE 7.
>
> I am trying to get a test instance of Hedwig up and running, and would 
> very much like to utilize Hedwig in a mixed Windows/Linux environment 
> as a pub/sub solution.
>
> Could anyone offer any advice on using Hedwig with either Windows, 
> with what seems to be an IPv6 issue in Netty?
>
> Appreciate the help!
>
> -Adam
>

Reply via email to