Starting upgrade from 25.0.7.1 to 25.0.7.1 - Why?

Nextcloud version (eg, 20.0.5): 25.0.7.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.56
PHP version (eg, 7.4): 8.1.2

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Open an App and see that my Server is on Maintenance Mode
  2. Go to the desk open web and see UI to start Upgrade
  3. Check logs - there is no entries about maintenance mode or upgrade in nextcloud.log or updater.log.
  4. Click on “Perorm Upgrade” in UI and finalize it.
  5. Check logs - there is no entries about maintenance mode or upgrade in updater.logat all, only last entries from the 31.05.2023!!!
  6. Check NC logs and see that basically maintenance mode was enabled “now” together with upgrade.
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":0,"time":"2023-06-17T09:10:43+00:00","remoteAddr":"192.168.0.32","user":"--","app":"core","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"starting upgrade from 25.0.7.1 to 25.0.7.1","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"core"},"id":"648d7a0c6627b"}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:10:43+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::maintenanceEnabled: Turned on maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"},"id":"648d7a0c66286"}

  1. Be totally confused…
  2. The only thing that I could imagine that there is a problem with command occ app:update --all. I have following line in cronjob to ensure Automatic apps update:
10 8 1,17 * * php /var/www/nextcloud/occ notification:generate gas "Following Applications being updated" -l "$(php -f /var/www/nextcloud/occ app:update --all | cut -c -4000)"

And exactly today server goes to strange maintenance mode that nobody set. Message should be produced always, even if no apps were updated, but there is no Notification in NC, I suppose occ app:update --all misbehaves and start kind of upgrade… I can’t reproduce it for now.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:10:57+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Add possibly missing system config","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:10:57+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:11:12+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:11:12+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:11:12+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:11:12+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"0Nov8kTM1jFNEREYI7AA","level":3,"time":"2023-06-17T09:17:37+00:00","remoteAddr":"192.168.0.32","user":"gas","app":"webdav","method":"POST","url":"/remote.php/dav/bulk","message":"Unknown error while seeking content","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.7.1","exception":{"Exception":"Sabre\\DAV\\Exception","Message":"Unknown error while seeking content","Code":500,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php","line":129,"function":"isAt","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php","line":71,"function":"isAtLastBoundary","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPost","class":"OCA\\DAV\\BulkUpload\\BulkUploadPlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php","Line":111,"message":"Unknown error while seeking content","exception":{},"CustomMessage":"Unknown error while seeking content"}}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.7.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filesystem_check_changes": 0,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 1.5
        },
        "default_phone_region": "DE",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "logfile": "\/var\/nextcloud\/data\/nextcloud.log",
        "loglevel": 2,
        "trashbin_retention_obligation": "14, auto",
        "versions_retention_obligation": "14, auto",
        "data-fingerprint": "7be51475e95ea13b254cd880319d98ec",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "preview_max_x": 1920,
        "preview_max_y": 1080,
        "jpeg_quality": 90,
        "auth.bruteforce.protection.enabled": true,
        "simpleSignUpLink.shown": false,
        "profile.enabled": false,
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": true,
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "has_rebuilt_cache": true,
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "gpxedit",
            "extract"
        ],
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/exiftool-bin\/exiftool-amd64-glibc",
        "memories.ffmpeg_path": "\/usr\/bin\/ffmpeg",
        "memories.ffprobe_path": "\/usr\/bin\/ffprobe",
        "memories.tmp_path": "\/tmp",
        "memories.transcoder": "\/var\/www\/nextcloud\/apps\/memories\/exiftool-bin\/go-vod-amd64",
        "memories.no_transcode": false,
        "memories.qsv": true,
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/exiftool-bin\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe"
    }
}

The output of your Apache/nginx/system log in /var/log/____:

192.168.0.9 - - [17/Jun/2023:11:10:01 +0200] "GET /ocs/v2.php/apps/serverinfo/api/v1/info HTTP/2.0" 301 1046 "-" "curl/7.81.0"
192.168.0.9 - - [17/Jun/2023:11:10:03 +0200] "GET /ocs/v2.php/apps/serverinfo/api/v1/info HTTP/2.0" 301 1046 "-" "curl/7.81.0"
192.168.0.32 - - [17/Jun/2023:11:10:03 +0200] "GET /status.php HTTP/1.1" 301 6059 "-" "Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitecture: x86_64 OsArchitec
ture: x86_64)"
192.168.0.32 - - [17/Jun/2023:11:10:03 +0200] "GET /status.php HTTP/1.1" 200 6025 "-" "Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitecture: x86_64 OsArchitec
ture: x86_64)"
192.168.0.32 - - [17/Jun/2023:11:10:04 +0200] "PROPFIND /remote.php/dav/files/gas/ HTTP/1.1" 503 1226 "-" "Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitectur
e: x86_64 OsArchitecture: x86_64)"
192.168.0.32 - - [17/Jun/2023:11:11:05 +0200] "GET /status.php HTTP/1.1" 301 6059 "-" "Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitecture: x86_64 OsArchitec
ture: x86_64)"
192.168.0.32 - - [17/Jun/2023:11:11:05 +0200] "GET /status.php HTTP/1.1" 200 6025 "-" "Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-73-generic ClientArchitecture: x86_64 OsArchitec
ture: x86_64)"
192.168.0.32 - - [17/Jun/2023:11:10:43 +0200] "GET /core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D HTTP/2.0" 200 8657 
"-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

See above

Let’s backtrack a bit. When was the last time you recall being able to access your NC instance without any issue?

Once you know that, let’s take a look at the log entries appearing immediately after that.

Last time was on 16th - 1 day before, evening.
I can see in “activity” there we some automatic tags set at 03:00 at the night on 17th.
Than I get up and call NC App on my mobile phone that shown “maintenance”.
From the NC logs there is nothing between 00:00 and 09:10 (when I get up and saw message):

{"reqId":"XJfxs7olMJwYskPcSStp","user":"gas","app":"nextcloud-system-notification.sh","url":"/var/www/nextcloud/occ notification:generate","message":"+++ 13 packages require to be updated. Packages to update: libx11-data [SECURITY update] libx11-dev [SECURITY update] libx11-6 [SECURITY update] libx11-xcb1 [SECURITY update] linux-modules-5.15.0-75-generic linux-image-5.15.0-75-generic linux-modules-extra-5.15.0-75-generic linux-generic linux-image-generic linux-headers-5.15.0-75 linux-headers-5.15.0-75-generic linux-headers-generic linux-libc-dev +++","level":1,"time":"2023-06-17T00:00:09+02:00"}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":0,"time":"2023-06-17T09:10:43+00:00","remoteAddr":"192.168.0.32","user":"--","app":"core","method":"GET","url":"/core/ajax/update.php?requesttoken=LALALALA","message":"starting upgrade from 25.0.7.1 to 25.0.7.1","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"core"}}

Apache is full of 301s and 200s… Nothing bad.

There is also “maintenance” message in logs only once at time, when I open UI and saw updater, in App it was highlighted as maintenance enabled, but from the logs not:

{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:10:43+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::maintenanceEnabled: Turned on maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}
{"reqId":"vKGkK0gh0JzPNTDVI9sp","level":1,"time":"2023-06-17T09:11:12+00:00","remoteAddr":"192.168.0.32","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=6sWKee4ROe03MtWBHJMamYWG0hpBZkqdgoCGUjeg438%3D%3AgYPfNYhre4FaCpDjTdAirrz%2FpU0PBAauzOPJCl7DoBk%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"25.0.7.1","data":{"app":"updater"}}

Any chance occ upgrade wasn’t executed after the last time you ran the updater?

Not really as I already almost one month on 25.0.7.1, and even Log message say that version is the same as installed. Really lost here…