I’ve recently started to use Emoncms and chose to run an instance in Docker as an easy way to start a project.
But I can’t seem to be able to run MQTT within the container even though the MQTT_ENABLED variable is enabled.
No one seem to be watching the emoncms-docker repo anymore.
In theory there should be single docker container for the MQTT server, on top of the web, db and redis container.
So that doesn’t run the Mosquito Broker, just enables Emoncms to talk to any broker.
Excellent idea, that would probably be the easiest, and they provide a docker image.
But any tips on how you configure Emoncms to talk to a broker?
On the Emoncms Admin page, what services are running (if that works in a docker).
Emoncms admin page says:
MQTT Server
Version
Mosquitto ?
Host
localhost:1883 (127.0.0.1)
but no process is listening on the port 1883.
And obviously in a Docker container, you have only one process running, and in this case it’s Apache.
Apologies, it just wasn’t clear to me that MQTT_ENABLED did not mean activating a broker within emoncms.
I just took for granted.
Reading again your message it suddently, and finally!, struck me as evident.
Sorry for my seemingly off-topic messages, it came from the original misunderstanding.
I now have a container with Mosquitto up and running.
But as far as I understand the issue is still basically the same: PHP MQTT input script is a service that needs to be started.
But the docker container starting Emoncms starts an Apache server service, and hence cannot start the MQTT Input as well.
A solution to this issue would be to start another container with MQTT Input service only.
I’m not sure how that could work with the actual Emoncms code base though.
@borpin you must have PHP MQTT input script service up and running somewhere in your setup if you use a container setup. How do you have it up and running along with the Emoncms Apache server?