bitlbee-steam icon indicating copy to clipboard operation
bitlbee-steam copied to clipboard

Error: HTTP: Empty HTTP reply

Open manavortex opened this issue 9 years ago • 32 comments

Hi, I'm encountering those empty HTTP replies. I'm not sure what's causing them and how to fix them, but they turn up frequently after I'm logged in for a while. Logging out again makes it go away, but it always returns.

Here's some output:

1208 @root steam - Signing off..                                                        
1208 @root steam - Reconnecting in 5 seconds..                                          
1208 @root steam - Logging in: Connecting                                              
1208 @root steam - Logging in: Sending logon request                                   
1208 @root steam - Logging in: Requesting friends list                                 
1208 @root steam - Logging in: Logged in                                               
1208 @root steam - Error: HTTP: Empty HTTP reply
1208 @root steam - Signing off..                                                       
1208 @root steam - Reconnecting in 5 seconds..                                         
1208 @root steam - Logging in: Connecting                                              
1208 @root steam - Logging in: Sending logon request                                   
1208 @root steam - Logging in: Requesting friends list                                 
1208 @root steam - Logging in: Logged in

I would appreciate help with that. :)

manavortex avatar Jan 02 '16 11:01 manavortex

I can also reproduce this error by sending a message from bitlbee to a friend.

iakat avatar Jan 02 '16 20:01 iakat

In what commit does this happen? Can you try with 663eae84f4ea4e94b3b8bacd6719fdb0bd7858b8 or b16b4731ed476b938c1dc1d91ea4a3debb5e4ebb? (git checkout <commit> then rebuild)

dequis avatar Jan 02 '16 21:01 dequis

Hey, 663eae8 did not fix it - I'll now try the other one. edit: Nope, neither. Anything I can do to provide you with additional debug?

manavortex avatar Jan 03 '16 15:01 manavortex

Well that just means it wasn't broken by recent revisions. Go back to the latest one.

And I think we can only blame the steam servers at this point. @jgeboski?

dequis avatar Jan 03 '16 19:01 dequis

I can seem to be able to send messages again, so yes, it's something on Steam's side, however, not sure the connection should reset at that point..

2016-01-03 20:04 GMT+01:00 dx [email protected]:

Well that just means it wasn't broken by recent revisions. Go back to the latest one.

And I think we can only blame the steam servers at this point. @jgeboski https://github.com/jgeboski?

— Reply to this email directly or view it on GitHub https://github.com/jgeboski/bitlbee-steam/issues/111#issuecomment-168531335 .

iakat avatar Jan 03 '16 19:01 iakat

Hey jgeboski, Is there any sort of workaround? :s

manavortex avatar Jan 03 '16 19:01 manavortex

I thought we reached the consensus that the issue was resolved?

jgeboski avatar Jan 03 '16 19:01 jgeboski

Oh - I'm still running into it.

manavortex avatar Jan 03 '16 19:01 manavortex

Try re-authenticating:

account steam off
account steam set -del token
account steam on

jgeboski avatar Jan 03 '16 20:01 jgeboski

2117 @root steam - Logging in: Connecting                                                                          
2117 @root steam - Logging in: Requesting authentication key                                                            
2117 @root steam - Logging in: Requesting authentication token                                                         
2117 @root steam - Logging in: Authentication finished                                                           
2117 @root steam - Logging in: Signing off..                                                                           
2117 @root steam - Logging in: Connecting                                                                              
2117 @root steam - Logging in: Sending logon request                                                                   
2117 @root steam - Logging in: Requesting friends list                                                                 
2117 @root steam - Logging in: Logged in

No timeout so far, but I've not always ran into that straight away - sometimes it takes a bit. I'll keep you posted.

manavortex avatar Jan 03 '16 20:01 manavortex

It has been working fine for me. There might be some sort of network issue between you and Steam as well.

jgeboski avatar Jan 03 '16 20:01 jgeboski

That's awesome to hear at least - thanks for the support :) If deleting the token works, I'll simply make myself a weechat trigger every time I get a 404.

manavortex avatar Jan 03 '16 20:01 manavortex

You should not have to do that. And it is not a 404. When you receive that error, the HTTP response has not been sent, so we have no status code at all. The TCP/TLS connection is dying on the plugin, and causing this error to be thrown [1]. Likely something network related, or Steam just saying "no" for some reason.

jgeboski avatar Jan 03 '16 20:01 jgeboski

Err, yes - I don't know why I wrote 404 -.- I'm a bit fuzzy in the brain from unixing for too long today. Anyway, thank you for the help, I'm still logged in.

manavortex avatar Jan 03 '16 20:01 manavortex

There it is again - resetting the Token didn't do anything. Do you perhaps have any sort of setting configured that your client is polling that mine is not? So that the requests aren't empty?

manavortex avatar Jan 04 '16 07:01 manavortex

Do you perhaps have any sort of setting configured that your client is polling that mine is not?

Nope. This is irrelevant of the client.

So that the requests aren't empty?

This is likely going to be some sort of network issue, whether on your end or Valve's end. Try running the plugin with debugging output to see which request it is failing on. Some questions to answer with the debugging information: does it always fail on the same request? if so, which request? does it happen after a certain type of action, such as sending a message?

BITLBEE_DEBUG_STEAM=1 /usr/sbin/bitlbee -Dnvc /etc/bitlbee/bitlbee.conf

jgeboski avatar Jan 04 '16 17:01 jgeboski

Hey there, thanks again for your help!

I tried, and it does this:

http://pastebin.com/xBEcUVHe

It loops.

manavortex avatar Jan 04 '16 17:01 manavortex

[INFO] steam:   HTTP/1.1 111 OK
[INFO] steam:   Content-Type: application/json; charset=UTF-1
[INFO] steam:   Expires: Mon, 11 Jan 1111 11:11:11 GMT
[INFO] steam:   Date: Mon, 11 Jan 1111 11:11:11 GMT
[INFO] steam:   Content-Length: 11111
[INFO] steam:   Connection: close

That's what my nightmares look like.

dequis avatar Jan 04 '16 18:01 dequis

So sorry! D: Should I replace the digits with 2s, would that make it a bit better? :)

manavortex avatar Jan 04 '16 18:01 manavortex

So, this appears to happen with the keep-alive poll request. This is holds the TCP connection open for roughly 30 seconds (likely a bit more), which ends up dying. Since this issue seems to happen fairly quickly, try running the following "hackery" and see if it ever dies.

while true; do curl -vso /dev/null https://api.steampowered.com/ISteamWebUserPresenceOAuth/Poll/v0001 && sleep 5 || break; done

jgeboski avatar Jan 04 '16 18:01 jgeboski

Seems to work:

< Date: Mon, 04 Jan 2016 18:58:50 GMT
< Connection: keep-alive
<
{ [data not shown]
* Connection #0 to host api.steampowered.com left intact
* Hostname was NOT found in DNS cache
*   Trying 23.206.34.27...
* Connected to api.steampowered.com (23.206.34.27) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Washington; serialNumber=602290773; street=Suite 500; street=10900 NE 4th St; postalCode=98004; C=US; ST=Washington; L=Bellevue; O=Valve Corp.; CN=store.steampowered.com
*    start date: 2015-11-20 00:00:00 GMT
*    expire date: 2018-02-07 12:00:00 GMT
*    subjectAltName: api.steampowered.com matched
*    issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*    SSL certificate verify ok.
> GET /ISteamWebUserPresenceOAuth/Poll/v0001 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.steampowered.com
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Content-Length: 147
< Content-Type: text/html; charset=UTF-8
< Expires: Mon, 04 Jan 2016 18:58:56 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Mon, 04 Jan 2016 18:58:56 GMT
< Connection: keep-alive
<
{ [data not shown]
* Connection #0 to host api.steampowered.com left intact
* Hostname was NOT found in DNS cache
*   Trying 23.206.34.27...
* Connected to api.steampowered.com (23.206.34.27) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Washington; serialNumber=602290773; street=Suite 500; street=10900 NE 4th St; postalCode=98004; C=US; ST=Washington; L=Bellevue; O=Valve Corp.; CN=store.steampowered.com
*    start date: 2015-11-20 00:00:00 GMT
*    expire date: 2018-02-07 12:00:00 GMT
*    subjectAltName: api.steampowered.com matched
*    issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*    SSL certificate verify ok.
> GET /ISteamWebUserPresenceOAuth/Poll/v0001 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.steampowered.com
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Content-Length: 147
< Content-Type: text/html; charset=UTF-8
< Expires: Mon, 04 Jan 2016 18:59:01 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Mon, 04 Jan 2016 18:59:01 GMT
< Connection: keep-alive
<
{ [data not shown]
* Connection #0 to host api.steampowered.com left intact
* Hostname was NOT found in DNS cache
*   Trying 23.206.34.27...
* Connected to api.steampowered.com (23.206.34.27) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Washington; serialNumber=602290773; street=Suite 500; street=10900 NE 4th St; postalCode=98004; C=US; ST=Washington; L=Bellevue; O=Valve Corp.; CN=store.steampowered.com
*    start date: 2015-11-20 00:00:00 GMT
*    expire date: 2018-02-07 12:00:00 GMT
*    subjectAltName: api.steampowered.com matched
*    issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*    SSL certificate verify ok.
> GET /ISteamWebUserPresenceOAuth/Poll/v0001 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.steampowered.com
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Content-Length: 147
< Content-Type: text/html; charset=UTF-8
< Expires: Mon, 04 Jan 2016 18:59:06 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Mon, 04 Jan 2016 18:59:06 GMT
< Connection: keep-alive
<
{ [data not shown]
* Connection #0 to host api.steampowered.com left intact
* Hostname was NOT found in DNS cache
*   Trying 23.206.34.27...
* Connected to api.steampowered.com (23.206.34.27) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Washington; serialNumber=602290773; street=Suite 500; street=10900 NE 4th St; postalCode=98004; C=US; ST=Washington; L=Bellevue; O=Valve Corp.; CN=store.steampowered.com
*    start date: 2015-11-20 00:00:00 GMT
*    expire date: 2018-02-07 12:00:00 GMT
*    subjectAltName: api.steampowered.com matched
*    issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
*    SSL certificate verify ok.
> GET /ISteamWebUserPresenceOAuth/Poll/v0001 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.steampowered.com
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Content-Length: 147
< Content-Type: text/html; charset=UTF-8
< Expires: Mon, 04 Jan 2016 18:59:12 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Mon, 04 Jan 2016 18:59:12 GMT
< Connection: keep-alive
<
{ [data not shown]
* Connection #0 to host api.steampowered.com left intact

manavortex avatar Jan 04 '16 18:01 manavortex

Let it run until you receive the issue with bitlbee.

jgeboski avatar Jan 04 '16 19:01 jgeboski

I'm running the command in a screen, bitlbee is running as daemon - same error. Can you please tell me exactly what I'm to do? I spent all day fighting Oracle and am totally braindead. :)

manavortex avatar Jan 04 '16 19:01 manavortex

Run that command (in screen is fine), then wait for the issue to occur in bitlbee, once it occurs, check that screen session to see if the command killed itself, if not CTRL+C it. Then report back.

jgeboski avatar Jan 04 '16 19:01 jgeboski

The screen is doing fine, bitlbee keeps reconnecting.

manavortex avatar Jan 04 '16 19:01 manavortex

Is this working now? It looks like there were some hiccups with the steam servers.

See: EionRobb/pidgin-opensteamworks#125

jgeboski avatar Jan 09 '16 21:01 jgeboski

I'm in without immediately reconnecting. Will report more tomorrow. ;)

Nope, it's at it again.

manavortex avatar Jan 09 '16 21:01 manavortex

This only happens to me, and I mean every few seconds again and again, whenever I have connected Bitlbee AND the real Steam to the same account.

Usually when I use Steam, I switch my Bitlbee Steam account to off. It's inconvenient, but that's pretty much it. 100% reproducable.

3941 avatar Mar 10 '16 01:03 3941

I cannot reproduce this issue at all.

jgeboski avatar Mar 11 '16 18:03 jgeboski

For anyone with this issue, please mention:

  • Distro and distro version
  • Bitlbee version
  • ISP or hosting provider or bitlbee public server name.

dequis avatar Mar 23 '16 23:03 dequis