Forums

myqtthub.com [Errno 111] Connection refused

Hello all

I've been using the mqtt broker myqtthub.com for some months, but since this weekend it fails, showing the following error:

File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

I don't think that it is due to a code error, because it was working before, and it works right now from my local server, but fails when published on my pythonanywhere web. It seams that something has changed on my pythonanywhere account, wich is unable to reach https://node02.myqtthub.com/

Could some one please provide some help. Thanks in advance.

Command ping node02.myqtthub.com shows this:

PING node02.myqtthub.com (185.195.98.58) 56(84) bytes of data. From ip-10-0-0-232.ec2.internal (10.0.0.232) icmp_seq=1 Destination Port Unreachable ping: sendmsg: Operation not permitted

I see the endpoint is on our whitelist, but if there's a redirect set, it probably would not work -- you can see how the endpoint behaves in the browser or run curl -I node02.myqtthub.com in a console on your local machine.

this is the result of curl -I node02.myqtthub.com on my local machine:

HTTP/1.1 301 Moved Permanently Date: Mon, 28 Mar 2022 08:33:59 GMT Server: Apache/2.4.10 (Debian) Location: https://node02.myqtthub.com/ Content-Type: text/html; charset=iso-8859-1

Right, the redirect is actually to https://node02.myqtthub.com -- the reason for ping not working is because it doesn't use http protocl, and free accounts are restricted to http only (sorry for the confusion!).

But my account is not free, note that my user TINPark has a paid plan. By the way, the ping command is not recognized on my console. I did a ping test using another free account (PlayasEstrecho), but the "[Errno 111] Connection refused" issue hapens in both accounts (TINPark, and PlayasEstrecho)

It looks like that works from all the web servers except one - the one that your web app is running on. So my guess would be that the site in question identified what you were doing as abusive and blocked the IP of that server.

Could you please confirm that the ip of that server is 35.173.69.207 ?
I contacted the myqtthub site support team, and here is their answer:

<<We have been checking IP reported and it is not blocked and was not blocked in the past:

[Estado de black list para 35.173.69.207]

IP 35.173.69.207 NO está actualmente listada/bloqueada

[Estado de lista blanca para 35.173.69.207]

La IP 35.173.69.207 no está actualmente en lista blanca


No se encontraron registros en el histórico para 35.173.69.207

No se encontró actividad para esta IP [35.173.69.207] en el log [/var/log/mail.log]

No se encontró actividad para esta IP [35.173.69.207] en los registros WEB

We are also able to ping from mqtt nodes to this ip without any problem (which will not be possible if there were a blocking rule in place):

ping 35.173.69.207

PING 35.173.69.207 (35.173.69.207) 56(84) bytes of data. 64 bytes from 35.173.69.207: icmp_seq=1 ttl=47 time=85.4 ms

Possibly there is a block or firewall that is not allow your client application to connect to node02.myqtthub.com over port 1883/tcp on your side?

Your code is right and it is supported (as you was able to check from other locations). Check with pythonanywhere.com what could be happening with outgoing traffic to reach our side...

Best Regards,>>

One of your web apps is running on 100.26.146.141, the other one from 34.230.35.4, but it could change as web apps move between servers.

Just to tell you thanks. The issue was fixed. Best regards.

Great! Thanks for letting us know.