question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect to the server

See original GitHub issue

client.connect() failed constantly:

INFO:telethon.telegram_bare_client:Connecting to 149.154.167.51:443...
INFO:telethon.extensions.tcp_client:OSError "[Errno 61] Connection refused" raised while connecting
INFO:telethon.extensions.tcp_client:OSError "[Errno 61] Connection refused" raised while connecting
INFO:telethon.extensions.tcp_client:OSError "[Errno 61] Connection refused" raised while connecting
INFO:telethon.extensions.tcp_client:OSError "[Errno 61] Connection refused" raised while connecting

I’d like to change the default server ip, so I did as the documentation told me: client.session.server_address = '149.154.167.40' That resulted in an exception immediately: AttributeError: can't set attribute

After some trials and errors, I found the set_dc() method did the work. Yet still, the connection was refused.

Any clue on what is going on? Do I need to configure anything before using the client? I was shown a public key after I created an app. Is that useful somehow?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Lonamicommented, Feb 27, 2018

That’s really strange then 😕. I’m out of ideas. It’s failing on the lowest level (directly connecting through a socket), and if that fails I’m not sure what other options we have. Try port 80 instead 443.

0reactions
Lonamicommented, Feb 27, 2018

I’d still would like you to try connecting to Telegram on port 80. I think it should work too (even without HTTP mode implemented).

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot connect the computer to the server" error message ...
Cannot connect the computer to the server because either another software installation is in progress or, the computer has a restart pending.
Read more >
5 Ways to Fix Unable To Connect To Server
5 Ways to Fix Unable To Connect To Server · 1. Check Internet Connection · 2. Restart Device · 3. Check Date &...
Read more >
Cannot Connect to Server: How to Connect to Company Server
What To Do When You Cannot Connect To The Company Server · 1. Restart Your Computer · 2. Follow the Error Messages ·...
Read more >
What does "Can't Connect to Server" mean, and how to fix it?
If you are using a database and you have used an incorrect userId and password then you might get a Cannot connect to...
Read more >
What does 'cannot connect to server' mean? - Quora
You can check that the server is running. · The firewall is not stopping everything. · The network is working properly. · Your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found