8000 fix autopaho Docker example by agebhar1 · Pull Request #300 · eclipse-paho/paho.golang · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix autopaho Docker example #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2025
Merged

Conversation

agebhar1
Copy link
Contributor
@agebhar1 agebhar1 commented May 3, 2025

Fix docker-compose.yml to run properly and update readme.md to current configuration/setup.

Run example with Docker and Podman.
@MattBrittan
Copy link
Contributor

Could you please add some detail re what issue this is fixing? (the example runs find for me as-is, I'm not sure why it would need to move to 8080).

@agebhar1
Copy link
Contributor Author
agebhar1 commented May 4, 2025

Sure @MattBrittan.

Running the example with Podman, despite of the logging entry of Mosquitto

mosquitto-1  | 2025-05-04T12:40:38: Opening websockets listen socket on port 80.

the port is not in use which can be confirmed by

/ # netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:1883            0.0.0.0:*               LISTEN      -
tcp        0      0 :::1883                 :::*                    LISTEN      -

The subscribe demo can't connect to Mosquitto via Websocket on port 80 too:

sub-1  | autoPaho:failed to connect to ws://mosquitto:80: websocket connection failed: dial tcp 10.89.13.2:80: connect: connection refused
sub-1  | error whilst attempting connection: failed to connect to ws://mosquitto:80: websocket connection failed: dial tcp 10.89.13.2:80: connect: connection refused

Mosquitto switch from user root to mosquitto. I dont know when it binds to the privileged port. But Podman refuse to use/bind to the privileged port.

Running the example on Docker, everything works as-is.

Changing the port from 80 to 8080 enables the example to run on Docker and Podman.

@MattBrittan
Copy link
Contributor

OK - I guess using non-privilidged ports makes sense. Thanks for the PR.

@MattBrittan MattBrittan merged commit fe504b0 into eclipse-paho:master May 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0