Connection to local IP address sometimes take over 30 seconds

(Doc ID 2410405.1)

Last updated on JUNE 13, 2018

Applies to:

Solaris Operating System - Version 11.3 and later
Information in this document applies to any platform.

Symptoms

Some applications need to connect to localhost on a listening port.  These applications first try a localhost IPv6 (AF_INET6) connection, to ::1  - then if that doesn't work, they try IPv4 (AF_INET) to 127.0.0.1. 

Often, the connection hangs for 30 seconds when connecting and says "Trying ::1...".    This causes performance problems for the application. 

Changes

 So the question is - why would a connect() to  IPv6  ::1 port <port#> hang - and presumably timeout - rather than return ECONNREFUSED, when there is nothing listening on the target  ::1 <port#>

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms