You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Igor T <ig...@gmail.com> on 2018/04/15 11:32:41 UTC

Socket accept failed: The specified network name is no longer available.

I'm experiencing many "Socket accept failed: The specified network
name is no longer available." exceptions in the Tomcat error log.

These exceptions happen both on port 80 and 443. Both connectors are
using Http11Nio2Protocol.

I can't reproduce this exception on the local PC, but on the
production instance it happens ~1500 times every day.

Please help me to understand what is the cause of them.


System details:
Windows Server 2012 R2
AWS c4.2xlarge instance
Tomcat 9.0.6
Oracle JRE 1.8.0_162-b12

Exception details:


14-Apr-2018 20:15:33.081 SEVERE [https-openssl-nio2-443-Acceptor-0]
org.apache.tomcat.util.net.Acceptor.run Socket accept failed
 java.util.concurrent.ExecutionException: java.io.IOException: The
specified network name is no longer available.

    at sun.nio.ch.PendingFuture.get(PendingFuture.java:185)
    at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(Nio2Endpoint.java:334)
    at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(Nio2Endpoint.java:59)
    at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: The specified network name is no
longer available.

    at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
    at sun.nio.ch.Iocp.access$700(Iocp.java:46)
    at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
    ... 1 more

14-Apr-2018 20:16:16.966 SEVERE [http-nio2-80-Acceptor-0]
org.apache.tomcat.util.net.Acceptor.run Socket accept failed
 java.util.concurrent.ExecutionException: java.io.IOException: The
specified network name is no longer available.

    at sun.nio.ch.PendingFuture.get(PendingFuture.java:185)
    at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(Nio2Endpoint.java:334)
    at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(Nio2Endpoint.java:59)
    at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: The specified network name is no
longer available.

    at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
    at sun.nio.ch.Iocp.access$700(Iocp.java:46)
    at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
    ... 1 more

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Socket accept failed: The specified network name is no longer available.

Posted by Guang Chao <gu...@gmail.com>.
On Tue, Apr 17, 2018 at 2:13 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Rémy,
>
> On 4/16/18 11:05 AM, Rémy Maucherat wrote:
> > On Mon, Apr 16, 2018 at 4:51 PM, Igor <ig...@gmail.com>
> > wrote:
> >
> >> If this is really such a simple problem then how can I get rid of
> >> its output into error log?
> >>
> >
> > You can always configure the logging if you'd like to filter this
> > one out, but this looks like a serious error during accept. I'd
> > think you should try to find the root cause of the issue.
>
> +1
>
> It's probably something like your server disconnecting and
> reconnecting to the network. Bad NIC? Flaky DHCP server? Bad advice to
> use a WiFi network for a server? Lots of other possibilities, here, too.
>
>
How about testing from the server using a browser, since it is using
Windows.  If there is no problem, then it might be just network issues.



> This kind of thing doesn't happen with a stable server and network.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrU58gACgkQHPApP6U8
> pFhJDw/+ON6Z6G8DGuvyeIBrnQOVM3efmiyI21YR4fsyOW8l6zFwcLg0tcwtZ6n+
> 4vophvplqyLQ6pG7empVBX4e3gdX3ygobFYMpC5pFZpWlJgzGpphMVSnq0RIs9jr
> LJPEIbupUL8HElBuHEVeITQpIDSgZmH2hdYfxXiU0Za7Q3XWDJyBEQFzF8rNkJEO
> UClHSp+1BElQvwGwo8xRlWAEG9CrgL0BpANYd1SneLYkkn45EQufYXl9yW8raM8U
> V0AV9pGSQShdtx3dlVAgtCpHFRUR+Tainn0Q/uQgyjY0hYhJZpgKisBx2Hn3a/Fn
> Ybdn9VjB9Wbpa+uke+yLMBbdgYaEVDaw9Ec/8Ws1oxv2kaRW4gYwljhw4h0YG7uv
> Uiq7XH9DmvRzRvEtwi5T/A8HaoyvacW43mlIB2WQTjQxsv9X7VcLoRS8lzlBtYkv
> 8eDZTeD16/6uSUzY3p5QKgZVPyrzOnOtc2+0AGjneuk18y7hQaY0ltVZ8CmvA76y
> 2eToMcEZkVNnTNzdJiKmJ6W6GFSOyrg/1hlMVeO5ZK5M/rhaf9IXF0DvCrLWqHWm
> 2yUZ91GC6VJykGJ2hZLrhWgNGpgvg9tiJR4Gm9bgapWG+kVpRYc3GBNpqTPIj/bq
> kkAc3sX2erqg62IgRZhT+FrqP8QfpaDVQszB18jPeldVflzNFSM=
> =qj2m
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Guang <http://javadevnotes.com/java-reverse-array>

Re: Socket accept failed: The specified network name is no longer available.

Posted by Mark Thomas <ma...@apache.org>.
On 26 April 2018 15:18:59 BST, Igor <ig...@gmail.com> wrote:
>I'm trying to find the reason for this problem-
>I've installed Wireshark on the instance and have captured the packets
>in
>the moments that we see a problem.
>Tomcat's error log has millisecond precision (.000), but Wireshark's
>log has
>microsecond precision (.000000).
>Tomcat's error log has no additional details, so I can't find a match
>between the Wireshark capture result and Tomcat's log.
>
>I try to find out:
>1. how to print out into Tomcat's log ip:port of the socket that wasn't
>accepted?

That isn't available. Tomcat logs all the information the JVM provides.

>2. is the timestamp that Tomcat writes to the log set on the event
>occurrence or on writing to the file?

Neither. It is the time the log message was created.

Mark 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Socket accept failed: The specified network name is no longer available.

Posted by Igor <ig...@gmail.com>.
I'm trying to find the reason for this problem-
I've installed Wireshark on the instance and have captured the packets in
the moments that we see a problem.
Tomcat's error log has millisecond precision (.000), but Wireshark's log has
microsecond precision (.000000).
Tomcat's error log has no additional details, so I can't find a match
between the Wireshark capture result and Tomcat's log.

I try to find out:
1. how to print out into Tomcat's log ip:port of the socket that wasn't
accepted?
2. is the timestamp that Tomcat writes to the log set on the event
occurrence or on writing to the file?




--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Socket accept failed: The specified network name is no longer available.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Rémy,

On 4/16/18 11:05 AM, Rémy Maucherat wrote:
> On Mon, Apr 16, 2018 at 4:51 PM, Igor <ig...@gmail.com>
> wrote:
> 
>> If this is really such a simple problem then how can I get rid of
>> its output into error log?
>> 
> 
> You can always configure the logging if you'd like to filter this
> one out, but this looks like a serious error during accept. I'd
> think you should try to find the root cause of the issue.

+1

It's probably something like your server disconnecting and
reconnecting to the network. Bad NIC? Flaky DHCP server? Bad advice to
use a WiFi network for a server? Lots of other possibilities, here, too.

This kind of thing doesn't happen with a stable server and network.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrU58gACgkQHPApP6U8
pFhJDw/+ON6Z6G8DGuvyeIBrnQOVM3efmiyI21YR4fsyOW8l6zFwcLg0tcwtZ6n+
4vophvplqyLQ6pG7empVBX4e3gdX3ygobFYMpC5pFZpWlJgzGpphMVSnq0RIs9jr
LJPEIbupUL8HElBuHEVeITQpIDSgZmH2hdYfxXiU0Za7Q3XWDJyBEQFzF8rNkJEO
UClHSp+1BElQvwGwo8xRlWAEG9CrgL0BpANYd1SneLYkkn45EQufYXl9yW8raM8U
V0AV9pGSQShdtx3dlVAgtCpHFRUR+Tainn0Q/uQgyjY0hYhJZpgKisBx2Hn3a/Fn
Ybdn9VjB9Wbpa+uke+yLMBbdgYaEVDaw9Ec/8Ws1oxv2kaRW4gYwljhw4h0YG7uv
Uiq7XH9DmvRzRvEtwi5T/A8HaoyvacW43mlIB2WQTjQxsv9X7VcLoRS8lzlBtYkv
8eDZTeD16/6uSUzY3p5QKgZVPyrzOnOtc2+0AGjneuk18y7hQaY0ltVZ8CmvA76y
2eToMcEZkVNnTNzdJiKmJ6W6GFSOyrg/1hlMVeO5ZK5M/rhaf9IXF0DvCrLWqHWm
2yUZ91GC6VJykGJ2hZLrhWgNGpgvg9tiJR4Gm9bgapWG+kVpRYc3GBNpqTPIj/bq
kkAc3sX2erqg62IgRZhT+FrqP8QfpaDVQszB18jPeldVflzNFSM=
=qj2m
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Socket accept failed: The specified network name is no longer available.

Posted by Rémy Maucherat <re...@apache.org>.
On Mon, Apr 16, 2018 at 4:51 PM, Igor <ig...@gmail.com> wrote:

> If this is really such a simple problem then how can I get rid of its
> output
> into error log?
>

You can always configure the logging if you'd like to filter this one out,
but this looks like a serious error during accept. I'd think you should try
to find the root cause of the issue.

Rémy



>
>
>
> --
> Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Socket accept failed: The specified network name is no longer available.

Posted by Igor <ig...@gmail.com>.
If this is really such a simple problem then how can I get rid of its output
into error log?



--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Socket accept failed: The specified network name is no longer available.

Posted by Rémy Maucherat <re...@apache.org>.
On Sun, Apr 15, 2018 at 1:32 PM, Igor T <ig...@gmail.com> wrote:

> I'm experiencing many "Socket accept failed: The specified network
> name is no longer available." exceptions in the Tomcat error log.
>
> These exceptions happen both on port 80 and 443. Both connectors are
> using Http11Nio2Protocol.
>
> I can't reproduce this exception on the local PC, but on the
> production instance it happens ~1500 times every day.
>
> Please help me to understand what is the cause of them.
>
>
> System details:
> Windows Server 2012 R2
> AWS c4.2xlarge instance
> Tomcat 9.0.6
> Oracle JRE 1.8.0_162-b12
>
> Exception details:
>
>
> 14-Apr-2018 20:15:33.081 SEVERE [https-openssl-nio2-443-Acceptor-0]
> org.apache.tomcat.util.net.Acceptor.run Socket accept failed
>  java.util.concurrent.ExecutionException: java.io.IOException: The
> specified network name is no longer available.
>
>     at sun.nio.ch.PendingFuture.get(PendingFuture.java:185)
>     at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(
> Nio2Endpoint.java:334)
>     at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(
> Nio2Endpoint.java:59)
>     at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95)
>     at java.lang.Thread.run(Thread.java:748)
> Caused by: java.io.IOException: The specified network name is no
> longer available.
>
>     at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
>     at sun.nio.ch.Iocp.access$700(Iocp.java:46)
>     at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
>     ... 1 more
>
> 14-Apr-2018 20:16:16.966 SEVERE [http-nio2-80-Acceptor-0]
> org.apache.tomcat.util.net.Acceptor.run Socket accept failed
>  java.util.concurrent.ExecutionException: java.io.IOException: The
> specified network name is no longer available.
>
>     at sun.nio.ch.PendingFuture.get(PendingFuture.java:185)
>     at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(
> Nio2Endpoint.java:334)
>     at org.apache.tomcat.util.net.Nio2Endpoint.serverSocketAccept(
> Nio2Endpoint.java:59)
>     at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95)
>     at java.lang.Thread.run(Thread.java:748)
> Caused by: java.io.IOException: The specified network name is no
> longer available.
>
>     at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309)
>     at sun.nio.ch.Iocp.access$700(Iocp.java:46)
>     at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399)
>     ... 1 more
>
> It could mean what it means: you might have issues with the network
interface. The accept call here is as simple as it gets, it does
AsynchronousServerSocketChannel.accept().get().

Rémy