sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

discord - Login error: Connection timeout #218

Closed demlak closed 3 years ago

demlak commented 3 years ago

Since yesterday i am not able to connect anymore.. (EDIT: logs now with coresponding timestamps)

11:40 <@demlak> account 2 on
11:42 <@root> discord - Login error: Connection timeout
11:42 <@root> discord - Logging in: Signing off..
11:42 <@root> discord - Logging in: Reconnecting in 45 seconds..
11:45 <@root> discord - Login error: Connection timeout
11:45 <@root> discord - Logging in: Signing off..
11:45 <@root> discord - Logging in: Reconnecting in 135 seconds..

debug output:

[11:40:46] >>> ((null)) discord_http_get 188
About to send HTTP request:
GET /api/gateway HTTP/1.1
Host: discordapp.com
User-Agent: Bitlbee-Discord
Content-Type: application/json
authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-u4

HTTP response headers:
HTTP/1.1 200 OK
Date: Tue, 09 Feb 2021 10:40:46 GMT
Content-Type: application/json
Content-Length: 35
Connection: keep-alive
Set-Cookie: __cfduid=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy; expires=Thu, 11-Mar-21 10:40:46 GMT; path=/; domain=.discordapp.com; HttpOnly; SameSite=Lax
strict-transport-security: max-age=31536000; includeSubDomains
x-envoy-upstream-service-time: 8
Via: 1.1 google
Alt-Svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
CF-Cache-Status: HIT
Age: 43322
Expires: Tue, 09 Feb 2021 10:41:16 GMT
Cache-Control: public, max-age=30
Accept-Ranges: bytes
cf-request-id: ffffffffffffffffffffffffffffff
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],"max_age":604800}
NEL: {"max_age":604800,"report_to":"cf-nel"}
Server: cloudflare
CF-RAY: ddddddddddddddddddd-DUS

Finishing HTTP request with status: 200 OK
[11:40:46] <<< ((null)) discord_http_gateway_cb [200] 35
{"url": "wss://gateway.discord.gg"}

[11:43:31] >>> ((null)) discord_http_get 188
About to send HTTP request:
GET /api/gateway HTTP/1.1
Host: discordapp.com
User-Agent: Bitlbee-Discord
Content-Type: application/json
authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-u4

HTTP response headers:
HTTP/1.1 200 OK
Date: Tue, 09 Feb 2021 10:43:31 GMT
Content-Type: application/json
Content-Length: 35
Connection: keep-alive
Set-Cookie: __cfduid=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz; expires=Thu, 11-Mar-21 10:43:31 GMT; path=/; domain=.discordapp.com; HttpOnly; SameSite=Lax
strict-transport-security: max-age=31536000; includeSubDomains
x-envoy-upstream-service-time: 8
Via: 1.1 google
Alt-Svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
CF-Cache-Status: HIT
Age: 43487
Expires: Tue, 09 Feb 2021 10:44:01 GMT
Cache-Control: public, max-age=30
Accept-Ranges: bytes
cf-request-id: eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"max_age":604800,"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}]}
NEL: {"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: cccccccccccccccccc-DUS

Finishing HTTP request with status: 200 OK
[11:43:31] <<< ((null)) discord_http_gateway_cb [200] 35
{"url": "wss://gateway.discord.gg"}
sm00th commented 3 years ago

Hm, in this case ssl_connect() never returns and bitlbee just times it out. So it looks like a networking issue. Can you try running a curl/wget/telnet on gateway.discord.gg:443 from that machine? Should look something like this:

$ curl --head https://gateway.discord.gg
HTTP/2 404 
date: Tue, 09 Feb 2021 10:59:10 GMT
content-length: 0
set-cookie: __cfduid=d8c8b1d10deaf2f9626fc0d92514b2ba21612868350; expires=Thu, 11-Mar-21 10:59:10 GMT; path=/; domain=.discord.gg; HttpOnly; SameSite=Lax; Secure
cf-cache-status: DYNAMIC
cf-request-id: 08280b0b1f000027a0d1ae6000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"max_age":604800,"group":"cf-nel","endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=WZNdxHPUQ6AfwFjo9xBXN0hhhWDj8komD6uLf6IGQ7tufnREOgZyEWEaTLeuZPD%2BbGH1k2Q9IZS8iCfBz7vnW5XMBNLx1%2ByPJRgbyTCwLckql10%3D"}]}
nel: {"report_to":"cf-nel","max_age":604800}
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
server: cloudflare
cf-ray: 61ed14582c4b27a0-PRG
demlak commented 3 years ago

thx for the hint.. it seems my IP is banned.. i can't even ping this host.

ok.. this is weird network thingy.. the resolved IP seems to be a hiccup by cloudflare or something else.. i managed to connect to discord again.. thx anyway =)