Help with persistence on mosquitto

I’m having some issues trying to set up persistence on the latest HomeAssistant running on HassOS4.12 on a proxmox VM on an old hp business desktop machine.

The reason i want persistence is as it is recommended in https://github.com/fashberg/WThermostatBeca/blob/a0c6d57c7a9ea49025feda2cebd59055597d35ed/Configuration.md, as i am setting up some mqtt thermostats with autodiscovery using said firmware.

if i set persistence_location, mosquitto fails loading:

mosquitto.conf:

persistence true
persistence_file mosquitto.db
persistence_location /share/mosquitto/
autosave_interval 1800
# The default if not set is to never expire persistent clients.
persistent_client_expiration 24h

log with conf as above:

[11:09:31] INFO: Setup mosquitto configuration
[11:09:31] WARNING: SSL not enabled - No valid certs found!
[11:09:31] INFO: Found local users inside config
[11:09:31] INFO: Initialize Hass.io Add-on services
[11:09:31] INFO: Initialize Home Assistant discovery
[11:09:31] INFO: Start Mosquitto daemon
1598083771: Loading config file /share/mosquitto/mosquitto.conf
1598083771: Error: Duplicate persistence_location value in configuration.
1598083771: Error found at /share/mosquitto/mosquitto.conf:3.
1598083771: Error found at /etc/mosquitto.conf:29.

There is no /etc/mosquitto.conf on the system, neither is there another mosquitto.conf in the system.

with no persistence location set mosquitto runs:

persistence true
persistence_file mosquitto.db
# persistence_location /share/mosquitto/
autosave_interval 1800
# The default if not set is to never expire persistent clients.
persistent_client_expiration 24h

and i get:

[11:13:42] INFO: Setup mosquitto configuration
[11:13:42] WARNING: SSL not enabled - No valid certs found!
[11:13:42] INFO: Found local users inside config
[11:13:42] INFO: Initialize Hass.io Add-on services
[11:13:42] INFO: Initialize Home Assistant discovery
[11:13:42] INFO: Start Mosquitto daemon
1598084022: Loading config file /share/mosquitto/mosquitto.conf
1598084022: mosquitto version 1.6.3 starting
1598084022: Config loaded from /etc/mosquitto.conf.
1598084022: Loading plugin: /usr/share/mosquitto/auth-plug.so
1598084022: |-- *** auth-plug: startup
1598084022:  ├── Username/password checking enabled.
1598084022:  ├── TLS-PSK checking enabled.
1598084022:  └── Extended authentication not enabled.
1598084022: Opening ipv4 listen socket on port 1883.
1598084022: Opening ipv6 listen socket on port 1883.
1598084022: Opening websockets listen socket on port 1884.
1598084022: Warning: Mosquitto should not be run as root/administrator.
1598084023: New connection from 192.168.10.120 on port 1883.
[INFO] found mqttuser on local database
1598084023: New client connected from 192.168.10.120 as mqttjs_f48937b6 (p2, c1, k60, u'mqttuser').
1598084024: New client connected from 192.168.10.127 as thermostat-13598337 (p2, c1, k15, u'mqttuser').
1598084024: New connection from 192.168.10.128 on port 1883.
1598084024: New client connected from 192.168.10.128 as thermostat-6059765 (p2, c1, k15, u'mqttuser').
1598084025: New connection from 192.168.10.119 on port 1883.
1598084025: New client connected from 192.168.10.119 as mqtt_da0643ce.cefbe (p1, c1, k60, u'mqttuser').
1598084137: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1598084137: New client connected from 172.30.32.1 as auto-B531E23D-F95A-B22F-2D2C-41D84D3A89E3 (p2, c1, k60, u'homeassistant').
1598085822: Saving in-memory database to /data/mosquitto.db.
1598087623: Saving in-memory database to /data/mosquitto.db.
1598089425: Saving in-memory database to /data/mosquitto.db.
1598091225: Saving in-memory database to /data/mosquitto.db.
1598093027: Saving in-memory database to /data/mosquitto.db.
1598094828: Saving in-memory database to /data/mosquitto.db.
1598096629: Saving in-memory database to /data/mosquitto.db.
1598097605: Socket error on client mqttjs_f48937b6, disconnecting.
1598097619: New connection from 192.168.10.120 on port 1883.
[INFO] found mqttuser on local database
1598097619: New client connected from 192.168.10.120 as mqttjs_94dd51b6 (p2, c1, k60, u'mqttuser').
1598098430: Saving in-memory database to /data/mosquitto.db.

However, mosquitto.db isn´t created (nor updated after i created it manually). I´ve given w rights to root, group and other to the file and directory.

Any ideas on getting this to work?

Hi, have you solve the problem?
Thanks

Thanks for replying. Tbh i can’t even remember what happened with this thing.