iclab / centinel

http://iclab.org/
MIT License
34 stars 17 forks source link

Operation timed out after 0 milliseconds with 0 out of 0 bytes received #206

Open jakubd opened 8 years ago

jakubd commented 8 years ago

Not sure entirely if this is a bug or just an error handling issue.

Frequently in baseline tests the failure message on the HTTP test reports: "Operation timed out after 0 milliseconds with 0 out of 0 bytes received" What is the cause of this? Either the error message is not relaying how long a GET request takes into the error message correctly or a timeout is being caused without waiting a sane amount of time. Does anyone else notice this in their output data files?

rpanah commented 8 years ago

@lianke123321, have you seen this before?

jakubd commented 8 years ago

Just to show that this is a frequent occurrence (in my tests at least) have a look at this heat map of errors returned. This is for around 13 json files taken recently (the x axis is different days of tests)

selection_375

rpanah commented 8 years ago

@jakubd can you please email me the JSON?

lianke123321 commented 8 years ago

I've seen similar error before, but the timeout was a much larger value. I've checked the code and timeout for pycurl is correctly set to 10 seconds. @rpanah @jakubd please also cc me the json file.

lianke123321 commented 8 years ago

http://stackoverflow.com/questions/22485811/curl-operation-timed-out-after-0-milliseconds

rpanah commented 8 years ago

http://stackoverflow.com/questions/22485811/curl-operation-timed-out-after-0-milliseconds

But this hack will only disable the TLS cert check. @jakubd maybe your websites have expired certs/don't support TLS?

jakubd commented 8 years ago

In the file I sent look at the entry for 39.net. In Canada this CNAMES to http://www.39.net but it is for non-https content and we see the same error.

rpanah commented 8 years ago

@jakubd, I know this is really old, but have you encountered this issue when running Centinel on more recent versions of curl and OpenSSL?

anhzhi commented 3 years ago

what‘s your url?

In my experience, you need 4 conditions to reproduce this issue:

for example

172.217.9.170 is blocked for some reason

on linux

root@ubuntu:~# curl -XGET https://172.217.9.170  --connect-timeout 5
curl: (28) Operation timed out after 0 milliseconds with 0 out of 0 bytes received
# occasionally
curl: (28) Connection timed out after 5000 milliseconds

root@ubuntu:~# curl -XGET https://172.217.9.170  # the same as:  --connect-timeout 0
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

# enable https_proxy
root@ubuntu:~#curl -XGET https://172.217.9.170 -k  --proxy socks5://192.168.100.1:1080
...
<H1>301 Moved</H1>
...

on windows including mingwin

C:\> curl -XGET https://172.217.9.170  --connect-timeout 5 -k
curl: (28) Operation timed out after 5000 milliseconds with 0 out of 0 bytes received
# sometimes
curl: (28) Connection timed out after 5000 milliseconds

C:\>curl -XGET https://172.217.9.170 -k
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
# mingwin
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 172.217.9.170:443
# sometimes
curl: (7) Failed to connect to 172.217.9.170 port 443: Timed out

# enable https_proxy
C:\> set https_proxy=socks5://localhost:1080
C:\>curl -XGET https://172.217.9.170 -k --connect-timeout 5
...
<H1>301 Moved</H1>
...