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

Unable to Start Mosquitto MQTT Broker Package #2581

Closed
GitHubDelphi opened this issue Jan 4, 2017 · 14 comments
Closed

Unable to Start Mosquitto MQTT Broker Package #2581

GitHubDelphi opened this issue Jan 4, 2017 · 14 comments
Assignees
Labels

Comments

@GitHubDelphi
Copy link

Package Name: Mosquitto
Package Version: 1.4.9.5

NAS Model: DS1815+
DSM version: DSM 6.0.2-8451 Update 7

Mosquitto package status is "Stopped", even after I try to "Run" the package.
I am looking for MQTT WebSockets protocol support.
I will use the Paho JavaScript Client.

My mosquitto.conf looks like:

listener 1883
listener 9001

protocol websockets

Any help appreciated.

@GitHubDelphi
Copy link
Author

I have tried also with the following conf file, without a blank line between listener and protocol.

My mosquitto.conf looks like:

listener 1883
listener 9001
protocol websockets

Do I perhaps need to run under a specific user? If so, how should this user be set up?

@GitHubDelphi
Copy link
Author

May I please request a fix for the Mosquitto package; there is a bug that the service does not start.
Without the fix the package does not work.

Thank you.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jan 7, 2017

See #2216.

@Dr-Bean Dr-Bean added the dsm 6 label Jan 7, 2017
@GitHubDelphi
Copy link
Author

I do appreciate your trying to help. However, #2216 just does not help me solve problem I am facing.

I would appreciate if you could please describe exactly what needs to be done to make the Mosquitto package start.

Thank you.

@Dr-Bean
Copy link
Contributor

Dr-Bean commented Jan 7, 2017

There is no fix as of right now...this is a very open issue, very much in progress. Subscribe to #2216 to keep informed.

@GitHubDelphi
Copy link
Author

Ok, thanks for your feedback.

@EddyBin
Copy link

EddyBin commented Jan 26, 2017

Is there already an solution ?

I found a workaround but not sure if this would work. Can someone with a little more experience test this
As root you can start it from console with:
sudo su mosquitto -s /bin/sh -

-c "PATH=/usr/local/mosquitto/bin:${PATH} /usr/local/mosquitto/sbin/mosquitto -d -c /usr/local/mosquitto/var/mosquitto.conf" <- that's one command, no line breaks

https://www.bountysource.com/issues/32220873-dsm-6-0-released-report-success-issues-with-packages-here

@GitHubDelphi
Copy link
Author

@EddyBin your link is broken

@EddyBin
Copy link

EddyBin commented Jan 30, 2017

The correct link

The actual item is approximately 25% of the long list by tedstriker

tedstriker commented on this issue 9 months ago.

@ernorv unfortunately this doesn't work with the current DSM 6.0 version.
As root you can start it from console with:
sudo su mosquitto -s /bin/sh -c "PATH=/usr/local/mosquitto/bin:${PATH} /usr/local/mosquitto/sbin/mosquitto -d -c /usr/local/mosquitto/var/mosquitto.conf" <- that's one command, no line breaks.

@EddyBin
Copy link

EddyBin commented Feb 26, 2017

Will the issue be solved with the update to dsm 6.1 ?

@edsenabr
Copy link

Hi, I had the same issue. In order to solve it, I had to add, via Web UI, the user "mosquitto", and edit the start-stop script (/var/packages/mosquitto/scripts/start-stop-status) to keep it from execute mosquitto inside of su session.

If you login as mosquitto and try to execute the bin directly (/usr/local/mosquitto/sbin/mosquitto), you'll notice that it starts fine ONLY if you don't add the -d flag. If you try to run it as a daemon, under the mosquitto user, the process will silently exit, w/o any kind of extra information.

If you login as root and execute it with the daemon flag, it runs w/o any issue. So, in addition to that, I changed the config file (/usr/local/mosquitto/var/mosquitto.conf) to add the option "user mosquitto", so it would automatically drop its privileges, to avoid running it as root.

After that, I was able to start/stop it using the web UI:

image

Best Regards,
Ed.

@robmarkcole
Copy link

Also having this issue, DSM 6.1.1-15101 Update 2 on DS216+II

@ymartin59
Copy link
Contributor

In progress #3025 #3028 #3022

@ymartin59
Copy link
Contributor

Update has been published. Please create new specific issue to report any trouble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
DSM 6.x support
Awaiting triage
Development

No branches or pull requests

6 participants