Skip to content
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

Error while starting mosquitto broker with protocol websockets (docker-container) #2308

Closed
MerzMax opened this issue Sep 10, 2021 · 7 comments

Comments

@MerzMax
Copy link

MerzMax commented Sep 10, 2021

I use the mosquitto docker container version 2.0.12.

I can't start the broker with the option "protocol websockets" anymore. This is the output of my container:

mqtt_broker_1  | 1631261934: Error: Invalid protocol value (websockets
mqtt_broker_1  | 1631261934: Error found at /mosquitto/config/mosquitto.conf:2.
mqtt_broker_1 exited with code 0

My mosquitto.conf:

listener 9001
protocol websockets

allow_anonymous true
log_type all
@T81
Copy link

T81 commented Sep 21, 2021

Same issue here

@ralight
Copy link
Contributor

ralight commented Sep 22, 2021

I've just tested this out as below, and it worked fine. Can you give any hints as to what is different in your situation? Or try it exactly as I did?

2308

@MerzMax
Copy link
Author

MerzMax commented Sep 22, 2021

@ralight If i ececute the the same command, I get the following output:

$ more Mosquitto/mosquitto.conf 
listener 9001
protocol websockets

allow_anonymous true
log_type all
$ docker run -it -p 9001:9001 -v ${PWD}/Mosquitto:/mosquitto/config eclipse-mosquitto:2.0.12
Unable to find image 'eclipse-mosquitto:2.0.12' locally
2.0.12: Pulling from library/eclipse-mosquitto
a0d0a0d46f8b: Pull complete
0923389132a8: Pull complete
Digest: sha256:ce08d3fe69d4170cea2426739af86ac95e683f01dd2c4141da661983a2401364
Status: Downloaded newer image for eclipse-mosquitto:2.0.12
).32308106: Error: Invalid protocol value (websockets
1632308106: Error found at /mosquitto/config/mosquitto.conf:2.

@ralight
Copy link
Contributor

ralight commented Sep 22, 2021

@MerzMax Hmm, very interesting. What platform are you running Docker on?

@MerzMax
Copy link
Author

MerzMax commented Sep 22, 2021

@ralight Windows with wsl 2.

@ralight
Copy link
Contributor

ralight commented Sep 22, 2021

Thanks, I'll get myself set up with Docker on WSL 2 and give it a try, it might not be straight away.

@ralight
Copy link
Contributor

ralight commented Sep 22, 2021

This looks to be a duplicate of #2297, I'm going to close this and track it there if that's ok.

@ralight ralight closed this as completed Sep 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants