Snap updated to 32.0.9snap1 and encountering internal server error, reverting does not fix.

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.8.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Snap
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NA
  • PHP version (e.g, 8.3):
    • Snap
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After last update
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Snap
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I recently updated my system and the snap auto-updated to 32 about the same time. At first I received an internal server error screen (Apache logs showed an error about not finding the appropriate uid or gid), found that maintenance mode had been set to true and then changed that to false. Now I am seeing a more generic 500 error screen. Logs show an issue with connecting to the database. Not sure why that broke with the update. I have used the snap version without issue the last two years migrating from a traditional install on an older machine in 2024. I’m a little lost diagnosing the snap. It seems to me like the upgrade may not have completed properly and that is why it was in maintenance mode?

Thank you in advance.

Steps to replicate it (hint: details matter!)

Unfortunately, I have little to go on here. It happened after a recent system and snap update. I didn’t notice until a day later when I noticed the Nextcloud client icon was showing no connection.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

The Nextcloud log is empty

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

I only show a generic 500 error with no details and a failed fetch for the server's local ip

Web server / Reverse Proxy

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

[Mon May 18 15:03:55.017504 2026] [ssl:warn] [pid 42195:tid 42195] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon May 18 15:03:55.017514 2026] [ssl:warn] [pid 42195:tid 42195] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon May 18 15:03:55.017610 2026] [lbmethod_heartbeat:notice] [pid 42195:tid 42195] AH02282: No slotmem from mod_heartmonitor
[Mon May 18 15:03:55.018403 2026] [mpm_event:notice] [pid 42195:tid 42195] AH00489: Apache/2.4.67 (Unix) OpenSSL/1.1.1f configured -- resuming normal operations
[Mon May 18 15:03:55.018419 2026] [core:notice] [pid 42195:tid 42195] AH00094: Command line: 'httpd -d /snap/nextcloud/53305 -D EnableHTTPS -D FOREGROUND'
[Mon May 18 15:03:55.018506 2026] [unixd:alert] [pid 42196:tid 42196] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:03:55.018662 2026] [unixd:alert] [pid 42197:tid 42197] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:03:55.018807 2026] [unixd:alert] [pid 42198:tid 42198] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:21:53.394897 2026] [mpm_event:notice] [pid 42195:tid 42195] AH00491: caught SIGTERM, shutting down
[Mon May 18 15:22:04.048323 2026] [ssl:warn] [pid 112332:tid 112332] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon May 18 15:22:04.048358 2026] [ssl:warn] [pid 112332:tid 112332] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Mon May 18 15:22:04.049771 2026] [ssl:warn] [pid 112332:tid 112332] AH01906: 127.0.1.1:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon May 18 15:22:04.049780 2026] [ssl:warn] [pid 112332:tid 112332] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon May 18 15:22:04.049886 2026] [lbmethod_heartbeat:notice] [pid 112332:tid 112332] AH02282: No slotmem from mod_heartmonitor
[Mon May 18 15:22:04.050680 2026] [mpm_event:notice] [pid 112332:tid 112332] AH00489: Apache/2.4.67 (Unix) OpenSSL/1.1.1f configured -- resuming normal operations
[Mon May 18 15:22:04.050697 2026] [core:notice] [pid 112332:tid 112332] AH00094: Command line: 'httpd -d /snap/nextcloud/53305 -D EnableHTTPS -D FOREGROUND'
[Mon May 18 15:22:04.050826 2026] [unixd:alert] [pid 112333:tid 112333] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:22:04.050954 2026] [unixd:alert] [pid 112334:tid 112334] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:22:04.051109 2026] [unixd:alert] [pid 112335:tid 112335] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon May 18 15:49:35.982317 2026] [unixd:alert] [pid 214871:tid 214871] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /snap/nextcloud/53305/htdocs/lib/private/DB/Connection.php:238
Stack trace:
#0 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(458): OC\DB\Connection->connect()
#1 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(416): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(323): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /snap/nextcloud/53305/htdocs/lib/private/DB/Connection.php(922): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /snap/nextcloud/53305/htdocs/lib/private/DB/ConnectionAdapter.php(243): OC\DB\Connection->getDatabaseProvider()
#5 /snap/nextcloud/53305/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php(98): OC\DB\ConnectionAdapter->getDatabaseProvider()
#6 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(1352): OC\DB\QueryBuilder\QueryBuilder->expr()
#7 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(284): OC\AppConfig->loadConfig()
#8 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(1832): OC\AppConfig->searchValues()
#9 /snap/nextcloud/53305/htdocs/lib/private/Memcache/Factory.php(122): OC\AppConfig->getAppInstalledVersions()
#10 /snap/nextcloud/53305/htdocs/lib/private/Memcache/Factory.php(163): OC\Memcache\Factory->getGlobalPrefix()
#11 /snap/nextcloud/53305/htdocs/lib/private/Server.php(936): OC\Memcache\Factory->createLocking()
#12 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(169): OC\Server->OC\{closure}()
#13 /snap/nextcloud/53305/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#14 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(136): Pimple\Container->offsetGet()
#15 /snap/nextcloud/53305/htdocs/lib/private/ServerContainer.php(154): OC\AppFramework\Utility\SimpleContainer->query()
#16 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(45): OC\ServerContainer->query()
#17 /snap/nextcloud/53305/htdocs/lib/private/Files/View.php(77): OC\AppFramework\Utility\SimpleContainer->get()
#18 /snap/nextcloud/53305/htdocs/lib/private/Server.php(423): OC\Files\View->__construct()
#19 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(169): OC\Server->OC\{closure}()
#20 /snap/nextcloud/53305/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#21 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(136): Pimple\Container->offsetGet()
#22 /snap/nextcloud/53305/htdocs/lib/private/ServerContainer.php(154): OC\AppFramework\Utility\SimpleContainer->query()
#23 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(45): OC\ServerContainer->query()
#24 /snap/nextcloud/53305/htdocs/lib/private/Server.php(1272): OC\AppFramework\Utility\SimpleContainer->get()
#25 /snap/nextcloud/53305/htdocs/lib/base.php(635): OC\Server->boot()
#26 /snap/nextcloud/53305/htdocs/lib/base.php(1224): OC::init()
#27 /snap/nextcloud/53305/htdocs/console.php(31): require_once('...')
#28 /snap/nextcloud/53305/htdocs/occ(33): require_once('...')

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Hey @cmscotti, welcome to the Nextcloud community and thanks for supporting Nextcloud snap :handshake:

Sorry to hear you are having issues with your Nextcloud snap installation. If you’ve come this far, you’re on the right track! There is a good chance someone in the community has had a similar issue and knows how to resolve it.

In order to help you we’ll need some Information to get an Idea of your setup, so complete the required support template and post the output of the following command allowing us to look at your redacted configuration file:

sudo nextcloud.occ config:list

Nextcloud logs are very verbose, thus your logs will certainly help resolve your issue. access your logs by following how to manage Nextcloud snap logs or you could run the debugging script and post the result here or paste the result of the following command:

sudo tail -n 20 /var/snap/nextcloud/current/logs/nextcloud.log

Below are some links to how-to’s answering frequently asked questions and may help you help yourself;

Please run the debugging script and paste the results here or open an issue on our GitHub and link here.

Thank you for your response.

I keep receiving the output I pasted in the template before when running sudo nextcloud.occ config:list

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘nextcloud’@‘localhost’ (using password: YES) in /snap/nextcloud/53305/htdocs/lib/private/DB/Connection.php:238

cat or tail on /var/snap/nextcloud/current/logs/nextcloud.log returns empty.

Hi @cmscotti, hi @scubamuc,

snap is a book with seven seals for me — I’ve successfully avoided it so far :grinning_face_with_smiling_eyes: — so don’t expect real solutions from my side here. But there are a few things visible in the logs that are snap-independent.

The uid 4294967295 alert

uid 4294967295 is actually uid -1 — that’s what -1 looks like when interpreted as an unsigned 32-bit integer. Apache is running with a user that the system cannot resolve to a name. Whether that is normal for this snap version or a symptom of the update problem, I can’t say.

The database connection failure

Two questions that would help move this forward:

  1. How exactly did you turn off maintenance mode? If you edited config.php by hand, it’s worth double-checking that the file is still intact — a small typo there would break the database connection without leaving any trace in the logs.

  2. Is MySQL actually running?

sudo snap services nextcloud

That may tell us whether the database service is up at all.


ernolf

Thank you @ernolf for your assistance.

Fair enough, I am starting to wish I had stuck with the older style deployment.

As far as the UID goes, that is the biggest mystery to me. I assume Apache is trying to run as a higher level user to kick off the process and then downgrade to a less privileged one for security and then choking somewhere in that process. Most of what I could find on that pointed to adjusting the Apache config, something that is set in the snap in my case.

I did edit the config by hand, changing true to false in that line. I don’t think I affected anything else but here is the DB section of config.php:

‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost:/tmp/sockets/mysql.sock’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘nextcloud’,
‘dbpassword’ => ‘’,

the host was the only thing that stood out to me as maybe odd but only because I don’t know if that is a snap default.

nextcloud.mysql is showing as enabled and active.

@ernolf thanks for your assistance :hugs:

the issue @cmscotti is experiencing is a typical 3rd party app upgrade issue as I’ve seen over the last 8 years of snap-support described here: How to manage failed automatic update in Nextcloud snap

but as long as users do not run the debugging script and post the result here, it’s a guessing game!

I’ve explained what information is required to help, but I’m not prepared to start guessing!

Is that value really empty or just redacted?

The DB password was redacted

@scubamuc Thanks, I hope this is correct because it is a long one.

Reading through it this jumped out at me:

chmod: changing permissions of ‘/var/snap/nextcloud/53305/redis’: Operation not permitted

I tried to paste the full output here but it was too big and when I try to attach an ODT with the output it notes new users are not allowed to use attachments… Any specific sections I should copy/paste?

@cmscotti did you read this How to manage failed automatic update in Nextcloud snap - :bookmark_tabs: How to - Nextcloud community ?

especially this: resolve auto-update issues

compare your list of installed apps.
if in doubt, paste your list of installed apps here;

sudo nextcloud.occ app:list

If my memory serves, I have been using vanilla Nextcloud this entire time. I really only use it for file access and syncing. I could be wrong, I have used it for a long time and may have forgotten something from the past. Below is the output from sudo nextcloud.occ app:list

I am assuming this isn’t the normal list below the error and the issue with the database connection is keeping it from it’s normal output. I don’t know how long the restriction is for new users to attach files but I’ll try again once my account is 24 hours old.

An unhandled exception has been thrown:
Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE\[HY000\] \[1045\] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /snap/nextcloud/53305/htdocs/lib/private/DB/Connection.php:238
Stack trace:
#0 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(458): OC\\DB\\Connection->connect()
#1 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(416): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()
#2 /snap/nextcloud/53305/htdocs/3rdparty/doctrine/dbal/src/Connection.php(323): Doctrine\\DBAL\\Connection->detectDatabasePlatform()
#3 /snap/nextcloud/53305/htdocs/lib/private/DB/Connection.php(922): Doctrine\\DBAL\\Connection->getDatabasePlatform()
#4 /snap/nextcloud/53305/htdocs/lib/private/DB/ConnectionAdapter.php(243): OC\\DB\\Connection->getDatabaseProvider()
#5 /snap/nextcloud/53305/htdocs/lib/private/DB/QueryBuilder/QueryBuilder.php(98): OC\\DB\\ConnectionAdapter->getDatabaseProvider()
#6 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(1352): OC\\DB\\QueryBuilder\\QueryBuilder->expr()
#7 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(284): OC\\AppConfig->loadConfig()
#8 /snap/nextcloud/53305/htdocs/lib/private/AppConfig.php(1832): OC\\AppConfig->searchValues()
#9 /snap/nextcloud/53305/htdocs/lib/private/Memcache/Factory.php(122): OC\\AppConfig->getAppInstalledVersions()
#10 /snap/nextcloud/53305/htdocs/lib/private/Memcache/Factory.php(163): OC\\Memcache\\Factory->getGlobalPrefix()
#11 /snap/nextcloud/53305/htdocs/lib/private/Server.php(936): OC\\Memcache\\Factory->createLocking()
#12 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(169): OC\\Server->OC{closure}()
#13 /snap/nextcloud/53305/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\\AppFramework\\Utility\\SimpleContainer->OC\\AppFramework\\Utility{closure}()
#14 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(136): Pimple\\Container->offsetGet()
#15 /snap/nextcloud/53305/htdocs/lib/private/ServerContainer.php(154): OC\\AppFramework\\Utility\\SimpleContainer->query()
#16 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(45): OC\\ServerContainer->query()
#17 /snap/nextcloud/53305/htdocs/lib/private/Files/View.php(77): OC\\AppFramework\\Utility\\SimpleContainer->get()
#18 /snap/nextcloud/53305/htdocs/lib/private/Server.php(423): OC\\Files\\View->\__construct()
#19 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(169): OC\\Server->OC{closure}()
#20 /snap/nextcloud/53305/htdocs/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\\AppFramework\\Utility\\SimpleContainer->OC\\AppFramework\\Utility{closure}()
#21 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(136): Pimple\\Container->offsetGet()
#22 /snap/nextcloud/53305/htdocs/lib/private/ServerContainer.php(154): OC\\AppFramework\\Utility\\SimpleContainer->query()
#23 /snap/nextcloud/53305/htdocs/lib/private/AppFramework/Utility/SimpleContainer.php(45): OC\\ServerContainer->query()
#24 /snap/nextcloud/53305/htdocs/lib/private/Server.php(1272): OC\\AppFramework\\Utility\\SimpleContainer->get()
#25 /snap/nextcloud/53305/htdocs/lib/base.php(635): OC\\Server->boot()
#26 /snap/nextcloud/53305/htdocs/lib/base.php(1224): OC::init()
#27 /snap/nextcloud/53305/htdocs/console.php(31): require_once('...')
#28 /snap/nextcloud/53305/htdocs/occ(33): require_once('...')
``

alternatively open an issue on our GitHub nextcloud-snap: :cloud::package: where you can post the result of the debugging script, see getting help

Also, please check if the MySQL server is running (systemctl status snap.nextcloud.mysql) and check if you can connect with it (start nextcloud.mysql-client and terminate with Ctrl+D).

For some reason, Nextcloud cannot talk to the DB. So, you need to find out, why. The debugging script as mentioned by scubamuc will provide a braod logging insight that avoids that experienced users have to ask you a dozen times to run this or that command to track the problem down. There is no guarantee that it will suffice to track it down but the chances are good there will be some hint. Thus, I can only encourage you to actually run the script and share the output (although lengthy, it contains valuable information).

@scubamuc @ernolf @christianlupus

I was able to get it fixed, thank you all for your assistance. As far as I can tell, the upgrade failed part way though, possibly due to a mysql user being altered during the upgrade. After poking around in the database, I tried updating the Nextcloud user to the password listed in the config. I was then able to access the web interface where it prompted me to finish the update. After it wrapped that up things seem to be working normally. The password matched my backed-up config files from the past so it seems something happened on the database side. Thank you all again, I appreciate it.