I’m managing two NC AIO instances on the same server, with similar setup (I think).
Both run on docker rootless and both are currently running version 31.0.10 with automatic upgrades.
The difference is: instance A sends me an e-mail daily after the backup or upgrade, while the other (B) not. And I’m sure (I verified it) both are doing daily backups and upgrading when needed.
B have e-mail configured and working: if I modify a shared file, a notification is successfully sent to the user.
I don’t see any log about e-mail in the admin or AIO interface, neither any e-mail attempt in my Postfix logs.
Where is this AIO notification configured? How can I debug it?
edit : when logged as admin in the admin interface, I see the ‘daily backup successful!’ message in the notification area, just no e-mail
This morning I got an e-mail from site A (backup) but still none from site B And no connection to the SMTP server from Nextcloud.
Is there any way to debug further?
I tried occ config:app:get updatenotification app_updated.enabled but no return.
And I’m not sure this is the way, because I’m looking for notifications from AIO itself not NC (but maybe the split between both is not that evident neither)
Logs starting at the end of N-2 backup (because there is a stacktrace)
Daily backup script has finished
Total reclaimed space: 0B
++ head -1 /mnt/docker-aio-config/data/daily_backup_time
+ BACKUP_TIME=04:00
+ export BACKUP_TIME
+ export DAILY_BACKUP=1
+ DAILY_BACKUP=1
++ sed -n 2p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' automaticUpdatesAreNotEnabled ']'
+ export AUTOMATIC_UPDATES=1
+ AUTOMATIC_UPDATES=1
++ sed -n 3p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' successNotificationsAreNotEnabled ']'
+ export SEND_SUCCESS_NOTIFICATIONS=1
+ SEND_SUCCESS_NOTIFICATIONS=1
+ set +x
Deleting duplicate sessions
NOTICE: PHP message: 404 Not Found
Type: Slim\Exception\HttpNotFoundException
Code: 404
Message: Not found.
File: /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php
Line: 76
Trace: #0 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/RouteRunner.php(62): Slim\Middleware\RoutingMiddleware->performRouting(Object(GuzzleHttp\Psr7\ServerRequest))
#1 /var/www/docker-aio/php/vendor/slim/csrf/src/Guard.php(482): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#2 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(178): Slim\Csrf\Guard->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Slim\Routing\RouteRunner))
#3 /var/www/docker-aio/php/vendor/slim/twig-view/src/TwigMiddleware.php(117): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#4 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Views\TwigMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#5 /var/www/docker-aio/php/src/Middleware/AuthMiddleware.php(36): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#6 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(283): AIO\Middleware\AuthMiddleware->__invoke(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#7 /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(77): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#8 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Middleware\ErrorMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#9 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(73): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#10 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(209): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#11 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(193): Slim\App->handle(Object(GuzzleHttp\Psr7\ServerRequest))
#12 /var/www/docker-aio/php/public/index.php(198): Slim\App->run()
#13 {main}
Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.
Daily backup script has started
Connection to nextcloud-aio-apache (172.18.0.7) 11011 port [tcp/*] succeeded!
Starting mastercontainer update...
(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)
Waiting for watchtower to stop
Updating container images...
Creating daily backup...
Waiting for backup container to stop
Starting and updating containers...
Waiting for the Nextcloud container to start
Waiting for the Nextcloud container to start
Connection to nextcloud-aio-nextcloud (172.18.0.6) 9000 port [tcp/*] succeeded!
Sending backup notification...
Daily backup script has finished
Total reclaimed space: 0B
++ head -1 /mnt/docker-aio-config/data/daily_backup_time
+ BACKUP_TIME=04:00
+ export BACKUP_TIME
+ export DAILY_BACKUP=1
+ DAILY_BACKUP=1
++ sed -n 2p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' automaticUpdatesAreNotEnabled ']'
+ export AUTOMATIC_UPDATES=1
+ AUTOMATIC_UPDATES=1
++ sed -n 3p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' successNotificationsAreNotEnabled ']'
+ export SEND_SUCCESS_NOTIFICATIONS=1
+ SEND_SUCCESS_NOTIFICATIONS=1
+ set +x
Daily backup script has started
Connection to nextcloud-aio-apache (172.18.0.7) 11011 port [tcp/*] succeeded!
Starting mastercontainer update...
(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)
Waiting for watchtower to stop
Updating container images...
Creating daily backup...
Waiting for backup container to stop
Starting and updating containers...
Waiting for the Nextcloud container to start
Connection to nextcloud-aio-nextcloud (172.18.0.6) 9000 port [tcp/*] succeeded!
Sending backup notification...
Daily backup script has finished
Total reclaimed space: 0B
++ head -1 /mnt/docker-aio-config/data/daily_backup_time
+ BACKUP_TIME=04:00
+ export BACKUP_TIME
+ export DAILY_BACKUP=1
+ DAILY_BACKUP=1
++ sed -n 2p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' automaticUpdatesAreNotEnabled ']'
+ export AUTOMATIC_UPDATES=1
+ AUTOMATIC_UPDATES=1
++ sed -n 3p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' successNotificationsAreNotEnabled ']'
+ export SEND_SUCCESS_NOTIFICATIONS=1
+ SEND_SUCCESS_NOTIFICATIONS=1
+ set +x
I may have found something unexpected looking at the SMTP server logs:
when NC AIO sends e-mail for backup/update it uses one SASL account (HOST@EXAMPLE.COM) → this SASL account is the one used by the local Postfix server to send e-mail to the relayhost
I have found the solution to my problem: my rootless docker container was not allowed to contact the host which runs the SMTP server.
This was not a problem coming from Nextcloud / Nextcloud AIO itself.
But the fact that the e-mails coming from NC itself were working was confusing: it’s simply because NC and the AIO interface use different methods to send e-mails.