[supervisor.api.middleware_security] Invalid token for access /network/interface/default/info

I’ve been coping for some time with the Unifi controller all of a sudden becoming unavailable (posted on this here. I’m becoming an expert in restoring that now (reinstall controller and readopt APs, rename all clients and assign new fingerprints - yeah I’m freaky like that :slight_smile: . Unfortunately backup restore does not work - tried that).

I’m trying to find out what it could be. Last time I upgraded to core-2021.6.0, Unifi controller was inacessible again and this morning when upgrading to core-2021.6.1 it continued to work fine. Just an hour ago, I had a power outage and post that all came back up after a clean restart but again the Unifi controller became inacessible…

In the system logs I see this error : [supervisor.api.middleware_security] Invalid token for access /network/interface/default/info could this be related and how can I solve it?

Does anyone have a good suggestion? I’m afraid if I do a clean build with the backup restore, I’ll import the same issue again…
Thanks in advance!!

fulll log:

21-06-04 15:57:18 INFO (SyncWorker_1) [supervisor.docker.audio] Starting Audio homeassistant/armv7-hassio-audio with version 2021.04.0 - 172.30.32.4
21-06-04 15:57:18 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to homeassistant/armv7-hassio-cli with version 2021.05.1
21-06-04 15:57:18 INFO (MainThread) [supervisor.plugins.cli] Starting CLI plugin
21-06-04 15:57:20 INFO (SyncWorker_0) [supervisor.docker.cli] Starting CLI homeassistant/armv7-hassio-cli with version 2021.05.1 - 172.30.32.5
21-06-04 15:57:20 INFO (SyncWorker_1) [supervisor.docker.interface] Attaching to homeassistant/armv7-hassio-observer with version 2020.10.1
21-06-04 15:57:20 INFO (SyncWorker_1) [supervisor.docker.interface] Attaching to homeassistant/armv7-hassio-multicast with version 2021.04.0
21-06-04 15:57:20 INFO (MainThread) [supervisor.plugins.multicast] Starting Multicast plugin
21-06-04 15:57:21 INFO (SyncWorker_1) [supervisor.docker.multicast] Starting Multicast homeassistant/armv7-hassio-multicast with version 2021.04.0 - Host
21-06-04 15:57:21 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
21-06-04 16:27:41 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
21-06-04 16:27:41 INFO (SyncWorker_1) [supervisor.docker.interface] Attaching to homeassistant/raspberrypi4-homeassistant with version 2021.6.1
21-06-04 16:27:41 INFO (MainThread) [supervisor.homeassistant.secrets] Loaded 10 Home Assistant secrets
21-06-04 16:27:42 INFO (MainThread) [supervisor.hassos] Detect Home Assistant Operating System 5.13 / BootSlot A
21-06-04 16:27:43 INFO (MainThread) [supervisor.store.git] Loading add-on /data/addons/git/7ad98f9c repository
21-06-04 16:27:43 INFO (MainThread) [supervisor.store.git] Loading add-on /data/addons/git/a0d7b954 repository
21-06-04 16:27:43 INFO (MainThread) [supervisor.store.git] Loading add-on /data/addons/core repository
21-06-04 16:27:43 INFO (MainThread) [supervisor.store.git] Loading add-on /data/addons/git/cebe7a76 repository
21-06-04 16:27:44 INFO (MainThread) [supervisor.store] Loading add-ons from store: 66 all - 66 new - 0 remove
21-06-04 16:27:44 INFO (MainThread) [supervisor.addons] Found 11 installed add-ons
21-06-04 16:27:44 INFO (SyncWorker_1) [supervisor.docker.interface] Attaching to homeassistant/armv7-addon-mosquitto with version 6.0.1
21-06-04 16:27:44 INFO (SyncWorker_4) [supervisor.docker.interface] Attaching to sabeechen/hassio-google-drive-backup-armv7 with version 0.104.3
21-06-04 16:27:44 INFO (SyncWorker_3) [supervisor.docker.interface] Attaching to ghcr.io/hassio-addons/ssh/armv7 with version 8.2.3
21-06-04 16:27:44 INFO (SyncWorker_2) [supervisor.docker.interface] Attaching to zigbee2mqtt/zigbee2mqtt-armv7 with version 1.18.1-1
21-06-04 16:27:44 INFO (SyncWorker_0) [supervisor.docker.interface] Attaching to homeassistant/armv7-addon-configurator with version 5.3.1
21-06-04 16:27:44 INFO (SyncWorker_5) [supervisor.docker.interface] Attaching to ghcr.io/hassio-addons/unifi/armv7 with version 0.23.0
21-06-04 16:27:44 INFO (SyncWorker_6) [supervisor.docker.interface] Attaching to homeassistant/armv7-addon-samba with version 9.5.0
21-06-04 16:27:44 INFO (SyncWorker_7) [supervisor.docker.interface] Attaching to homeassistant/armv7-addon-duckdns with version 1.12.5
21-06-04 16:27:44 INFO (SyncWorker_1) [supervisor.docker.interface] Attaching to esphome/esphome-hassio-armv7 with version 1.18.0
21-06-04 16:27:44 INFO (SyncWorker_3) [supervisor.docker.interface] Attaching to ghcr.io/hassio-addons/glances/armv7 with version 0.12.1
21-06-04 16:27:44 INFO (SyncWorker_4) [supervisor.docker.interface] Attaching to homeassistant/armv7-addon-check_config with version 3.7.1
21-06-04 16:27:45 INFO (MainThread) [supervisor.snapshots] Found 2 snapshot files
21-06-04 16:27:45 INFO (MainThread) [supervisor.discovery] Loaded 1 messages
21-06-04 16:27:45 INFO (MainThread) [supervisor.ingress] Loaded 0 ingress sessions
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.SETUP
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-06-04 16:27:45 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not running - CoreState.SETUP
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.SETUP
21-06-04 16:27:45 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-06-04 16:27:45 INFO (MainThread) [__main__] Running Supervisor
21-06-04 16:27:45 INFO (MainThread) [supervisor.hassos] Rauc: A - marked slot kernel.0 as good
21-06-04 16:27:45 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INITIALIZE' starting 0 add-ons
21-06-04 16:27:45 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYSTEM' starting 1 add-ons
21-06-04 16:27:45 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-06-04 16:27:45 WARNING (SyncWorker_3) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-06-04 16:27:47 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker add-on homeassistant/armv7-addon-mosquitto with version 6.0.1
21-06-04 16:27:51 INFO (MainThread) [supervisor.services.modules.mqtt] Set core_mosquitto as service provider for mqtt
21-06-04 16:27:52 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERVICES' starting 5 add-ons
21-06-04 16:27:52 WARNING (SyncWorker_4) [supervisor.docker.addon] Glances running with disabled protected mode!
21-06-04 16:27:53 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/glances/armv7 with version 0.12.1
21-06-04 16:27:54 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on homeassistant/armv7-addon-duckdns with version 1.12.5
21-06-04 16:27:55 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/ssh/armv7 with version 8.2.3
21-06-04 16:27:56 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on homeassistant/armv7-addon-samba with version 9.5.0
21-06-04 16:27:58 ERROR (MainThread) [supervisor.api.middleware_security] Invalid token for access /network/interface/default/info
21-06-04 16:27:59 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/unifi/armv7 with version 0.23.0
21-06-04 16:28:04 INFO (MainThread) [supervisor.core] Start Home Assistant Core
21-06-04 16:28:04 INFO (SyncWorker_0) [supervisor.docker.interface] Starting homeassistant
21-06-04 16:28:05 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
21-06-04 16:28:22 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.STARTUP
21-06-04 16:28:22 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-06-04 16:28:31 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-06-04 16:28:54 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-06-04 16:28:55 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
21-06-04 16:28:55 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' starting 4 add-ons
21-06-04 16:28:59 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker add-on homeassistant/armv7-addon-configurator with version 5.3.1
21-06-04 16:28:59 WARNING (MainThread) [supervisor.addons.options] Unknown option 'restartdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:28:59 WARNING (MainThread) [supervisor.addons.options] Unknown option 'initialdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:28:59 WARNING (SyncWorker_7) [supervisor.addons.options] Unknown option 'restartdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:28:59 WARNING (SyncWorker_7) [supervisor.addons.options] Unknown option 'initialdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:29:01 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on zigbee2mqtt/zigbee2mqtt-armv7 with version 1.18.1-1
21-06-04 16:29:02 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on esphome/esphome-hassio-armv7 with version 1.18.0
21-06-04 16:29:04 INFO (SyncWorker_4) [supervisor.docker.addon] Starting Docker add-on sabeechen/hassio-google-drive-backup-armv7 with version 0.104.3
21-06-04 16:29:09 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
21-06-04 16:29:09 INFO (MainThread) [supervisor.core] Supervisor is up and running
21-06-04 16:29:09 INFO (MainThread) [supervisor.host.info] Updating local host information
21-06-04 16:29:09 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
21-06-04 16:29:09 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-06-04 16:29:09 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-06-04 16:29:09 WARNING (MainThread) [supervisor.addons.options] Option 'anonymous' does not exist in the schema for Mosquitto broker (core_mosquitto)
21-06-04 16:29:09 WARNING (MainThread) [supervisor.addons.options] Unknown option 'restartdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:29:09 WARNING (MainThread) [supervisor.addons.options] Unknown option 'initialdelay' for Zigbee2mqtt (7ad98f9c_zigbee2mqtt)
21-06-04 16:29:09 INFO (MainThread) [supervisor.host.services] Updating service information
21-06-04 16:29:09 INFO (MainThread) [supervisor.host.network] Updating local network information
21-06-04 16:29:10 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-06-04 16:29:10 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-06-04 16:29:10 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-06-04 16:29:10 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-06-04 16:29:12 INFO (MainThread) [supervisor.api.middleware_security] /core/info access from cebe7a76_hassio_google_drive_backup
21-06-04 16:29:12 INFO (MainThread) [supervisor.api.middleware_security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-06-04 16:29:12 INFO (MainThread) [supervisor.api.middleware_security] /snapshots access from cebe7a76_hassio_google_drive_backup
21-06-04 16:29:12 INFO (MainThread) [supervisor.api.middleware_security] /snapshots/10d05ace/info access from cebe7a76_hassio_google_drive_backup
21-06-04 16:29:12 INFO (MainThread) [supervisor.api.middleware_security] /snapshots/13f07114/info access from cebe7a76_hassio_google_drive_backup
21-06-04 16:29:15 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
21-06-04 16:29:15 INFO (MainThread) [supervisor.host] Host information reload completed
21-06-04 16:29:18 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-06-04 16:29:18 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-06-04 16:29:18 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete

This isnt HA issue, this is ubuiqity one, have a look on their forum and you will see countless forum post with the issues you are seeing. their recent firmware have been terrible, from the controller, to ap ones

I know restoring controller backup most often don’t work. I succeeded once - don’t know why/how. Controller addon GitHub is full of evidences and logs but seems still not fixed. Not sure is it addon issue or not

Being warned by several yt videos I decided to stay with 5.x controller. Never had problems with it. If there is a way I suggest to try this oldie (v0.19.0)

Might be independent, but this is the only thread in the forum that is discussing this supervisor.api.middleware_security error…

So I do not have any unifi equipment, but got this under the Supervosor logs also:

Where do I start to debug this? What is this exactly?

I have the same thing, but I’m seeing really high CPU usage, and I’m trying to troubleshoot that. Are you seeing high CPU too?

I do have Unifi add on installed, but it’s running fine.

Not really. I know Unifi takes a lot of memory.
I’m running on an RPI4 and it takes 3.4% of CPU and 528MB of memory.

Hello… I have that error each time I restart Samba… Don’t know why sofar… and I do have the same error message on two different HA instances installed on two different NUC…

21-06-08 13:26:46 INFO (SyncWorker_2) [supervisor.docker.interface] Stopping addon_core_samba application
21-06-08 13:26:49 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning addon_core_samba application
21-06-08 13:26:49 INFO (SyncWorker_6) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-samba with version 9.5.0
21-06-08 13:26:50 ERROR (MainThread) [supervisor.api.middleware_security] Invalid token for access /network/interface/default/info

UPDATE: there is a problem opened for this… if it is Samba related …

Thanks for the hint!! Will try that later and let you know. Might indeed be the case as I also use that addon.

You’re indeed right!! Stopping and staying samba indeed caused this error to appear.

21-06-08 20:36:25 ERROR (MainThread) [supervisor.api.middleware_security] Invalid token for access /network/interface/default/info

I also see the error in the beginning of the samba log:


[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] samba.sh: executing... 
parse error: Expected string key before ':' at line 1, column 4
[22:36:25] ERROR: Unknown HTTP error occured
[22:36:26] INFO: Using hostname=xxxxxxxxxx interface=
No builtin backend found, trying to load plugin
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated 

Thanks for helping me localizing the issue. Indeed it’s not related to the UniFi issue.

1 Like

I am observing the same behavior. It should be noted that I do not use a ubiquity switch, nore do I have any ubiquity devices anywhere on my network.

It indeed has nothing to do with Ubiquity, but with the Samba add-on.

Can confirm.

Update Samba to 9.5.1.

@aidbish was looking in the forum and couldn’t really find posts around this. What keywords did you use?
I did see posts around repairing database, but as I’m running supervised, I’m not aware of possibilities to run these commands (I guess in some way you need to get into the docker container)…