Integrity constraint violation: 1062 Duplicate entry

Support intro

Hi all,

I’ve been annoying for many hours with a problem that I can’t get on with.
Everything always worked flawlessly until suddenly 1 from 3 users can´t login.
Username is “alex”.
Error says: “Interner Serverfehler” (which means “internal server error”).
Tried to reset the password via password-forgot-option and I tried to reset the password with admin account. Both failed with an error.
In all cases (logon, pw reset) there is the same error in log:

[index] Fehler: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alex-password::logincredentials/credentials' for key 'stocred_ui' at <<closure>>

Nextcloud version (eg, 20.0.5): 26.0.0 RC2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 8.2.3

It´s behind HAProxy (pfSense).

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

The output of your Nextcloud log in Admin > Logging:

[index] Fehler: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alex-password::logincredentials/credentials' for key 'stocred_ui' at <<closure>>

 0. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 328
    OC\DB\Exceptions\DbalException::wrap()
 1. /var/www/nextcloud/lib/private/DB/Connection.php line 396
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 2. /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php line 114
    OC\DB\Connection->setValues()
 3. /var/www/nextcloud/lib/private/Security/CredentialsManager.php line 72
    OC\DB\ConnectionAdapter->setValues()
 4. /var/www/nextcloud/apps/files_external/lib/Listener/StorePasswordListener.php line 73
    OC\Security\CredentialsManager->store()
 5. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_External\Listener\StorePasswordListener->handle()
 6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
 7. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
 8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 87
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 99
    OC\EventDispatcher\EventDispatcher->dispatch()
10. /var/www/nextcloud/lib/private/Server.php line 628
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
11. <<closure>>
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php line 105
    call_user_func_array()
13. /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php line 40
    OC\Hooks\BasicEmitter->emit()
14. /var/www/nextcloud/lib/private/User/Session.php line 400
    OC\Hooks\PublicEmitter->emit()
15. /var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php line 43
    OC\User\Session->completeLogin("*** sensitive parameters replaced ***")
16. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\CompleteLoginCommand->process()
17. /var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php line 60
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
18. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\LoggedInCheckCommand->process()
19. /var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php line 68
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
20. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\EmailLoginCommand->process()
21. /var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php line 53
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
22. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UidLoginCommand->process()
23. /var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php line 57
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
24. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UserDisabledCheckCommand->process()
25. /var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php line 52
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
26. /var/www/nextcloud/lib/private/Authentication/Login/Chain.php line 107
    OC\Authentication\Login\PreLoginHookCommand->process()
27. /var/www/nextcloud/core/Controller/LoginController.php line 326
    OC\Authentication\Login\Chain->process()
28. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\LoginController->tryLogin("*** sensitive parameters replaced ***")
29. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
30. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
31. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
32. /var/www/nextcloud/lib/base.php line 1051
    OC\Route\Router->match()
33. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alex-password::logincredentials/credentials' for key 'stocred_ui' at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1814
    Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1749
    Doctrine\DBAL\Connection->handleDriverException()
 2. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1163
    Doctrine\DBAL\Connection->convertExceptionDuringQuery()
 3. /var/www/nextcloud/lib/private/DB/Connection.php line 297
    Doctrine\DBAL\Connection->executeStatement()
 4. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/nextcloud/lib/private/DB/Connection.php line 396
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 8. /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php line 114
    OC\DB\Connection->setValues()
 9. /var/www/nextcloud/lib/private/Security/CredentialsManager.php line 72
    OC\DB\ConnectionAdapter->setValues()
10. /var/www/nextcloud/apps/files_external/lib/Listener/StorePasswordListener.php line 73
    OC\Security\CredentialsManager->store()
11. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_External\Listener\StorePasswordListener->handle()
12. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
13. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
14. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 87
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
15. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 99
    OC\EventDispatcher\EventDispatcher->dispatch()
16. /var/www/nextcloud/lib/private/Server.php line 628
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
17. <<closure>>
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
18. /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php line 105
    call_user_func_array()
19. /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php line 40
    OC\Hooks\BasicEmitter->emit()
20. /var/www/nextcloud/lib/private/User/Session.php line 400
    OC\Hooks\PublicEmitter->emit()
21. /var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php line 43
    OC\User\Session->completeLogin("*** sensitive parameters replaced ***")
22. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\CompleteLoginCommand->process()
23. /var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php line 60
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
24. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\LoggedInCheckCommand->process()
25. /var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php line 68
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
26. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\EmailLoginCommand->process()
27. /var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php line 53
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
28. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UidLoginCommand->process()
29. /var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php line 57
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
30. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UserDisabledCheckCommand->process()
31. /var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php line 52
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
32. /var/www/nextcloud/lib/private/Authentication/Login/Chain.php line 107
    OC\Authentication\Login\PreLoginHookCommand->process()
33. /var/www/nextcloud/core/Controller/LoginController.php line 326
    OC\Authentication\Login\Chain->process()
34. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\LoginController->tryLogin("*** sensitive parameters replaced ***")
35. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
36. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
37. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
38. /var/www/nextcloud/lib/base.php line 1051
    OC\Route\Router->match()
39. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alex-password::logincredentials/credentials' for key 'stocred_ui' at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 103
    Doctrine\DBAL\Driver\PDO\Exception::new()
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /var/www/nextcloud/lib/private/DB/Connection.php line 297
    Doctrine\DBAL\Connection->executeStatement()
 3. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 4. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/DB/Connection.php line 396
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php line 114
    OC\DB\Connection->setValues()
 8. /var/www/nextcloud/lib/private/Security/CredentialsManager.php line 72
    OC\DB\ConnectionAdapter->setValues()
 9. /var/www/nextcloud/apps/files_external/lib/Listener/StorePasswordListener.php line 73
    OC\Security\CredentialsManager->store()
10. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_External\Listener\StorePasswordListener->handle()
11. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
12. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
13. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 87
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
14. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 99
    OC\EventDispatcher\EventDispatcher->dispatch()
15. /var/www/nextcloud/lib/private/Server.php line 628
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
16. <<closure>>
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
17. /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php line 105
    call_user_func_array()
18. /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php line 40
    OC\Hooks\BasicEmitter->emit()
19. /var/www/nextcloud/lib/private/User/Session.php line 400
    OC\Hooks\PublicEmitter->emit()
20. /var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php line 43
    OC\User\Session->completeLogin("*** sensitive parameters replaced ***")
21. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\CompleteLoginCommand->process()
22. /var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php line 60
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
23. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\LoggedInCheckCommand->process()
24. /var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php line 68
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
25. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\EmailLoginCommand->process()
26. /var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php line 53
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
27. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UidLoginCommand->process()
28. /var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php line 57
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
29. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UserDisabledCheckCommand->process()
30. /var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php line 52
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
31. /var/www/nextcloud/lib/private/Authentication/Login/Chain.php line 107
    OC\Authentication\Login\PreLoginHookCommand->process()
32. /var/www/nextcloud/core/Controller/LoginController.php line 326
    OC\Authentication\Login\Chain->process()
33. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\LoginController->tryLogin("*** sensitive parameters replaced ***")
34. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
35. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
36. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
37. /var/www/nextcloud/lib/base.php line 1051
    OC\Route\Router->match()
38. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

Caused by:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'alex-password::logincredentials/credentials' for key 'stocred_ui' at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php line 101
    PDOStatement->execute()
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php line 1153
    Doctrine\DBAL\Driver\PDO\Statement->execute()
 2. /var/www/nextcloud/lib/private/DB/Connection.php line 297
    Doctrine\DBAL\Connection->executeStatement()
 3. /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 354
    OC\DB\Connection->executeStatement()
 4. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 326
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/DB/Connection.php line 396
    OC\DB\QueryBuilder\QueryBuilder->executeStatement()
 7. /var/www/nextcloud/lib/private/DB/ConnectionAdapter.php line 114
    OC\DB\Connection->setValues()
 8. /var/www/nextcloud/lib/private/Security/CredentialsManager.php line 72
    OC\DB\ConnectionAdapter->setValues()
 9. /var/www/nextcloud/apps/files_external/lib/Listener/StorePasswordListener.php line 73
    OC\Security\CredentialsManager->store()
10. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_External\Listener\StorePasswordListener->handle()
11. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke()
12. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
13. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 87
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
14. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 99
    OC\EventDispatcher\EventDispatcher->dispatch()
15. /var/www/nextcloud/lib/private/Server.php line 628
    OC\EventDispatcher\EventDispatcher->dispatchTyped()
16. <<closure>>
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
17. /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php line 105
    call_user_func_array()
18. /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php line 40
    OC\Hooks\BasicEmitter->emit()
19. /var/www/nextcloud/lib/private/User/Session.php line 400
    OC\Hooks\PublicEmitter->emit()
20. /var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php line 43
    OC\User\Session->completeLogin("*** sensitive parameters replaced ***")
21. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\CompleteLoginCommand->process()
22. /var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php line 60
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
23. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\LoggedInCheckCommand->process()
24. /var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php line 68
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
25. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\EmailLoginCommand->process()
26. /var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php line 53
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
27. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UidLoginCommand->process()
28. /var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php line 57
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
29. /var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php line 39
    OC\Authentication\Login\UserDisabledCheckCommand->process()
30. /var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php line 52
    OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully()
31. /var/www/nextcloud/lib/private/Authentication/Login/Chain.php line 107
    OC\Authentication\Login\PreLoginHookCommand->process()
32. /var/www/nextcloud/core/Controller/LoginController.php line 326
    OC\Authentication\Login\Chain->process()
33. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230
    OC\Core\Controller\LoginController->tryLogin("*** sensitive parameters replaced ***")
34. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
35. /var/www/nextcloud/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
36. /var/www/nextcloud/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
37. /var/www/nextcloud/lib/base.php line 1051
    OC\Route\Router->match()
38. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

POST /index.php/login

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

<?php
$CONFIG = array (
  'instanceid' => '*******',
  'passwordsalt' => '*******',
  'secret' => '*******',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.*******.org',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '26.0.0.9',
  'overwrite.cli.url' => 'https://nextcloud.*******.org',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '*******',
  'installed' => true,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud.log',
  'logfilemode' => 416,
  'loglevel' => 2,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => '*******',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => '*******',
  'mail_smtphost' => '*******',
  'mail_smtpport' => '465',
  'mail_smtpname' => '*******',
  'mail_smtppassword' => '*******',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DE',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'updater.secret' => '*******',
  'filesystem_check_changes' => 1,
  'theme' => '',
  'simpleSignUpLink.shown' => false,
  'app_install_overwrite' =>
  array (
    0 => 'cookbook',
  ),
);

Does anyone have an idea what the problem could be?