I've built a python application that runs smoothly when deployed directly on the OS (RaspOS). I decided to dockerize the application and deployed it to about 20 endpoints with no problem. But now, in one single endpoint, when the app is uploading a file to S3, usually the first upload occurs as it should but from the second file onwards I get this error message. "Error:Connection was closed before we received a valid response from endpoint URL: ..." I have already checked the container and it's internet link seems to be ok, it's even pinging the endpoint which the data is supposed to be uploaded.

I have a second application that streams video to KVS, and it's not connecting as well from inside the container.

Checking on Docker network configurations seems to be ok as well.

Where or what should I look from here? Almost 2 days stuck on this, I don't even know what to google anymore.

I guess it seems to be some configuration on Docker daemon or OS...

I did some testing from inside and outside the container for comparison, does it bring any clue?

INSIDE CONTAINER

root@mycontainer# busybox ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=118 time=10.943 ms
64 bytes from 8.8.8.8: seq=1 ttl=118 time=8.586 ms
64 bytes from 8.8.8.8: seq=2 ttl=118 time=8.108 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 8.108/9.212/10.943 ms

root@mycontainer# wget google.com
--2020-10-01 13:04:41--  http://google.com/
Resolving google.com (google.com)... 172.217.30.46, 2800:3f0:4001:809::200e
Connecting to google.com (google.com)|172.217.30.46|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2020-10-01 13:04:41--  http://www.google.com/
Resolving www.google.com (www.google.com)... 172.217.162.164, 2800:3f0:4001:810::2004
Connecting to www.google.com (www.google.com)|172.217.162.164|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2020-10-01 13:04:43--  (try: 2)  http://www.google.com/
Connecting to www.google.com (www.google.com)|172.217.162.164|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html'

index.html                                      [ <=>                                                                                       ]  12.27K  --.-KB/s    in 0s      

2020-10-01 13:04:43 (45.9 MB/s) - 'index.html' saved [12567]

OUTSIDE CONTAINER

pi@raspberrypi:~/ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=7.55 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=8.09 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=7.78 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 7.549/7.807/8.090/0.221 ms

pi@raspberrypi:~/ $ wget google.com
--2020-10-01 13:05:51--  http://google.com/
Resolving google.com (google.com)... 172.217.30.46, 2800:3f0:4001:809::200e
Connecting to google.com (google.com)|172.217.30.46|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2020-10-01 13:05:51--  http://www.google.com/
Resolving www.google.com (www.google.com)... 172.217.28.4, 2800:3f0:4001:810::2004
Connecting to www.google.com (www.google.com)|172.217.28.4|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html                                                      [ <=>                                                                                                                                     ]  12.27K  --.-KB/s    in 0s

2020-10-01 13:05:52 (60.0 MB/s) - ‘index.html’ saved [12566]
0

There are 0 answers