[
https://issues.apache.org/jira/browse/TINKERPOP-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16943754#comment-16943754
]
Robert Dale commented on TINKERPOP-2289:
----------------------------------------
Java has a built-in mechanism [1] to disable IPv6 which would give you only one
address.
{code:java}
$ groovysh
groovy:000> InetAddress.getAllByName("localhost")
===> [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1]
$ groovysh -Djava.net.preferIPv4Stack=true
groovy:000> InetAddress.getAllByName("localhost")
===> [localhost/127.0.0.1]
{code}
I'm not sure I would try to "fix" it beyond this.
1.
https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html
> Use address instead of hostname for connection
> ----------------------------------------------
>
> Key: TINKERPOP-2289
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2289
> Project: TinkerPop
> Issue Type: Bug
> Components: driver
> Affects Versions: 3.4.3
> Reporter: Hua Jiang
> Assignee: Stephen Mallette
> Priority: Minor
> Fix For: 3.5.0, 3.3.9, 3.4.4
>
>
> The current implementation uses hostname to create connections. It causes two
> problems in a scenario where multiple addresses are bound to the same domain
> name.
> # Load balancing is broken because multiple `Host` may connect to the same
> address, and some addresses may have no connection at all.
> # It produces misleading log messages because the address in the host label
> may not be the one the host is actually connected to.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)