Vertx Exception: java.io.IOException: Connection reset by peer. Happens on AWS, not happens local

620 views
Skip to first unread message

ni...@cloudcar.com

unread,
Jul 16, 2018, 1:57:42 PM7/16/18
to vert.x


10:00 AM (55 minutes ago)
Hi,

I have got a Vertx Exception: java.io.IOException: Connection reset by peer
It only happens when I run the program at AWS, not always, but often when send new requests. It does not happen when I run the program at my local.
The program has two layers of asynchronous function. First, asynchronous call each content provider. Second, asynchronous call each url inside the content provider. I can receive content from the provider, however, the connection reset by peer happens after it. Please help me figure out how to fix it. Thanks.

Vert.x version is 3.4.2
```
2018-07-13 23:14:26,016 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?...
    2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?...
    2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?...
    2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?...
    2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?...
    2018-07-13 23:14:26,018 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
    2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
    2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
    2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
    2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
    2018-07-13 23:14:26,020 DEBUG FutureList -  wait all 5 futures complete elapsed 2 millis.
    2018-07-13 23:14:26,020 WARN  Warnings -  warning from FutureList
    io.vertx.core.VertxException: java.io.IOException: Connection reset by peer
      at io.vertx.ext.sync.Sync.awaitResult(Sync.java:49) ~[ContentProviderPlatformServer.jar:?]
```
Auto Generated Inline Image 1

Julien Viet

unread,
Jul 17, 2018, 4:11:12 AM7/17/18
to ve...@googlegroups.com
Hi,

this is a normal and expected behavior.

It means the client did not do a clean termination of the TCP connection, this is reported by the JVM as an exception.

Julien

On 16 Jul 2018, at 19:57, ni...@cloudcar.com wrote:



<Auto Generated Inline Image 1.png>
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/1f53b0ab-df0c-452b-9ef2-44e6eff2c6c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Auto Generated Inline Image 1.png>

ni...@cloudcar.com

unread,
Jul 18, 2018, 1:47:51 PM7/18/18
to vert.x
HI Julien,
Thanks for your reply.  But you mean "client" is my server side, which need to clean termination of the TCP connection, or it is content provider issue?
I just curious why it is working at my localhost, but it fails at AWS.
Is there any more info I can refer to?
Thanks!

Julien Viet

unread,
Jul 19, 2018, 3:02:39 AM7/19/18
to ve...@googlegroups.com
Hi,

can you provide a stack trace of the reset ?

Julien

ni...@cloudcar.com

unread,
Jul 19, 2018, 12:26:05 PM7/19/18
to vert.x
Hi Julien,

2018-07-13 23:14:26,016 INFO  MainDispatcher -  getting trendings
2018-07-13 23:14:26,016 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?partnerId=ucoRiu0S&render=json&format=mp3&id=c100...
2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?partnerId=ucoRiu0S&render=json&format=mp3&id=c579...
2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?partnerId=ucoRiu0S&render=json&format=mp3&c=local...
2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?partnerId=ucoRiu0S&render=json&format=mp3&id=c100...
2018-07-13 23:14:26,017 DEBUG LogPayloadSender -  GET https://opml.radiotime.com/Browse.ashx?partnerId=ucoRiu0S&render=json&format=mp3&id=g272...
2018-07-13 23:14:26,018 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
2018-07-13 23:14:26,019 ERROR ConnectionBase -  java.io.IOException: Connection reset by peer
2018-07-13 23:14:26,020 DEBUG FutureList -  wait all 5 futures complete elapsed 2 millis.
2018-07-13 23:14:26,020 WARN  Warnings -  warning from FutureList
io.vertx.core.VertxException: java.io.IOException: Connection reset by peer
  at io.vertx.ext.sync.Sync.awaitResult(Sync.java:49) ~[ContentProviderPlatformServer.jar:?]
  at com.XXX.content.platform.util.io.impl.ResponseImpl.await(ResponseImpl.java:84) ~[ContentProviderPlatformServer.jar:?]
  at com.XXXr.content.platform.service.provider.tunein.TuneinNetwork.browse(TuneinNetwork.java:112) ~[ContentProviderPlatformServer.jar:?]
  at com.XXX.content.platform.service.provider.tunein.TuneinProviderImpl.callTrendingAndConvert(TuneinProviderImpl.java:428) ~[ContentProviderPlatformServer.jar:?]


callTrendingAndConvert() is asynchronously called by 5 futures.
The problem I am confused is why it is running well at my local but not at AWS. 
On AWS, the connection reset always happens for a new request or a couple of new requests. It still happens when send requests repeatedly, but rare. Sometimes, one or two connection out of FIVE connections are reset, not all of them are reset. Hope this info helps. If you need more info, please let me know. Thanks.
And I have checked the previous response you had given on similar issues, which were really helpful.
Thanks.
Reply all
Reply to author
Forward
0 new messages