Page 1 of 1

SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 11:34
by ProjektC
Hi

- New SD Card
- Current Raspberry installed
- All updates and upgrades
- Last stable Domoticz version installed
- Domoticz is started
- Domoticz finished via putty
- Plugins and scripts copied from backup
- Last db database imported

Now Domotizc starts only always offline

bye

Markus

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 13:44
by waltervl
from wiki https://www.domoticz.com/wiki/Raspberry_Pi :
WARNING nov 2021: Raspberry Pi OS based on Bullseye is giving issues with Python plugins on Domoticz 2022.1 Stable!! Please do not upgrade or use this OS version for fresh install (instead use Raspberry Pi OS Legacy, based on Buster). Other option is to move to Domoticz Beta version as it is solved in this version.

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 18:03
by ProjektC
This has something to do with MQTT.
Have installed it but unfortunately it does not work

2022-09-28 18:02:08.076 Error: SellyMQTT: Disconnected from MQTT Server: 192.168.0.184:1883
2022-09-28 18:02:18.097 Error: SellyMQTT: Failed to connect to: 192.168.0.184:1883, Description: Connection refused

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 19:30
by waltervl
That error would not set Domoticz offline.
Is your Domoticz crashing or is it still running but you cannot connect? Did you clear your browser cache as that is the most common solution for user interface issues. Try to access Domoticz with your browser in incognito mode to check.

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 20:53
by PeJeWe
ProjektC wrote: Wednesday 28 September 2022 18:03 This has something to do with MQTT.
Have installed it but unfortunately it does not work

2022-09-28 18:02:08.076 Error: SellyMQTT: Disconnected from MQTT Server: 192.168.0.184:1883
2022-09-28 18:02:18.097 Error: SellyMQTT: Failed to connect to: 192.168.0.184:1883, Description: Connection refused
Perhaps a firewall blocks port 1883 ?

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 21:45
by ProjektC
This was all working so well and now I can't get it to work after hours.

It is a fresh Respberry installation

sudo apt install -y mosquitto mosquitto-clients
sudo systemctl enable mosquitto.service


Synchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mosquitto

mosquitto -v

1664393794: mosquitto version 2.0.11 starting
1664393794: Using default config.
1664393794: Starting in local only mode. Connections will only be possible from clients running on this machine.
1664393794: Create a configuration file which defines a listener to allow remote access.
1664393794: For more details see https://mosquitto.org/documentation/aut ... n-methods/
1664393794: Opening ipv4 listen socket on port 1883.
1664393794: Error: Address already in use
1664393794: Opening ipv6 listen socket on port 1883.
1664393794: Error: Address already in use

sudo mosquitto_passwd -c /etc/mosquitto/passwd mqtt

sudo nano /etc/mosquitto/mosquitto.conf

per_listener_settings true

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
allow_anonymous false
listener 1883
password_file /etc/mosquitto/passwd

sudo systemctl status mosquitto

● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-09-28 21:32:40 CEST; 7min ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Main PID: 3339 (code=exited, status=1/FAILURE)
CPU: 58ms

Sep 28 21:32:40 raspberrypi systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 5.
Sep 28 21:32:40 raspberrypi systemd[1]: Stopped Mosquitto MQTT Broker.
Sep 28 21:32:40 raspberrypi systemd[1]: mosquitto.service: Start request repeated too quickly.
Sep 28 21:32:40 raspberrypi systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Sep 28 21:32:40 raspberrypi systemd[1]: Failed to start Mosquitto MQTT Broker.

I don't understand why this does not work

Re: SD Card defect, new installation after restore offline

Posted: Wednesday 28 September 2022 22:39
by ProjektC
So now Buster installed but has brought nothing.
listener 1883
removed and then it worked

There are unfortunately many sites that write even with 2.0.11 it must be in.