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

Steps to install mosquitto broker over websockets on Amazon Linux #699

Open
romuye123 opened this issue Feb 16, 2018 · 2 comments
Open

Steps to install mosquitto broker over websockets on Amazon Linux #699

romuye123 opened this issue Feb 16, 2018 · 2 comments

Comments

@romuye123
Copy link

romuye123 commented Feb 16, 2018

I am looking out for step by step guide to install mosquitto broker over websockets for Amazon Linux(AMI - ec2 instance).

  1. I tried following these instructions(using mosquitto package with yum):
    http:https://blog.yatis.io/install-secure-robust-mosquitto-mqtt-broker-aws-ubuntu/

And i get following error:
Starting Mosquitto MQTT brokerError: Websockets support not available.

  1. I tried installing by downloading the source from Git and building (with following steps):
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc
make
sudo make install

wget http:https://mosquitto.org/files/source/mosquitto-1.4.10.tar.gz
tar xvzf mosquitto-1.4.10.tar.gz
cd mosquitto-1.4.10/
sudo nano config.mk
Change WITH_WEBSOCKETS to yes
make
sudo make install
sudo service mosquitto start

And i get following error:
mosquitto: unrecognized service

I have been following this issue on git since last few days:
#538

Unable to understand to how to install the mosquitto broker properly. Please help.

@AdamMiltonBarker
Copy link

Well here is a doc I found yesterday, at the bottom there is info on Websockets on Amazon, maybe some helpful info there.

https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#mqtt-ws

Re the issue you are having with Websockets, try find if you have multiple versions of Mosquitto installed this was my issue in the issue you replied to, once I removed that it worked correctly. Here are some things I found just now that may help you:

https://medium.com/@achildrenmile/mqtt-broker-on-aws-ec2-hands-on-install-configure-test-out-f12dd2f5c9d0

http:https://blog.yatis.io/install-secure-robust-mosquitto-mqtt-broker-aws-ubuntu/

@AdamMiltonBarker
Copy link

I would make sure you remove everything you have installed so far in attempts to avoid conflicts, how I got into the situation in my issue was from upgrading the broker.

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

No branches or pull requests

1 participant