skip to Main Content

Was trying to install npm and got message "ERROR: npm is known not to run on Node.js v11.4.0"
So unsinstalled nodejs and then mosquitto got stucked.
I can not start it .

pi@raspberrypi:/etc/mosquitto $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@raspberrypi:~ $  sudo systemctl start mosquitto.service
Job for mosquitto.service failed because a fatal signal was delivered to the control process.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.

if I run

pi@raspberrypi:~ $ systemctl status mosquitto.service
● mosquitto.service - Mosquitto MQTT Broker
   Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2022-08-21 15:29:29 -03; 23s ago
     Docs: man:mosquitto.conf(5)
           man:mosquitto(8)
  Process: 820 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
  Process: 821 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
  Process: 822 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
  Process: 823 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
  Process: 824 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=killed, signal=ILL)
 Main PID: 824 (code=killed, signal=ILL)

if I go to the mosquitto folder

pi@raspberrypi:/etc/mosquitto $ ls -l
total 16
drwxr-xr-x 2 root root 4096 Aug 19 14:20 ca_certificates
drwxr-xr-x 2 root root 4096 Aug 19 14:20 certs
drwxr-xr-x 2 root root 4096 Aug 19 14:20 conf.d
-rw-r--r-- 1 root root  385 Aug 20 21:31 mosquitto.conf

And this is my mosquitto.conf file

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.gz

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

listener 1883
allow_anonymous true

I have manually added ,listener and allow, to see if that would make any difference. But same result<

If I run, I get illegal instruction. Do not understand why…

pi@raspberrypi:~ $ sudo /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Illegal instruction

Also can not get version since I get illegal instruction….

pi@raspberrypi:/etc/mosquitto $ mosquitto -v
Illegal instruction
pi@raspberrypi:/etc/mosquitto $ mosquitto -h
Illegal instruction
pi@raspberrypi:/etc/mosquitto $ file 'which mosquitto'
which mosquitto: cannot open `which mosquitto' (No such file or directory)
pi@raspberrypi:/etc/mosquitto $ uname -a
Linux raspberrypi 4.19.75+ #1270 Tue Sep 24 18:38:54 BST 2019 armv6l  GNU/Linux

pi@raspberrypi:~ $ dpkg -s mosquitto
Package: mosquitto
Status: install ok half-configured
Priority: optional
Section: net
Installed-Size: 550
Maintainer: Roger A. Light <[email protected]>
Architecture: armhf
Multi-Arch: foreign
Version: 2.0.12-0mosquitto1~buster1
Config-Version: 1.6.10-0mosquitto1~buster1
Depends: adduser (>= 3.10), lsb-base (>= 4.1+Debian3), libc6 (>= 2.28),   libcjson                 1 (>= 1.7.5), libmosquitto1 (>= 1.6), libssl1.1 (>=  1.1.1), libsystemd0, libwebs                 ockets18 (>= 4.2.1), libwrap0   (>= 7.6-4~)
Suggests: apparmor
Conffiles:
 /etc/init.d/mosquitto ee3001555cef9450c46fb2148c654cd1
 /etc/logrotate.d/mosquitto f74e922f3bf6b513f76d5e47fabfb322
 /etc/mosquitto/ca_certificates/README c1c6ae67f2def06c6a483be09b49d4de
 /etc/mosquitto/certs/README 4d8a70d4cefab07d4dabc5be1f786c1f
 /etc/mosquitto/conf.d/README b4ac621550824082a735732bfb42b51d
 /etc/mosquitto/mosquitto.conf 6b48f97e52925e8cad9f32f991ef100d
Description: MQTT version 3.1/3.1.1/5.0 compatible message broker
This is a message broker that supports version 5.0 and 3.1.1 of the MQTT
protocol.
.
 MQTT provides a method of carrying out messaging using a publish/subscribe model. It is lightweight, both in terms of bandwidth usage  and ease of implementation.  


pi@raspberrypi:~ $ ls /etc/apt
apt.conf.d   listchanges.conf  sources.list    trusted.gpg     trusted.gpg.d
auth.conf.d  preferences.d     sources.list.d  trusted.gpg~
pi@raspberrypi:~ $ ls /etc/apt/sources.list.d
raspi.list
pi@raspberrypi:~ $ cd /etc/apt/sources.list.d
pi@raspberrypi:/etc/apt/sources.list.d $ ls -l
total 4
-rw-r--r-- 1 root root 284 Aug 19 10:55 raspi.list

Inside the file I have

#deb [trusted=yes] http://archive.raspberrypi.org/debian/ buster main
deb http://mirror.ufam.edu.br/raspbian/raspbian/ buster main contrib non- free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main

Any idea how to bring back to life mosquitto?

2

Answers


  1. Chosen as BEST ANSWER

    Found similar problem here https://forums.raspberrypi.com/viewtopic.php?t=334388 fixed with these commands

    apt remove mosquitto libwebsockets18

    apt install mosquitto libwebsockets18=4.2.1-0mosquitto1~buster1


  2. OK,

    I have reproduced this, you installed from the mosquitto ppa which provides both mosquitto and a newer copy of libwebsocket.

    The SIGILL is coming from the libwebsocket library that appears to have been built targeting ARMv7 not ARMv6 (which is what the Pi Zero [W]) is using.

    I have raised this with the mosquitto maintainer, with any luck it will fixed soon and upgrading will fix the problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search