Rasa telegram problem on Ubuntu 18.04 server

Hi, When I add the following settings to my credential.yml

telegram:
  access_token: "mybotToken"
  verify: "BotName"
  webhook_url: "https://myserver-ipaddress-here/webhooks/telegram/webhook"

I get the following error after using rasa run:

WARNING telegram.vendor.ptb_urllib3.urllib3.connectionpool - Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f23c2447fd0>, 'Connection to api.telegram.org timed out. (connect timeout=5.0)')': /bot{TOKEN}/setWebhook

and Finally I get something like this:

Failed to establish a new connection: [Errno 101] Network is unreachable

I have tested the same thing on my localhost but instead of putting myserver-ipaddress I used the Ngrok URL there and it works on Ubuntu 18.04 desktop. Note that I am not using docker. Please help!

I assume you put a real address for myserver-ipaddress-here, didn’t you? Are you maybe using a firewall on your server which blocks outgoing requests?

Yes I have put real ip address there ( Ip address of my server). There has been UFW firewall on server(Ubuntu 18.04 LTS). I even disabled the firewall by stopping the service and checking the status. For being sure I added rules for ports like 5005. I still cannot connect to telegram. Any suggestions would be appreciated!

No idea if it is related, but I know the deploy server stats but every time I deploy it I use 16.04 since that is the given requirements. Too many errors following instructions loosely, so now I do my best to follow to the T

Why would you offer 16.04 as a default working environment? Is there any difference? I think there is a firewall on the server which I don’t have access to. Anyways, any suggestions would be appreciated! I have been able to run Rasa on server but could not connect to telegram servers.

Are you doing this from a company server? Could also be that some company firewall is blocking it?

I have the same problem in my ubuntu server 22.04 deploy in a EC2 in AWS. Did you solve it?