I have issue : MQTT connect failed , error -1 - Ping server Failed

Hello dear Friends and Cayenne Team.

I used Cayenne to control my Nodemcu Device remote and online, and it was ok,
But now I want use, when I checking Serial Monitor I Faced this error :

[8297] Connected to WiFi
[8298] IP:
[8298] Connecting to mqtt.mydevices.com:1883
[38622] MQTT connect failed, error -1

and I tested my PC network and pinging " mqtt.mydevices.com " address, I faced that my network can’t connect to this address! I tested several networks by different ISP but the issue was not fixed.

When I use VPN tunnel on windows, ping is ok, and response!
but I can’t set proxy or VPN on my Arduino or Nodemcu device ! it’s possible? if yes , how ? that set to my codes,

I want give me a solution or :

My device should bypass the tunnel and after this, try to connect to the server and address " mqtt.mydevices.com ", if this can ok, my issue will fix!


I haven’t tried this and don’t easily have a proxy available, but you should be able to connect to a proxy.

Replace the ethernet code with your wifi code.

1 Like