Everything was running fine running 25.04.0 until I updated to 25.04.2.1.
I don’t know what the update changed, but the task had the “admin” user running it, using the “root” makes it work again.
But I didn’t realize until two weeks after and it created a log, 89MB in size, of it spamming:
[ENOTAUTHENTICATED] Not authenticated
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py", line 323, in process_method_call
result = await method.call(app, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 47, in call
await self.middleware.authorize_method_call(app, self.name, methodobj, params)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 866, in authorize_method_call
raise CallError('Not authenticated', ErrnoMixin.ENOTAUTHENTICATED)
middlewared.service_exception.CallError: [ENOTAUTHENTICATED] Not authenticated
This really confuses me. Especially since the cron job never failed, despite this seeming like a critical error.
I realized that this is kind of my weak link, that nothing is actually monitoring if the replication actually happened. And I couldn’t see anything in the alert settings or replication settings that makes you e.g. send a warning or notification alert if the latest replication happened after X time. Is there a way to do custom alert like this?
The script still doesn’t fully run since it now has a bad math expression: operand expected at end of string
error, but seems easier to figure out eventually.
[Edit - I know why now - since I have SSH access in there that only works with the admin user. ]
[Edit2 - I completely forgot that my script depended on running as admin to use the inbuilt SSH keys.]