Internal Server Error after accidentally moving Instant Upload Folder

Hi everyone,

I need help with an internal server error in Nextcloud after I accidentally moved the Instant Upload Folder to an SMB location. This caused a disk corruption and made my disk “unmountable”. Although I was able to recover the disk with xfs_repair -L, the error persists.

Steps taken:

Recovered disk with xfs_repair -L.
Other Docker instances are working fine.

Request for help:

Seeking assistance to fix the Nextcloud internal server error.

Nextcloud version (eg, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): Unraid 6.12.6
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

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

Steps to replicate it:

  1. Move InstantUpload Folder Into SMB Share

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

PASTE HERE

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

PASTE HERE

PASTE HERE


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.

text  error  warn  system  array  login  

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

using keys found in /config/keys
Initializing nextcloud 28.0.2.5 (this can take a while) ...
Setting permissions
Initializing finished
After completing the web-based installer, restart the Nextcloud container to apply default memory caching and transactional file locking configurations.
Alternatively, you can apply your own configurations by editing /config/www/nextcloud/config/config.php following the documentation:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/files_locking_transactional.html
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-06-23 │ 2024-01-03 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php:71
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(71): PDO->query()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1100): Doctrine\DBAL\Driver\PDO\Connection->query()
#2 /app/www/public/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(337): OC\DB\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(377): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /app/www/public/lib/private/AppConfig.php(421): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /app/www/public/lib/private/AppConfig.php(187): OC\AppConfig->loadConfigValues()
#8 /app/www/public/lib/private/AppConfig.php(377): OC\AppConfig->getApps()
#9 /app/www/public/lib/private/App/AppManager.php(128): OC\AppConfig->getValues()
#10 /app/www/public/lib/private/App/AppManager.php(149): OC\App\AppManager->getInstalledAppsValues()
#11 /app/www/public/lib/private/legacy/OC_App.php(231): OC\App\AppManager->getInstalledApps()
#12 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
#13 /app/www/public/lib/base.php(700): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /app/www/public/lib/base.php(1200): OC::init()
#15 /app/www/public/cron.php(43): require_once('...')
#16 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:28
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(76): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1100): Doctrine\DBAL\Driver\PDO\Connection->query()
#2 /app/www/public/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(337): OC\DB\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(377): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /app/www/public/lib/private/AppConfig.php(421): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /app/www/public/lib/private/AppConfig.php(187): OC\AppConfig->loadConfigValues()
#8 /app/www/public/lib/private/AppConfig.php(377): OC\AppConfig->getApps()
#9 /app/www/public/lib/private/App/AppManager.php(128): OC\AppConfig->getValues()
#10 /app/www/public/lib/private/App/AppManager.php(149): OC\App\AppManager->getInstalledAppsValues()
#11 /app/www/public/lib/private/legacy/OC_App.php(231): OC\App\AppManager->getInstalledApps()
#12 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
#13 /app/www/public/lib/base.php(700): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /app/www/public/lib/base.php(1200): OC::init()
#15 /app/www/public/cron.php(43): require_once('...')
#16 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /app/www/public/3rdparty/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php:52
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1938): Doctrine\DBAL\Driver\API\SQLite\ExceptionConverter->convert()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1880): Doctrine\DBAL\Connection->handleDriverException()
#2 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1105): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
#3 /app/www/public/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(337): OC\DB\Connection->executeQuery()
#5 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(377): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#6 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /app/www/public/lib/private/AppConfig.php(421): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /app/www/public/lib/private/AppConfig.php(187): OC\AppConfig->loadConfigValues()
#9 /app/www/public/lib/private/AppConfig.php(377): OC\AppConfig->getApps()
#10 /app/www/public/lib/private/App/AppManager.php(128): OC\AppConfig->getValues()
#11 /app/www/public/lib/private/App/AppManager.php(149): OC\App\AppManager->getInstalledAppsValues()
#12 /app/www/public/lib/private/legacy/OC_App.php(231): OC\App\AppManager->getInstalledApps()
#13 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
#14 /app/www/public/lib/base.php(700): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#15 /app/www/public/lib/base.php(1200): OC::init()
#16 /app/www/public/cron.php(43): require_once('...')
#17 {main}

Output Log from MariaDB

text  error  warn  system  array  login  

cp: not replacing '/config/custom.cnf'
UMASK must be a 3-digit mode with an additional leading 0 to indicate octal.
The first digit will be corrected to 6, the others may be 0, 2, 4, or 6.
Warning: World-writable config file '/etc/my.cnf.d/custom.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf.d/custom.cnf' is ignored
Connection to localhost (127.0.0.1) 3306 port [tcp/mysql] succeeded!
cp: not replacing '/config/custom.cnf'
UMASK must be a 3-digit mode with an additional leading 0 to indicate octal.
The first digit will be corrected to 6, the others may be 0, 2, 4, or 6.
Warning: World-writable config file '/etc/my.cnf.d/custom.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf.d/custom.cnf' is ignored
Connection to localhost (127.0.0.1) 3306 port [tcp/mysql] succeeded!
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

[custom-init] No custom files found, skipping...
UMASK corrected from 022 to 0640 ...
240203 21:13:31 mysqld_safe Logging to '/config/databases/32fc02ce3dab.err'.
240203 21:13:31 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.
Caught SIGTERM signal!
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

[custom-init] No custom files found, skipping...
UMASK corrected from 022 to 0640 ...
240203 21:41:43 mysqld_safe Logging to '/config/databases/32fc02ce3dab.err'.
240203 21:41:43 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

Without more info it’s hard to say, but it appears you also may have done something to your database.

Where is your database hosted? And is operating?

Not entirely sure if my DB is good or not. The rest of my NAS is running well.

I have updated the OP with the log from my DB.

I’m running MySQL through MariaDB docker. Basically what SpaceInvaderOne recommends doing in his Installing Nextcloud Tutorial.

Also, I removed the MariaDB and the Nextcloud containers (and images) along with the share that my Nextcloud used.

After this I reinstalled everything following SpaceInvaderOne’s tutorial and Nextcloud is still giving me an internal server erro.

Just wanted to share an update on the issue I posted earlier about the Nextcloud internal server error after accidentally moving the Instant Upload Folder to an SMB location.

After trying various solutions, the only effective way I found to fix Nextcloud was to take the plunge and perform a clean wipe. I deleted my MariaDB database, the Nextcloud Docker containers, AND their data from the appdata folder. Following this clean slate, I had to reinstall everything from scratch.

It’s a bit drastic, but sometimes a fresh start is the best way to ensure a clean and fully functional setup. For those who might face a similar situation in the future, this approach could save you a lot of troubleshooting time.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.