You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/19 07:27:02 UTC

[GitHub] [zookeeper] kylixs opened a new pull request #1509: fix address parsing error on java 14/15

kylixs opened a new pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509


   `InetSocketAddress.toString()` is changed from java 14,  unresovled address is format as `127.0.0.1/<unresolved>:2181`, the `org.apache.zookeeper.client.StaticHostProvider#getHostString`  parsing failed:
   
   ```java
        String addrString = addr.toString();
        hostString = addrString.substring(0, addrString.lastIndexOf(':'));
   ```
   
   ```
   [19/10/20 03:18:53:053 CST] main-SendThread(127.0.0.1:2181)  INFO zookeeper.ClientCnxn: Opening socket connection to server 127.0.0.1/<unresolved>:2181. Will not attempt to authenticate using SASL (unknown error)
   [19/10/20 03:18:53:053 CST] main-SendThread(127.0.0.1:2181)  WARN zookeeper.ClientCnxn: Session 0x0 for server 127.0.0.1/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect
   java.nio.channels.UnresolvedAddressException
   	at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
   	at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
   	at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:753)
   	at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:774)
   	at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
   	at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
   	at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1021)
   	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1064)
   ```
   
   When the address is unresovled, it should be resolved from the hostname.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] ctubbsii commented on pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509#issuecomment-712337397


   @eolivelli I believe this was fixed in newer versions, but I'm not sure which version it was fixed in. In case this affects other users, who happen across this issue, do you have a link to the issue that fixed it in newer versions?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509#issuecomment-711792477


   I am sorry, but 3.4 is EOL, we are no more accepting patches and/or making releases.
   
   Please update to 3.5.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509#issuecomment-712398339


   I don't know exactly, the network stack changed between 3.4 and 3.5 and 3.5 was in BETA status for years.
   Probably the new simply does not suffer from this problem, and there was not a direct fix for it.
   Simply we found that 3.5 was not affected by this issue.
   
   The suggestion is to switch to 3.6.2 client, it should work out-of-the-box with 3.4 servers (if you do not use new features)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli closed pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
eolivelli closed pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] eolivelli commented on pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509#issuecomment-711792667


   btw, thanks for your patch :-) 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] kylixs commented on pull request #1509: fix address parsing error on java 14/15

Posted by GitBox <gi...@apache.org>.
kylixs commented on pull request #1509:
URL: https://github.com/apache/zookeeper/pull/1509#issuecomment-712541690


   Relative issuse: https://github.com/apache/dubbo/issues/6755
   Some projects, like [dubbo](https://github.com/apache/dubbo) , 
   still use zookeeper 3.4.x, because of compatibility issues, it is not easy to upgrade to 3.5.x .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org