Trying to get MQTT broker on Alpine running => keeps crashing
Hi, I'm trying to get Eclipse MQTT broker to work in a Alpine Linux LXC (on Proxmox).
I'm not very skilled with Linux, use it now with a Debian LXC because there is just more information about Debian. Recently I discovered Alpine, managed to get WireGuard running on it and I'm very surprised of the speed/small footprint. So now I'm trying to do the same with MQTT but I'm struggling for hours and hours to get it working and cannot find a lot of information about this combo. Any help to get this working is highly appreciated! P. |
Ok, I've replied. Now we use the information you provide in most cases to diagnose your problem(s). You've given us nothing, so that ends there.
What's your pc spec & distro? It's on github, so how did the compile go? Errors? What errors (copy & paste message or log snippet) |
Hi, thanks for jumping in!
I do not have much details since I don't know that much about Linux, and even less about Alpine. Do you think that my HW has a role in this issue? My Proxmox is up-to-date with Bookworm and the LXC Alpine v3.19.1 As you can see from the link that I posted, there is a package for mosquitto, so I didn't compile it myself. |
What have you done, and what goes wrong? Describe how you got the package installed, and what it said when you tried to run it. What's mosquito? What's Alpine? What installer do they use? I'm going away if I can't get some sense of what your problem. Read post #2 again. Then answer my questions.
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Distro: from my OP, Proxmox (Debian based), Alpine Linux container. |
Don't decide for me what's important or not. In a virtual environment, The assigned cores, ram, swap & disk space could all be important.
Find the main binary or binaries, probably in /usr/bin. Then run Code:
ldd /path/to/binary |grep found Then run the main binary or it's startup script by hand in a terminal, and post any output that comes up. |
So I have nailed it down.
The pid file could not be written because of a directory not being created. I created it manually with: Code:
sudo mkdir /var/run/mosquitto/ && sudo chown mosquitto: /var/run/mosquitto But, after a reboot this directory gets deleted. Any idea why this happens? |
Good.
As for the directory, probably everything in /var/run is deleted during shutdown in case there's some stray stuff hanging about. So why not recreate it in rc.local or some other startup script? Code:
install -o mosquitto -d /var/run/mosquitto |
All times are GMT -5. The time now is 09:10 PM. |