I'm running Docker on MacOS and using 'Docker QuickStart Terminal'. My code can connect and work fine with remote brokers... just not my localhost broker. Sie können es also sowohl unter Windows 10 als auch auf einem Mac mit dem „ERR_CONNECTION_REFUSED“-Fehler zu tun bekommen. Now that you know the IP address, try curl again. local host refused to connect connection refused localhost docker I have been trying out put go api in docker. The mqtt docker uses port 1883 Im using the correct username and password My code can connect and work fine with remote brokers... just not my localhost broker. For that you will need to use your host's IP, or another way of connecting. Now it’s clear why there’s a connection refused: the server is listening on 127.0.0.1 inside the container’s network namespace. connect Not quite. Inside the file, search for these two lines. The container was running, but apache wasn't running, so you got Connection refused when you tried to access it with curl. July 7, 2021 by Nijo Luca Leave a Comment This blog post covers the issue & fix which most of us encountered while performing the kubectl get command. docker-compose, postgres and connection refused Inside the file, search for these two lines. Eclipse Community Forums: Mosquitto » Connection Refused Docker