java.net.SocketException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • puppet server's core components all assume that when they talk to the out-side world, they'll be talking IPv4 only. All of our internal machines are IPv6 only, so they resolve things like updates.puppetlabs.com and rubygems.org either directly to IPv6, or indirectly via DNS64 and NAT64. The first symptom of something being off is that puppetserver takes a long time to start up, and we only see in the debug log why: {code} 2015-02-26 17:26:46,048 DEBUG [p.s.v.version-check-core] Could not retrieve update information (http://updates.puppetlabs.com) java.net.SocketException: Network is unreachable at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_31] at sun.nio.ch.Net.connect(Net.java:457) ~[na:1.8.0_31] at sun.nio.ch.Net.connect(Net.java:449) ~[na:1.8.0_31] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647) ~[na:1.8.0_31] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:272) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:141) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] {code} the second can be seen when trying to install a gem: {code} igalic@puppet01 ~ % sudo -H /usr/bin/puppetserver gem install hiera-file ERROR: Could not find a valid gem 'hiera-file' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SocketError: Network is unreachable (https://rubygems.org/latest_specs.4.8.gz) sudo -H /usr/bin/puppetserver gem install hiera-file 13,43s user 0,31s system 182% cpu 7,511 total igalic@puppet01 ~ % {code} i'd like to be able to tell puppetserver to prefer ipv6. putting that intent in the form of {{JAVA_ARGS="-Xms2g -Xmx2g -Djava.net.preferIPv6Addresses=true"}} into {{/etc/default/puppetserver}} doesn't seem to suffice: startup: {code} 2015-02-26 17:34:56,866 DEBUG [p.s.v.version-check-core] Could not retrieve update information (http://updates.puppetlabs.com) java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_31] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716) ~[na:1.8.0_31] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:189) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38) ~[puppet-server-release.jar:na] at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57) ~[puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] {code} gem: {code} igalic@puppet01 ~ % sudo -H /usr/bin/puppetserver gem install hiera-file ERROR: Could not find a valid gem 'hiera-file' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SocketError: Network is unreachable (https://rubygems.org/latest_specs.4.8.gz) sudo -H /usr/bin/puppetserver gem install hiera-file 13,97s user 0,33s system 187% cpu 7,637 total igalic@puppet01 ~ % {code}
    via by Igor Galić,
  • GitHub comment 85#65404836
    via GitHub by hadisotudeh
    ,
  • GitHub comment 86#65792471
    via GitHub by hadisotudeh
    ,
  • Logstash not connecting elasticsearch?
    via by Siddharth Trikha,
  • Logstash not connecting elasticsearch?
    via by Siddharth Trikha,
  • java.net.SocketException: Network is unreachable
    via by Unknown author,
    • java.net.SocketException: Network is unreachable at sun.nio.ch.Net.connect0(Native Method)[na:1.8.0_31] at sun.nio.ch.Net.connect(Net.java:457)[na:1.8.0_31] at sun.nio.ch.Net.connect(Net.java:449)[na:1.8.0_31] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)[na:1.8.0_31] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:272)[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:141)[puppet-server-release.jar:na] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)[puppet-server-release.jar:na] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_31]

    Users with the same issue

    nasimk
    5 times, last one,
    sriharshakiran
    4 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    13 more bugmates