dianlight / hassio-addons

Hassio.io
MIT License
134 stars 48 forks source link

🐛 [Samba NAS] MQTT constantly crashing #247

Open Morphy99 opened 1 month ago

Morphy99 commented 1 month ago

Addon

SambaNAS

Description

I'm trying to SMART status via MQTT however it seems as though it keeps crashing. Using HAOS and the Mosquitto broker addon

Reproduction steps

1. Go to 'Addon configuration, enable mqtt_enable '
2. Add user name, password, topic and port

Addon Logs

2024-08-04 14:22:50,435:wsdd INFO(pid 590): using pre-defined UUID cb6a33a0-b841-531d-a34e-09ecec492eb1
2024-08-04 14:22:50,436:wsdd INFO(pid 590): joined multicast group 239.255.255.250 on 192.168.0.5%enp3s0

2024-08-04 14:22:50,438:wsdd INFO(pid 590): scheduling Hello message via enp3s0 to 239.255.255.250%enp3s0
[14:22:50] INFO: Enabling S.M.A.R.T for /dev/sdf
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours. 

[14:22:50] INFO: Enabling S.M.A.R.T for /dev/sdg
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
2024-08-04 14:22:50,656:wsdd INFO(pid 590): joined multicast group [ff02::c] on fe80::1d8e:6fb6:7618:244a%enp3s0
2024-08-04 14:22:50,656:wsdd INFO(pid 590): scheduling Hello message via enp3s0 to ff02::c%enp3s0
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours. 

[14:22:50] INFO: Enabling S.M.A.R.T for /dev/sdh
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

[14:22:50] INFO: Enabling S.M.A.R.T for /dev/nvme0
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

s6-rc: info: service init-smartd successfully started
2024-08-04 14:22:50,851:wsdd INFO(pid 590): 192.168.0.3 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-04 14:22:50,851:wsdd INFO(pid 590): 192.168.0.3 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-04 14:22:50,861:wsdd INFO(pid 590): fe80::ce6e:f020:5d05:dfa9 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-04 14:22:50,863:wsdd INFO(pid 590): fe80::ce6e:f020:5d05:dfa9 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
smbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
nmbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
INFO: Profiling support unavailable in this build.

No locked files                                                                                                                                                                                                                     
Samba version 4.18.9                                                                                                                                                                                                                
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing                                                                                                          
----------------------------------------------------------------------------------------------------------------------------------------                                                                                            

Service      pid     Machine       Connected at                     Encryption   Signing                                                                                                                                            
---------------------------------------------------------------------------------------------                                                                                                                                       

[14:22:54] ERROR: Got unexpected response from the API: Mounting NAS1 did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-NAS1.mount for details.
[14:22:54] WARNING: Retry 1/3 Error Automount NAS1 Msg: {"name":"NAS1","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS1","username":"_ha_mount_user_","password":"********"}
[14:22:55] ERROR: Got unexpected response from the API: Could not unmount NAS5 due to: Transaction for mnt-data-supervisor-mounts-NAS5.mount/stop is destructive (mnt-data-supervisor-mounts-NAS5.mount has 'start' job queued, but 'stop' is included in transaction).
[14:22:55] WARNING: Retry 1/3 Error Automount NAS5 Msg: {"name":"NAS5","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS5","username":"_ha_mount_user_","password":"********"}
[14:22:56] ERROR: Got unexpected response from the API: Reloading NAS5 did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-NAS5.mount for details.
[14:22:56] WARNING: Retry 2/3 Error Automount NAS5 Msg: {"name":"NAS5","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS5","username":"_ha_mount_user_","password":"********"}
[14:22:58] ERROR: Got unexpected response from the API: Could not unmount SYSTEM due to: Transaction for mnt-data-supervisor-mounts-SYSTEM.mount/stop is destructive (mnt-data-supervisor-mounts-SYSTEM.mount has 'start' job queued, but 'stop' is included in transaction).
[14:22:58] WARNING: Retry 1/3 Error Automount SYSTEM Msg: {"name":"SYSTEM","usage":"media","type":"cifs","server":"172.30.32.1","share":"SYSTEM","username":"_ha_mount_user_","password":"********"}
[14:22:59] ERROR: Got unexpected response from the API: Reloading SYSTEM did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-SYSTEM.mount for details.
[14:22:59] WARNING: Retry 2/3 Error Automount SYSTEM Msg: {"name":"SYSTEM","usage":"media","type":"cifs","server":"172.30.32.1","share":"SYSTEM","username":"_ha_mount_user_","password":"********"}
s6-rc: info: service cifs-supervisor-mount successfully started
s6-rc: info: service mqtt-disk-handler: starting
s6-rc: info: service mqtt-disk-handler successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
s6-rc: info: service legacy-services: starting
[14:23:00] INFO: Starting the MQTT daemon for partitions info...
[14:23:00] INFO: Starting the MQTT daemon for disks info...
[14:23:00] INFO: MQTT integration
s6-rc: info: service legacy-services successfully started 
[14:23:03] INFO: MQTT disk cleanup.
Timed out
s6-supervise mqtt-disk-handler: warning: finish script lifetime reached maximum value - sending it a SIGKILL
[14:23:09] INFO: Starting the MQTT daemon for disks info...
Timed out
[14:23:11] INFO: MQTT disk cleanup.
Timed out
s6-supervise mqtt-disk-handler: warning: finish script lifetime reached maximum value - sending it a SIGKILL
*****

Samba name server NUCCTV is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.5

*****
*****

Samba name server NUCCTV is now a local master browser for workgroup WORKGROUP on subnet 172.30.32.1

*****
Timed out
[14:23:17] INFO: Starting the MQTT daemon for disks info...
[14:23:20] INFO: MQTT disk cleanup.
Timed out
s6-supervise mqtt-disk-handler: warning: finish script lifetime reached maximum value - sending it a SIGKILL
Timed out

Addon Config

workgroup: WORKGROUP
username: ha
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 169.254.0.0/16
  - fe80::/10
  - fc00::/7
automount: true
moredisks: []
mountoptions:
  - nosuid
  - relatime
  - noexec
available_disks_log: true
medialibrary:
  enable: true
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false
recyle_bin_enabled: false
wsdd2: false
mqtt_nexgen_entities: false
autodiscovery: {}
other_users: []
acl: []
interfaces: []
password: ***
mqtt_enable: true

Architecture

amd64

OS

HaOS

dianlight commented 1 month ago

The connection to MQTT not seem work. I need the full addon's startup logs tho try to understand the reason.

Morphy99 commented 1 month ago

Updated with full log

Morphy99 commented 1 month ago

I also get an addon crash if I enable mqtt_nexgen_entities

s6-rc: info: service mqtt-disk-handler: starting
s6-rc: info: service mqtt-disk-handler successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
s6-rc: info: service legacy-services: starting
[17:05:55] INFO: Starting the MQTT daemon for partitions info...
[17:05:55] INFO: New MQTT integration
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
  File "/usr/local/bin/mqtt_daemon.py", line 236, in <module>
    devlist = DeviceList()
              ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pySMART/device_list.py", line 64, in _                                                                                                                                                             _init__
    self.initialize(catch_errors)
  File "/usr/lib/python3.11/site-packages/pySMART/device_list.py", line 134, in                                                                                                                                                              initialize
    raise e
  File "/usr/lib/python3.11/site-packages/pySMART/device_list.py", line 123, in                                                                                                                                                              initialize
    Device(name, interface=interface, smartctl=self.smartctl))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pySMART/device.py", line 93, in __init                                                                                                                                                             __
    raise ValueError(
ValueError: Unknown interface: sntjmicron specified for /dev/sde
[17:06:00] WARNING: mqtt-handler crashed, halting add-on
Morphy99 commented 1 month ago

I also get these messages in the log occasionally:

[17:16:51] ERROR: Got unexpected response from the API: Could not unmount NAS5 due to: Transaction for mnt-data-supervisor-mounts-NAS5.mount/stop is destructive (mnt-data-supervisor-mounts-NAS5.mount has 'start' job queued, but 'stop' is included in transaction).
[17:16:51] WARNING: Retry 1/3 Error Automount NAS5 Msg: {"name":"NAS5","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS5","username":"_ha_mount_user_","password":"********"}
[17:16:53] ERROR: Got unexpected response from the API: Reloading NAS5 did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-NAS5.mount for details.
[17:16:53] WARNING: Retry 2/3 Error Automount NAS5 Msg: {"name":"NAS5","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS5","username":"_ha_mount_user_","password":"********"}
dianlight commented 1 month ago

I need the early startup addon's logs. It seem that the communication between the addon and the supervisor don't work.

Your environment?

Do you have an internal or external mqtt server?

Morphy99 commented 1 month ago

So I've disabled a few addons and now it seems to work... I'll do some more troubleshooting to see if I can figure out what it is. I'm running HA OS and Mosquitto Addon.

I'm only seeing 3 of the 6 HDD's as sensors in the MQTT integration? Do you still need the full log? EDIT: I've enabled mqtt_nexgen_entities and now seeing them all.

Morphy99 commented 1 month ago

Is there any way to correlate physical disks' smart status and the partitions they contain in HA OS?

Morphy99 commented 1 month ago

UPDATE: I've rebooted the system into UBUNTU live to correlate physical disks' smart status and the partitions they contain and upon rebooting back into HA OS the MQTT issue is back. I've updated my OP with the full log and MQTT enabled. This is the log with mqtt_nexgen_entities:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------

 Add-on: Samba NAS
 Expose Home Assistant disc with SMB/CIFS
-----------------------------------------------------------
 Add-on version: 12.2.0-nas2
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.4  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.5.5
 Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-automount: starting
[14:23:19] INFO: Protection Mode is false
[14:23:19] INFO: MoreDisk or Automount option found!
modprobe: module ntfs3 not found in modules.dep
[14:23:19] WARNING: ntfs3 module not available!
modprobe: module exfat not found in modules.dep
[14:23:19] WARNING: exfat module not available!
modprobe: module xfs not found in modules.dep
[14:23:19] WARNING: xfs module not available!
---------------------------------------------------
Supported fs:   ext3    ext2    ext4    squashfs        vfat    msdos   iso9660 btrfs
---------------------------------------------------
[14:23:19] INFO: MediaLibrary option found!
---------------------------------------------------
[14:23:19] INFO: Available Disk Labels:
[14:23:19] INFO:        NAS1[ext4]
[14:23:20] INFO:        NAS2[ext4]
[14:23:20] INFO:        NAS6[ext4]
[14:23:21] INFO:        frigate[ext4]
[14:23:21] INFO:        NAS4[ntfs]
[14:23:21] INFO:        Ubuntu 23.04 amd64[iso9660]
[14:23:21] INFO:        ESP[vfat]
[14:23:21] INFO:        writable[ext4]
[14:23:21] INFO:        NAS5[ext4]
[14:23:21] INFO:        NAS3[ext4]
---------------------------------------------------
[14:23:21] INFO: No MoreDisks to mount
[14:23:21] INFO: Automount is Enabled!
---------------------------------------------------
[14:23:21] INFO: Checking Mounting disks for reserved names:

        ESP
        NAS1
        NAS2
        NAS3
        NAS4
        NAS5
        NAS6
        Ubuntu 23.04 amd64
        frigate
        writable
---------------------------------------------------
---------------------------------------------------
[14:23:21] INFO: Mounting disks:

        ESP
        NAS1
        NAS2
        NAS3
        NAS4
        NAS5
        NAS6
        Ubuntu 23.04 amd64
        frigate
        writable
---------------------------------------------------
[14:23:21] WARNING: Your ESP is vfat. Permissions and ACL don't works and this is an EXPERIMENTAL support
[14:23:22] INFO: Mount ESP[vfat] Success!
[14:23:22] INFO: Mount NAS1[ext4] Success!
[14:23:22] INFO: Mount NAS2[ext4] Success!
[14:23:22] INFO: Mount NAS3[ext4] Success!
[14:23:22] WARNING: Your NAS4 is ntfs. This is an EXPERIMENTAL support
mount: /mnt/NAS4: unknown filesystem type 'ntfs3'.
       dmesg(1) may have more information after failed mount system call.
[14:23:22] WARNING: Fail to mount NAS4 nosuid,relatime,noexec !
[14:23:22] INFO: Mount NAS5[ext4] Success!
[14:23:22] INFO: Mount NAS6[ext4] Success!
mount: /mnt/Ubuntu 23.04 amd64: WARNING: source write-protected, mounted read-only.
[14:23:23] INFO: Mount Ubuntu 23.04 amd64[iso9660] Success!
[14:23:23] INFO: Mount frigate[ext4] Success!
[14:23:23] INFO: Mount writable[ext4] Success!
s6-rc: info: service init-automount successfully started
s6-rc: info: service init-smartd: starting
s6-rc: info: service init-samba: starting
s6-rc: info: service hd-idle: starting
s6-rc: info: service hd-idle successfully started
[14:23:23] INFO: Hostname: nucctv
[14:23:23] INFO: Interfaces: enp4s0 enp3s0
[14:23:23] INFO: Enabling S.M.A.R.T for /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

[14:23:23] INFO: Docker Interface: hassio 172.30.32.0/23
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/private/passdb.tdb file.
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
Added user ha.
SMART Attribute Autosave Enabled.
Added user _ha_mount_user_.
SMART Automatic Offline Testing Enabled every four hours.
---------------------------------------------------
[14:23:23] INFO: Exposed Disks Summary:
[CONFIG]                path = /homeassistant # TM:false  FS:native  #
[ADDONS]                path = /addons # TM:false  FS:native  #
[SSL]                   path = /ssl # TM:false  FS:native  #
[SHARE]                 path = /share # TM:false  FS:native  #
[BACKUP]                path = /backup # TM:false  FS:native  #
[MEDIA]                 path = /media # TM:false  FS:native  #
[ADDON_CONFIGS]         path = /addon_configs # TM:false  FS:native  #
[ESP]                   path = /mnt/ESP # TM:unsupported USAGE:media  FS:vfat  #
[NAS1]                  path = /mnt/NAS1 # TM:true USAGE:media  FS:ext4  #
[NAS2]                  path = /mnt/NAS2 # TM:true USAGE:media  FS:ext4  #
[NAS3]                  path = /mnt/NAS3 # TM:true USAGE:media  FS:ext4  #
[NAS5]                  path = /mnt/NAS5 # TM:true USAGE:media  FS:ext4  #
[NAS6]                  path = /mnt/NAS6 # TM:true USAGE:media  FS:ext4  #
[UBUNTU 23_04 AMD64]    path = /mnt/Ubuntu 23.04 amd64 # TM:true USAGE:media  FS:native  #
[FRIGATE]               path = /mnt/frigate # TM:true USAGE:media  FS:ext4  #
[WRITABLE]              path = /mnt/writable # TM:true USAGE:media  FS:ext4  #
---------------------------------------------------
s6-rc: info: service init-samba successfully started
s6-rc: info: service init-mqtt: starting
s6-rc: info: service wsdd: starting
s6-rc: info: service smbd: starting
s6-rc: info: service nmbd: starting
s6-rc: info: service avahi: starting
s6-rc: info: service wsdd successfully started
s6-rc: info: service avahi successfully started
s6-rc: info: service smbd successfully started
s6-rc: info: service nmbd successfully started
s6-rc: info: service cifs-supervisor-mount: starting

[14:23:23] INFO: Starting the AVAHI for nucctv...
[14:23:23] INFO: Enabling S.M.A.R.T for /dev/sdb
Waiting for daemon ...
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

[14:23:23] INFO: Automount Shares...
[14:23:23] INFO: Starting the wsdd daemon for WORKGROUP/nucctv...
[14:23:23] INFO: Interfaces: -i enp4s0 -i enp3s0
[14:23:23] INFO: Wait Samba Server to going up..(max 30s)
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
s6-rc: info: service init-mqtt successfully started
SMART Enabled.
SMART Attribute Autosave Enabled.
2024-08-05 14:23:23,968:wsdd INFO(pid 648): using pre-defined UUID cb6a33a0-b841-531d-a34e-09ecec492eb1
2024-08-05 14:23:23,968:wsdd INFO(pid 648): joined multicast group 239.255.255.250 on 192.168.0.5%enp3s0
2024-08-05 14:23:23,970:wsdd INFO(pid 648): scheduling Hello message via enp3s0 to 239.255.255.250%enp3s0
SMART Automatic Offline Testing Enabled every four hours.

[14:23:23] INFO: Enabling S.M.A.R.T for /dev/sdc
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.

[14:23:24] INFO: Enabling S.M.A.R.T for /dev/sde
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

2024-08-05 14:23:24,195:wsdd INFO(pid 648): joined multicast group [ff02::c] on fe80::1d8e:6fb6:7618:244a%enp3s0
2024-08-05 14:23:24,195:wsdd INFO(pid 648): scheduling Hello message via enp3s0 to ff02::c%enp3s0
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.
2024-08-05 14:23:24,347:wsdd INFO(pid 648): 192.168.0.3 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-05 14:23:24,348:wsdd INFO(pid 648): 192.168.0.3 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-05 14:23:24,358:wsdd INFO(pid 648): fe80::ce6e:f020:5d05:dfa9 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -
2024-08-05 14:23:24,360:wsdd INFO(pid 648): fe80::ce6e:f020:5d05:dfa9 - - "POST /cb6a33a0-b841-531d-a34e-09ecec492eb1 HTTP/1.1" 200 -

[14:23:24] INFO: Enabling S.M.A.R.T for /dev/sdg
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.

[14:23:24] INFO: Enabling S.M.A.R.T for /dev/sdh
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.

[14:23:24] INFO: Enabling S.M.A.R.T for /dev/nvme0
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.33-haos] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

NVMe device successfully opened

Use 'smartctl -a' (or '-x') to print SMART (and more) information

s6-rc: info: service init-smartd successfully started
nmbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
smbd version 4.18.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
INFO: Profiling support unavailable in this build.

No locked files
Samba version 4.18.9
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing
----------------------------------------------------------------------------------------------------------------------------------------

Service      pid     Machine       Connected at                     Encryption   Signing
---------------------------------------------------------------------------------------------

[14:23:28] ERROR: Got unexpected response from the API: Could not unmount NAS3 due to: Transaction for mnt-data-supervisor-mounts-NAS3.mount/stop is destructive (mnt-data-supervisor-mounts-NAS3.mount has 'start' job queued, but 'stop' is included in transaction).
[14:23:28] WARNING: Retry 1/3 Error Automount NAS3 Msg: {"name":"NAS3","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS3","username":"_ha_mount_user_","password":"********"}
[14:23:29] ERROR: Got unexpected response from the API: Reloading NAS3 did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-NAS3.mount for details.
[14:23:29] WARNING: Retry 2/3 Error Automount NAS3 Msg: {"name":"NAS3","usage":"media","type":"cifs","server":"172.30.32.1","share":"NAS3","username":"_ha_mount_user_","password":"********"}
[14:23:30] ERROR: Got unexpected response from the API: Could not unmount UBUNT due to: Transaction for mnt-data-supervisor-mounts-UBUNT.mount/stop is destructive (mnt-data-supervisor-mounts-UBUNT.mount has 'start' job queued, but 'stop' is included in transaction).
[14:23:30] WARNING: Retry 1/3 Error Automount UBUNT Msg: {"name":"UBUNT","usage":"media","type":"cifs","server":"172.30.32.1","share":"UBUNT","username":"_ha_mount_user_","password":"********"}
[14:23:31] ERROR: Got unexpected response from the API: Reloading UBUNT did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-UBUNT.mount for details.
[14:23:31] WARNING: Retry 2/3 Error Automount UBUNT Msg: {"name":"UBUNT","usage":"media","type":"cifs","server":"172.30.32.1","share":"UBUNT","username":"_ha_mount_user_","password":"********"}
[14:23:33] ERROR: Got unexpected response from the API: Mounting UBUNT did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-UBUNT.mount for details.
[14:23:33] WARNING: Retry 3/3 Error Automount UBUNT Msg: {"name":"UBUNT","usage":"media","type":"cifs","server":"172.30.32.1","share":"UBUNT","username":"_ha_mount_user_","password":"********"}
[14:23:34] INFO: Share Already Found FRIGATE - Remove!

[14:23:34] INFO: Share Already Found WRITABLE - Remove!

[14:23:34] ERROR: Got unexpected response from the API: Could not unmount WRITABLE due to: Transaction for mnt-data-supervisor-mounts-WRITABLE.mount/stop is destructive (mnt-data-supervisor-mounts-WRITABLE.mount has 'start' job queued, but 'stop' is included in transaction).
[14:23:34] WARNING: Retry 1/3 Error Automount WRITABLE Msg: {"name":"WRITABLE","usage":"media","type":"cifs","server":"172.30.32.1","share":"WRITABLE","username":"_ha_mount_user_","password":"********"}
[14:23:35] ERROR: Got unexpected response from the API: Reloading WRITABLE did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-WRITABLE.mount for details.
[14:23:35] WARNING: Retry 2/3 Error Automount WRITABLE Msg: {"name":"WRITABLE","usage":"media","type":"cifs","server":"172.30.32.1","share":"WRITABLE","username":"_ha_mount_user_","password":"********"}
s6-rc: info: service cifs-supervisor-mount successfully started
s6-rc: info: service mqtt-disk-handler: starting
s6-rc: info: service mqtt-disk-handler successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
s6-rc: info: service legacy-services: starting
[14:23:36] INFO: Starting the MQTT daemon for partitions info...
[14:23:36] INFO: New MQTT integration
s6-rc: info: service legacy-services successfully started
  + Exception Group Traceback (most recent call last):
  |   File "/usr/local/bin/mqtt_daemon.py", line 551, in <module>
  |     asyncio.run(run())
  |   File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
  |     return runner.run(main)
  |            ^^^^^^^^^^^^^^^^
  |   File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
  |     return future.result()
  |            ^^^^^^^^^^^^^^^
  |   File "/usr/local/bin/mqtt_daemon.py", line 528, in run
  |     async with asyncio.TaskGroup() as tg:
  |   File "/usr/lib/python3.11/asyncio/taskgroups.py", line 145, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/usr/local/bin/mqtt_daemon.py", line 469, in publish_states
    |     sensor[1].sensor.set_state(sensor[1].state_function(sensor[1]))  # type: ignore
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/bin/mqtt_daemon.py", line 409, in partitionUsage
    |     return psutil.disk_usage(ce.sensorInfo.device.identifiers[-1]).percent
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/lib/python3.11/site-packages/psutil/__init__.py", line 2049, in disk_usage
    |     return _psplatform.disk_usage(path)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/lib/python3.11/site-packages/psutil/_psposix.py", line 185, in disk_usage
    |     st = os.statvfs(path)
    |          ^^^^^^^^^^^^^^^^
    | FileNotFoundError: [Errno 2] No such file or directory: '/mnt/Ubuntu\\04023.04\\040amd64'
    +------------------------------------
[14:23:45] WARNING: mqtt-handler crashed, halting add-on
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-smartd: stopping
s6-rc: info: service mqtt-handler: stopping
s6-rc: info: service hd-idle: stopping
s6-rc: info: service avahi: stopping
s6-rc: info: service mqtt-handler successfully stopped
s6-rc: info: service mqtt-disk-handler: stopping
s6-rc: info: service init-smartd successfully stopped
Got SIGTERM, quitting.
[14:23:45] INFO: hd-idle stopped
s6-rc: info: service hd-idle successfully stopped
[14:23:45] INFO: avahi stopped
s6-rc: info: service avahi successfully stopped
[14:23:45] INFO: mqtt-handler stopped
s6-rc: info: service mqtt-disk-handler successfully stopped
s6-rc: info: service init-mqtt: stopping
s6-rc: info: service cifs-supervisor-mount: stopping
s6-rc: info: service init-mqtt successfully stopped
[14:23:45] INFO: Umount Network Automount Shares...
[14:23:45] INFO: Return from Umount
[14:23:45] INFO: Return from Umount
[14:23:45] INFO: Return from Umount
[14:23:45] INFO: Return from Umount
[14:23:45] INFO: Return from Umount
[14:23:45] INFO: Return from Umount
[14:23:45] ERROR: Got unexpected response from the API: Cannot remove 'UBUNT', no mount exists with that name
s6-rc: warning: unable to stop service cifs-supervisor-mount: command exited 1
s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 1
Got SIGTERM: going down...
2024-08-05 14:23:45,988:wsdd INFO(pid 648): received termination/interrupt signal, tearing down
2024-08-05 14:23:45,988:wsdd INFO(pid 648): shutting down gracefully...
2024-08-05 14:23:45,988:wsdd INFO(pid 648): scheduling Bye message via enp3s0 to 239.255.255.250%enp3s0
2024-08-05 14:23:45,989:wsdd INFO(pid 648): received termination/interrupt signal, tearing down
[14:23:46] INFO: smbd stopped
[14:23:46] INFO: nmbd stopped
[14:23:46] INFO: wsdd stopped

This is the log from Mosquitto:

2024-08-05 14:23:42: New connection from 172.30.32.1:59789 on port 1883.
2024-08-05 14:23:42: New client connected from 172.30.32.1:59789 as auto-4CFA9672-CAD2-E3BD-C2AC-49ADA499B5AC (p2, c1, k60, u'mqtt').
2024-08-05 14:23:42: New connection from 172.30.32.1:48991 on port 1883.
2024-08-05 14:23:42: New client connected from 172.30.32.1:48991 as auto-B6F7DFE7-60DA-8B88-4294-FA7FA18415F3 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:42: New connection from 172.30.32.1:36177 on port 1883.
2024-08-05 14:23:42: New client connected from 172.30.32.1:36177 as auto-B37A8E7D-FC50-3F7B-E8BB-915831BD04B7 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:47129 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:47129 as auto-7A2E4E78-81B0-F42B-7CEE-801B1EB90B11 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:53177 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:53177 as auto-5F75725C-B78E-3E55-4989-27F2DE162473 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:43007 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:43007 as auto-467B6C69-322A-A3A4-3C50-003322590B3A (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:44743 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:44743 as auto-803F0187-F147-DCD4-5953-B40761566250 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:42449 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:42449 as auto-9BD0581C-7894-AAF3-050E-737EA16FFC3F (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:46245 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:46245 as auto-D09BFE51-61CF-B166-2B1B-2FF02D09ACF6 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:58645 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:58645 as auto-98DD1DCC-C232-44DC-D469-3BB7FF72654B (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:56943 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:56943 as auto-485CB922-2C61-68B1-EAB8-6ECAC0A33F3B (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:50203 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:50203 as auto-682A42CD-E3BD-37DE-F3FA-B761C99D7711 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:36065 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:36065 as auto-E306E09D-5895-BB96-A2A5-BF92C954E750 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:36695 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:36695 as auto-AD53A64B-5467-0C95-6BB6-A91CBD577AFE (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:45547 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:45547 as auto-7A1F7048-7BDD-D8B4-8FFD-9EA8597EB24F (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:55321 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:55321 as auto-36D9E30F-3780-DF72-8DB9-C9C74A5775A0 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:51397 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:51397 as auto-0A1626F9-6F6C-D068-3EED-479499780526 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:53475 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:53475 as auto-ABDA3A15-32F9-9289-5BDD-CF4F467A9F87 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:39177 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:39177 as auto-E8D0262C-BB9A-A600-D37B-81C69054751A (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:50249 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:50249 as auto-9F0E1309-35DD-FAFE-2907-D07E6D806891 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:37503 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:37503 as auto-19ED669C-B097-E272-7CD3-29DE4A45CD1F (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:40031 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:40031 as auto-6E17742E-4500-7CA9-FDEF-8D9641AAF725 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:35977 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:35977 as auto-325A3783-3C2A-E1C7-F176-3161023A9AC1 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:47891 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:47891 as auto-268471AB-5959-050A-F4AE-C6DBE5B0C712 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:41121 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:41121 as auto-9D33306D-4A0F-3CCE-989F-3E4436B2172C (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:45737 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:45737 as auto-DACBE0A6-50CF-82FE-8522-D18E5BA09BA1 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:46145 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:46145 as auto-32221C62-2CF4-C293-30DD-36D5D4F3D62C (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:59091 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:59091 as auto-13F1AA0D-6C75-80A3-3AD1-22A114E006E7 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:48427 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:48427 as auto-F1D066F9-2355-B4A6-4044-992A8C4921D3 (p2, c1, k60, u'mqtt').
2024-08-05 14:23:43: New connection from 172.30.32.1:32869 on port 1883.
2024-08-05 14:23:43: New client connected from 172.30.32.1:32869 as auto-430330AF-9E9A-B180-B378-AD3D96E23D8F (p2, c1, k60, u'mqtt').
2024-08-05 14:23:45: Client auto-430330AF-9E9A-B180-B378-AD3D96E23D8F closed its connection.
2024-08-05 14:23:45: Client auto-F1D066F9-2355-B4A6-4044-992A8C4921D3 closed its connection.
2024-08-05 14:23:45: Client auto-13F1AA0D-6C75-80A3-3AD1-22A114E006E7 closed its connection.
2024-08-05 14:23:45: Client auto-32221C62-2CF4-C293-30DD-36D5D4F3D62C closed its connection.
2024-08-05 14:23:45: Client auto-DACBE0A6-50CF-82FE-8522-D18E5BA09BA1 closed its connection.
2024-08-05 14:23:45: Client auto-9D33306D-4A0F-3CCE-989F-3E4436B2172C closed its connection.
2024-08-05 14:23:45: Client auto-268471AB-5959-050A-F4AE-C6DBE5B0C712 closed its connection.
2024-08-05 14:23:45: Client auto-325A3783-3C2A-E1C7-F176-3161023A9AC1 closed its connection.
2024-08-05 14:23:45: Client auto-6E17742E-4500-7CA9-FDEF-8D9641AAF725 closed its connection.
2024-08-05 14:23:45: Client auto-19ED669C-B097-E272-7CD3-29DE4A45CD1F closed its connection.
2024-08-05 14:23:45: Client auto-9F0E1309-35DD-FAFE-2907-D07E6D806891 closed its connection.
2024-08-05 14:23:45: Client auto-E8D0262C-BB9A-A600-D37B-81C69054751A closed its connection.
2024-08-05 14:23:45: Client auto-ABDA3A15-32F9-9289-5BDD-CF4F467A9F87 closed its connection.
2024-08-05 14:23:45: Client auto-0A1626F9-6F6C-D068-3EED-479499780526 closed its connection.
2024-08-05 14:23:45: Client auto-36D9E30F-3780-DF72-8DB9-C9C74A5775A0 closed its connection.
2024-08-05 14:23:45: Client auto-7A1F7048-7BDD-D8B4-8FFD-9EA8597EB24F closed its connection.
2024-08-05 14:23:45: Client auto-AD53A64B-5467-0C95-6BB6-A91CBD577AFE closed its connection.
2024-08-05 14:23:45: Client auto-E306E09D-5895-BB96-A2A5-BF92C954E750 closed its connection.
2024-08-05 14:23:45: Client auto-682A42CD-E3BD-37DE-F3FA-B761C99D7711 closed its connection.
2024-08-05 14:23:45: Client auto-485CB922-2C61-68B1-EAB8-6ECAC0A33F3B closed its connection.
2024-08-05 14:23:45: Client auto-98DD1DCC-C232-44DC-D469-3BB7FF72654B closed its connection.
2024-08-05 14:23:45: Client auto-D09BFE51-61CF-B166-2B1B-2FF02D09ACF6 closed its connection.
2024-08-05 14:23:45: Client auto-9BD0581C-7894-AAF3-050E-737EA16FFC3F closed its connection.
2024-08-05 14:23:45: Client auto-803F0187-F147-DCD4-5953-B40761566250 closed its connection.
2024-08-05 14:23:45: Client auto-467B6C69-322A-A3A4-3C50-003322590B3A closed its connection.
2024-08-05 14:23:45: Client auto-5F75725C-B78E-3E55-4989-27F2DE162473 closed its connection.
2024-08-05 14:23:45: Client auto-7A2E4E78-81B0-F42B-7CEE-801B1EB90B11 closed its connection.
2024-08-05 14:23:45: Client auto-B37A8E7D-FC50-3F7B-E8BB-915831BD04B7 closed its connection.
2024-08-05 14:23:45: Client auto-B6F7DFE7-60DA-8B88-4294-FA7FA18415F3 closed its connection.
2024-08-05 14:23:45: Client auto-4CFA9672-CAD2-E3BD-C2AC-49ADA499B5AC closed its connection.
2024-08-05 14:23:45: Client auto-DE173B36-19A4-FA17-4FB9-780796593002 closed its connection.
2024-08-05 14:23:45: Client auto-8449C185-EBD4-99F2-5637-87DB90F9E0FB closed its connection.
2024-08-05 14:23:45: Client auto-8E358F56-5367-5206-9049-7E717CAE2BCC closed its connection.
2024-08-05 14:23:45: Client auto-DCAE228D-94C6-DE45-2856-E838545BC3BE closed its connection.
2024-08-05 14:23:45: Client auto-970F0456-29D6-EA13-FD89-B935256D9315 closed its connection.
Morphy99 commented 1 month ago

I've got no idea what is causing this behaviour for it not to connect to the MQTT broker. I've tried to pinpoint a cause but it seems to be random. I've tried switching off all other services which access my broker, removing all retained topics, disconnecting other drives... I've now got it working again but I've noticed another issue. Every time the addon is restarted it, new mqtt entities are created in Home Assistant making it useless. This is after restarting the addon: image

Morphy99 commented 4 weeks ago

Any ideas? I would really like to get a sensor in HA :(

dianlight commented 4 weeks ago

The mqtt is generated from drive sn so is suppose that can't change over the time. Can you use mqtt explorer or similar and post mqtt auto discover messages?