Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Database error when running migration 1027Date20230504122946 for app dav: LDAP Operations error #38902

Closed
5 of 8 tasks
Tracked by #2686
Chifilly opened this issue Jun 19, 2023 · 47 comments · Fixed by #39058
Closed
5 of 8 tasks
Tracked by #2686
Assignees
Labels

Comments

@Chifilly
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

This bug report is similar to #38873 however it's a different outcome. I didn't know whether they're actually related or not, so I opted to create a new bug report.

Updating my Nextcloud instance causes the Update to 27.0.0 prompt to appear, but updating throws the following error and logs:

Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: Not a mysql database -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Exception: Database error when running migration 1027Date20230504122946 for app dav LDAP Operations error

Steps to reproduce

  1. Have an older version of Nextcloud via docker (version 26 in my case)
    looking at the error, the user_ldap app potentially needs to be installed too
  2. Update the container
  3. Attempt to run the update prompt from the web UI

Expected behavior

The migration works and I can access Nextcloud again

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REDACTED BY ME***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "26.0.2.1",
        "overwrite.cli.url": "***REDACTED BY ME***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "overwritehost": "***REDACTED BY ME***",
        "overwriteprotocol": "https",
        "loglevel": 2,
        "maintenance": false,
        "app_install_overwrite": [
            "officeonline"
        ],
        "has_rebuilt_cache": true,
        "theme": ""
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.16.0
  - bruteforcesettings: 2.6.0
  - calendar: 4.4.2
  - circles: 27.0.0
  - cloud_federation_api: 1.10.0
  - comments: 1.16.0
  - contacts: 5.3.1
  - contactsinteraction: 1.7.0
  - dashboard: 7.6.0
  - dav: 1.25.0
  - federatedfilesharing: 1.16.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - firstrunwizard: 2.15.0
  - logreader: 2.11.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.15.0
  - notes: 4.8.0
  - notifications: 2.14.0
  - oauth2: 1.15.0
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - quota_warning: 1.17.0
  - recommendations: 1.5.0
  - related_resources: 1.1.0-alpha1
  - serverinfo: 1.16.0
  - settings: 1.8.0
  - sharebymail: 1.16.0
  - support: 1.9.0
  - survey_client: 1.14.0
  - suspicious_login: 5.0.0
  - systemtags: 1.16.0
  - tasks: 0.15.0
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
  - twofactor_totp: 8.0.0
  - updatenotification: 1.16.0
  - user_ldap: 1.17.0
  - user_status: 1.6.0
  - viewer: 1.10.0
  - weather_status: 1.6.0
  - workflowengine: 2.8.0
Disabled:
  - encryption: 2.15.0 (installed 2.12.0)
  - files_external: 1.19.0
  - files_fulltextsearch: 26.0.0 (installed 26.0.0)
  - fulltextsearch: 26.0.0 (installed 26.0.0)
  - groupfolders: 14.0.2 (installed 14.0.2)
  - holiday_calendars: 0.3.0 (installed 0.3.0)
  - onlyoffice: 7.8.0 (installed 7.8.0)
  - richdocuments: 8.0.2 (installed 8.0.2)

Nextcloud Signing status

Can't access this URL since it's still prompting to update to 27.0.0

Nextcloud Logs

Configuring Redis as session handler
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.16.0.32. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.16.0.32. Set the 'ServerName' directive globally to suppress this message
[Mon Jun 19 15:22:01.680290 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.2.7 configured -- resuming normal operations
[Mon Jun 19 15:22:01.680324 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
REDACTED - - [19/Jun/2023:15:22:03 +0100] "PROPFIND /remote.php/dav/ HTTP/1.1" 503 1700 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
REDACTED - - [19/Jun/2023:15:22:03 +0100] "PROPFIND /remote.php/dav/addressbooks/users/adam/contacts/ HTTP/1.1" 503 1704 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
172.16.0.25 - - [19/Jun/2023:15:22:32 +0100] "GET / HTTP/1.1" 200 12909 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:22:39 +0100] "GET / HTTP/1.1" 200 7095 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:22:40 +0100] "GET /apps/theming/img/background/kamil-porembinski-clouds.jpg HTTP/1.1" 200 110048 "REDACTED/core/css/guest.css?v=ffebad8b-16" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:22:40 +0100] "GET /core/img/logo/logo.svg HTTP/1.1" 200 1280 "REDACTED/core/css/guest.css?v=ffebad8b-16" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:22:42 +0100] "GET /core/ajax/update.php?requesttoken=cZc%2F5zHqvDFXPbnVO3JgKquuLFsGobK8%2BxtRoc7vUU0%3D%3AKf0LkkCtymcQdOukURQ4R8nYQRd%2BxuHOrmMf7721Nzc%3D HTTP/1.1" 200 1885 "REDACTED/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:22:48 +0100] "GET / HTTP/1.1" 200 6615 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:23:32 +0100] "GET / HTTP/1.1" 200 12917 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:23:48 +0100] "GET / HTTP/1.1" 200 6616 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:24:32 +0100] "GET / HTTP/1.1" 200 12919 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:24:49 +0100] "GET / HTTP/1.1" 200 6615 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:24:50 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1718 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:24:51 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1702 "-" "OkHttp"
172.16.0.25 - - [19/Jun/2023:15:25:32 +0100] "GET / HTTP/1.1" 200 12909 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:25:35 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:25:35 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:25:35 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:25:36 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:25:49 +0100] "GET / HTTP/1.1" 200 6615 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:26:32 +0100] "GET / HTTP/1.1" 200 12911 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:26:37 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:26:38 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:26:50 +0100] "GET / HTTP/1.1" 200 6625 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:27:33 +0100] "GET / HTTP/1.1" 200 12911 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:27:39 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:27:40 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:27:50 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1696 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:27:50 +0100] "GET / HTTP/1.1" 200 6623 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:27:51 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1710 "-" "OkHttp"
172.16.0.25 - - [19/Jun/2023:15:28:33 +0100] "GET / HTTP/1.1" 200 12911 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:28:41 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:28:42 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:28:50 +0100] "GET / HTTP/1.1" 200 6616 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:29:33 +0100] "GET / HTTP/1.1" 200 12903 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:29:43 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:29:44 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:29:51 +0100] "GET / HTTP/1.1" 200 6614 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:30:34 +0100] "GET / HTTP/1.1" 200 12909 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:30:45 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:30:46 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:30:50 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1710 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:30:51 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1700 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:30:51 +0100] "GET / HTTP/1.1" 200 6622 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:31:34 +0100] "GET / HTTP/1.1" 200 12913 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:31:47 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:31:48 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:31:51 +0100] "GET / HTTP/1.1" 200 6615 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:31:55 +0100] "PROPFIND /remote.php/dav/ HTTP/1.1" 503 1700 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
REDACTED - - [19/Jun/2023:15:31:55 +0100] "PROPFIND /remote.php/dav/addressbooks/users/adam/contacts/ HTTP/1.1" 503 1704 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
REDACTED - - [19/Jun/2023:15:31:56 +0100] "PROPFIND /remote.php/dav/addressbooks/users/adam/contacts/ HTTP/1.1" 503 1700 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
REDACTED - - [19/Jun/2023:15:31:56 +0100] "PROPFIND /remote.php/dav/ HTTP/1.1" 503 1712 "-" "Mozilla/5.0 (X11; Linux x86_64) KIO/5.106 akonadi_davgroupware_resource_3/5.23.1 (23.04.1)"
172.16.0.25 - - [19/Jun/2023:15:32:34 +0100] "GET / HTTP/1.1" 200 12907 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:32:47 +0100] "PROPFIND /remote.php/dav/calendars/adam/test/ HTTP/1.1" 503 4003 "-" "DAVx5/4.3.4.1-ose (2023/06/16; dav4jvm; okhttp/4.11.0) Android/13"
REDACTED - adam [19/Jun/2023:15:32:47 +0100] "PROPFIND /remote.php/dav/calendars/adam/shopping-1/ HTTP/1.1" 503 3995 "-" "DAVx5/4.3.4.1-ose (2023/06/16; dav4jvm; okhttp/4.11.0) Android/13"
REDACTED - adam [19/Jun/2023:15:32:47 +0100] "PROPFIND /remote.php/dav/calendars/adam/contact_birthdays/ HTTP/1.1" 503 3142 "-" "DAVx5/4.3.4.1-ose (2023/06/16; dav4jvm; okhttp/4.11.0) Android/13"
REDACTED - adam [19/Jun/2023:15:32:47 +0100] "PROPFIND /remote.php/dav/calendars/adam/personal/ HTTP/1.1" 503 3142 "-" "DAVx5/4.3.4.1-ose (2023/06/16; dav4jvm; okhttp/4.11.0) Android/13"
REDACTED - adam [19/Jun/2023:15:32:49 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:32:49 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:32:51 +0100] "GET / HTTP/1.1" 200 6621 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:33:34 +0100] "GET / HTTP/1.1" 200 12909 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:33:39 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1704 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:33:40 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1710 "-" "OkHttp"
REDACTED - adam [19/Jun/2023:15:33:51 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:33:51 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - - [19/Jun/2023:15:33:52 +0100] "GET / HTTP/1.1" 200 6614 "-" "Uptime-Kuma/1.21.3"
172.16.0.25 - - [19/Jun/2023:15:34:35 +0100] "GET / HTTP/1.1" 200 12915 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:34:41 +0100] "GET /csrftoken HTTP/1.1" 200 7096 "REDACTED/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:34:52 +0100] "GET / HTTP/1.1" 200 6613 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:34:53 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:34:54 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.16.0.25 - - [19/Jun/2023:15:35:35 +0100] "GET / HTTP/1.1" 200 12915 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:35:52 +0100] "GET / HTTP/1.1" 200 6616 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:35:55 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:35:56 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.16.0.25 - - [19/Jun/2023:15:36:35 +0100] "GET / HTTP/1.1" 200 12911 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:36:50 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1712 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:36:51 +0100] "PROPFIND /remote.php/dav/files/adam/notes/ HTTP/1.1" 503 1698 "-" "OkHttp"
REDACTED - - [19/Jun/2023:15:36:53 +0100] "GET / HTTP/1.1" 200 6616 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:36:57 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:36:58 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.16.0.25 - - [19/Jun/2023:15:37:35 +0100] "GET / HTTP/1.1" 200 12919 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:37:53 +0100] "GET / HTTP/1.1" 200 6614 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:37:59 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:38:00 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.16.0.25 - - [19/Jun/2023:15:38:35 +0100] "GET / HTTP/1.1" 200 12913 "-" "Uptime-Kuma/1.21.3"
REDACTED - - [19/Jun/2023:15:38:40 +0100] "GET /index.php/settings/integrity/failed HTTP/1.1" 200 7092 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
REDACTED - - [19/Jun/2023:15:38:54 +0100] "GET / HTTP/1.1" 200 6619 "-" "Uptime-Kuma/1.21.3"
REDACTED - adam [19/Jun/2023:15:39:01 +0100] "GET /status.php HTTP/1.1" 200 1027 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:39:02 +0100] "PROPFIND /remote.php/dav/files/adam/ HTTP/1.1" 503 841 "-" "Mozilla/5.0 (Linux) mirall/3.8.1 (build 14888) (Nextcloud, neon-5.19.0-43-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
REDACTED - adam [19/Jun/2023:15:39:32 +0100] "GET /remote.php/dav/files/adam/stylus/meta.json HTTP/1.1" 503 4003 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0"
172.16.0.25 - - [19/Jun/2023:15:39:35 +0100] "GET / HTTP/1.1" 200 12911 "-" "Uptime-Kuma/1.21.3"

Additional info

No response

@Chifilly Chifilly added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 19, 2023
@Chifilly Chifilly changed the title [Bug]: NC 27: Update failed - Database error when running migration 1027Date20230504122946 for app dav LDAP [Bug]: NC 27: Update failed - Database error when running migration 1027Date20230504122946 for app dav LDAP Operations error Jun 19, 2023
@szaimen
Copy link
Contributor

szaimen commented Jun 19, 2023

cc @ChristophWurst a second one after nextcloud/all-in-one#2761

@mod25

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as resolved.

@ChristophWurst
Copy link
Member

Same for you @Chifilly. You posted the access logs. Please find the entry for Operations error in your data/nextcloud.log. I'd like to see the full entry and its trace.

@mod25

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as off-topic.

@tcitworld
Copy link
Member

tcitworld commented Jun 20, 2023

I just noticed that the *davbackends start a transaction in addChange, which is always called from an existing transaction. I don't think that is the problem but it looks suspicious too

Yeah, for me this should be safe. https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting

For those using MySQL, can you check that the value in the Auto_increment column from the following output :

SHOW TABLE STATUS WHERE Name = 'oc_addressbookchanges';

and

SELECT MAX(id) FROM oc_addressbookchanges;

are the same values? Otherwise this means MySQL had a little issue there. It's possible

REPAIR TABLE oc_addressbookchanges;

fixes it (don't do it if not needed).

It would be nice to get such Nextcloud logs from PostgreSQL users as well. @Chifilly

@mod25
Copy link

mod25 commented Jun 20, 2023

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 12833
Server version: 11.0.2-MariaDB-1:11.0.2+maria~ubu2204 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [nextcloud]> SHOW TABLE STATUS WHERE Name = 'oc_addressbookchanges';
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| Name                  | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation   | Checksum | Create_options        | Comment | Max_index_length | Temporary |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| oc_addressbookchanges | InnoDB |      10 | Compressed |    0 |              0 |        8192 |               0 |         8192 |         0 |             61 | 2022-04-21 00:30:13 | NULL        | NULL       | utf8mb4_bin |     NULL | row_format=COMPRESSED |         |                0 | N         |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
1 row in set (0.009 sec)

MariaDB [nextcloud]> SELECT MAX(id) FROM oc_addressbookchanges;
+---------+
| MAX(id) |
+---------+
|     408 |
+---------+
1 row in set (0.003 sec)

MariaDB [nextcloud]>

my values are not the same

repair is not supported

MariaDB [nextcloud]> REPAIR TABLE oc_addressbookchanges;
+---------------------------------+--------+----------+---------------------------------------------------------+
| Table                           | Op     | Msg_type | Msg_text                                                |
+---------------------------------+--------+----------+---------------------------------------------------------+
| nextcloud.oc_addressbookchanges | repair | note     | The storage engine for the table doesn't support repair |
+---------------------------------+--------+----------+---------------------------------------------------------+
1 row in set (0.001 sec)

@tcitworld
Copy link
Member

This should do it then. The value (here 409) should be equal to the current MAX(id) + 1 (make sure you run SELECT to get an up-to-date value).

ALTER TABLE oc_addressbookchanges AUTO_INCREMENT=409;  

@mod25
Copy link

mod25 commented Jun 20, 2023

MariaDB [nextcloud]> SELECT MAX(id) FROM oc_addressbookchanges;
+---------+
| MAX(id) |
+---------+
|     408 |
+---------+
1 row in set (0.001 sec)

MariaDB [nextcloud]> SHOW TABLE STATUS WHERE Name = 'oc_addressbookchanges';
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| Name                  | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation   | Checksum | Create_options        | Comment | Max_index_length | Temporary |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| oc_addressbookchanges | InnoDB |      10 | Compressed |    0 |              0 |        8192 |               0 |         8192 |         0 |             61 | 2022-04-21 00:30:13 | NULL        | NULL       | utf8mb4_bin |     NULL | row_format=COMPRESSED |         |                0 | N         |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
1 row in set (0.009 sec)

MariaDB [nextcloud]> ALTER TABLE oc_addressbookchanges AUTO_INCREMENT=409;  
Query OK, 0 rows affected (0.014 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [nextcloud]> SELECT MAX(id) FROM oc_addressbookchanges;
+---------+
| MAX(id) |
+---------+
|     408 |
+---------+
1 row in set (0.002 sec)

MariaDB [nextcloud]> SHOW TABLE STATUS WHERE Name = 'oc_addressbookchanges';
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| Name                  | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation   | Checksum | Create_options        | Comment | Max_index_length | Temporary |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| oc_addressbookchanges | InnoDB |      10 | Compressed |    0 |              0 |        8192 |               0 |         8192 |         0 |            409 | 2023-06-20 14:57:33 | NULL        | NULL       | utf8mb4_bin |     NULL | row_format=COMPRESSED |         |                0 | N         |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
1 row in set (0.009 sec)
MariaDB [nextcloud]> SHOW TABLE STATUS WHERE Name = 'oc_addressbookchanges';
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| Name                  | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation   | Checksum | Create_options        | Comment | Max_index_length | Temporary |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
| oc_addressbookchanges | InnoDB |      10 | Compressed |  408 |             80 |       32768 |               0 |         8192 |         0 |            410 | 2023-06-20 14:57:33 | NULL        | NULL       | utf8mb4_bin |     NULL | row_format=COMPRESSED |         |                0 | N         |
+-----------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+-----------------------+---------+------------------+-----------+
1 row in set (0.009 sec)

done still same issue. afte start upgrade Auto_increment has value 410.

nextcloud.log

{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::maintenanceEnabled: Turned on maintenance mode","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":0,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"core","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"starting upgrade from 26.0.2.1 to 27.0.0.8","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"core"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Repair MySQL collation","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"OC\\Repair\\Events\\RepairInfoEvent: Repair info: All tables already have the correct collation -> nothing to do","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Repair SQLite autoincrement","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:24+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Copy data from accounts table when migrating from ownCloud","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:26+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"OC\\Repair\\Events\\RepairStepEvent: Repair step: Drop account terms table when migrating from ownCloud","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:26+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::dbUpgradeBefore: Updating database schema","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:26+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::dbUpgrade: Updated database","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:26+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::appUpgradeStarted: Updating <dav> ...","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":3,"time":"2023-06-20T13:09:27+00:00","remoteAddr":"192.168.178.3","user":"--","app":"no app in context","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","exception":{"Exception":"Exception","Message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","Code":0,"Trace":[{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":844,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":359,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Updater.php","line":271,"function":"doAppUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.0.0.8","26.0.2.1"]},{"file":"/var/www/html/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/var/www/html/lib/private/DB/MigrationService.php","Line":421,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException","Message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","Code":1062,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1814,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1749,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(?, ?, ?, ?, ?)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":295,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(?, ?, ?, ?, ?)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(:dcValue1, :dcValue2, :name, :value, :preferred)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1335,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1303,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":740,"function":"updateProperties","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":718,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":241,"function":"updateCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":229,"function":"atomic","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":278,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Manager.php","line":527,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":277,"function":"callForAllUsers","class":"OC\\User\\Manager","type":"->","args":[["Closure"]]},{"file":"/var/www/html/apps/dav/lib/Migration/Version1027Date20230504122946.php","line":52,"function":"syncInstance","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":537,"function":"postSchemaChange","class":"OCA\\DAV\\Migration\\Version1027Date20230504122946","type":"->","args":[["OC\\Migration\\SimpleOutput"],["Closure"],["oc_"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":417,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["1027Date20230504122946",false]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":844,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":359,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Updater.php","line":271,"function":"doAppUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.0.0.8","26.0.2.1"]},{"file":"/var/www/html/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":64,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","Code":1062,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":103,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["23000",1062,"Duplicate entry '49' for key 'PRIMARY'"]]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1153,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":295,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(?, ?, ?, ?, ?)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(:dcValue1, :dcValue2, :name, :value, :preferred)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1335,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1303,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":740,"function":"updateProperties","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":718,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":241,"function":"updateCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":229,"function":"atomic","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":278,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Manager.php","line":527,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":277,"function":"callForAllUsers","class":"OC\\User\\Manager","type":"->","args":[["Closure"]]},{"file":"/var/www/html/apps/dav/lib/Migration/Version1027Date20230504122946.php","line":52,"function":"syncInstance","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":537,"function":"postSchemaChange","class":"OCA\\DAV\\Migration\\Version1027Date20230504122946","type":"->","args":[["OC\\Migration\\SimpleOutput"],["Closure"],["oc_"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":417,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["1027Date20230504122946",false]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":844,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":359,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Updater.php","line":271,"function":"doAppUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.0.0.8","26.0.2.1"]},{"file":"/var/www/html/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":30,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","Code":"23000","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":101,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1153,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":295,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(?, ?, ?, ?, ?)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_cards_properties` (`addressbookid`, `cardid`, `name`, `value`, `preferred`) VALUES(:dcValue1, :dcValue2, :name, :value, :preferred)",["*** sensitive parameters replaced ***",159,"UID","Anna",0],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1335,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":1303,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":740,"function":"updateProperties","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/CardDavBackend.php","line":718,"function":"atomic","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":241,"function":"updateCard","class":"OCA\\DAV\\CardDAV\\CardDavBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/public/AppFramework/Db/TTransactional.php","line":63,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":229,"function":"atomic","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":[["Closure"],["OC\\DB\\ConnectionAdapter"]]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":278,"function":"updateUser","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/User/Manager.php","line":527,"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/dav/lib/CardDAV/SyncService.php","line":277,"function":"callForAllUsers","class":"OC\\User\\Manager","type":"->","args":[["Closure"]]},{"file":"/var/www/html/apps/dav/lib/Migration/Version1027Date20230504122946.php","line":52,"function":"syncInstance","class":"OCA\\DAV\\CardDAV\\SyncService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":537,"function":"postSchemaChange","class":"OCA\\DAV\\Migration\\Version1027Date20230504122946","type":"->","args":[["OC\\Migration\\SimpleOutput"],["Closure"],["oc_"]]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":417,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["1027Date20230504122946",false]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":844,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":359,"function":"updateApp","class":"OC_App","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Updater.php","line":271,"function":"doAppUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/var/www/html/lib/private/Updater.php","line":139,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["27.0.0.8","26.0.2.1"]},{"file":"/var/www/html/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":101}}},"message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","exception":{},"CustomMessage":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'"}}
{"reqId":"KmELhXM4379vCE57hgff","level":3,"time":"2023-06-20T13:09:27+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::failure: Exception: Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '49' for key 'PRIMARY'","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":3,"time":"2023-06-20T13:09:27+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:27+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}
{"reqId":"KmELhXM4379vCE57hgff","level":1,"time":"2023-06-20T13:09:27+00:00","remoteAddr":"192.168.178.3","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=W1DZKixXMwC2jK2z2bUoVVNLkSoeQ0GsUxKgvoKzr%2F0%3D%3AF2GTZ2YESUPP5%2BrUkNIYPQsYwm5xATb2HEjU%2B8jgwas%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"26.0.2.1","data":{"app":"updater"}}

@Chifilly
Copy link
Author

For me, there seems to be 3 relevant lines in my nextcloud.log file:

{
	"reqId": "ilirH5idSrBdOv9BO4lm",
	"level": 3,
	"time": "2023-06-20T15:36:55+00:00",
	"remoteAddr": "172.16.0.11",
	"user": "--",
	"app": "PHP",
	"method": "GET",
	"url": "/core/ajax/update.php?requesttoken=CWkaghVWn1QekcbCp1FROTphbRbBOugS9fqLTfBvJbM%3D%3AWF9txV1h0idsqJGV3mgBfE0ROHSxYo9FuYzRHpQraoY%3D",
	"message": "ldap_search(): Search: Operations error at /var/www/html/apps/user_ldap/lib/LDAP.php#306",
	"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0",
	"version": "26.0.2.1",
	"data": {
		"app": "PHP"
	}
}
{
	"reqId": "ilirH5idSrBdOv9BO4lm",
	"level": 0,
	"time": "2023-06-20T15:36:55+00:00",
	"remoteAddr": "172.16.0.11",
	"user": "--",
	"app": "user_ldap",
	"method": "GET",
	"url": "/core/ajax/update.php?requesttoken=CWkaghVWn1QekcbCp1FROTphbRbBOugS9fqLTfBvJbM%3D%3AWF9txV1h0idsqJGV3mgBfE0ROHSxYo9FuYzRHpQraoY%3D",
	"message": "LDAP error Operations error (1) after calling ldap_search",
	"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0",
	"version": "26.0.2.1",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "ilirH5idSrBdOv9BO4lm",
	"level": 3,
	"time": "2023-06-20T15:36:55+00:00",
	"remoteAddr": "172.16.0.11",
	"user": "--",
	"app": "no app in context",
	"method": "GET",
	"url": "/core/ajax/update.php?requesttoken=CWkaghVWn1QekcbCp1FROTphbRbBOugS9fqLTfBvJbM%3D%3AWF9txV1h0idsqJGV3mgBfE0ROHSxYo9FuYzRHpQraoY%3D",
	"message": "Database error when running migration 1027Date20230504122946 for app dav\nLDAP Operations error",
	"userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0",
	"version": "26.0.2.1",
	"exception": {
		"Exception": "Exception",
		"Message": "Database error when running migration 1027Date20230504122946 for app dav\nLDAP Operations error",
		"Code": 0,
		"Trace": [
			{
				"file": "/var/www/html/lib/private/legacy/OC_App.php",
				"line": 844,
				"function": "migrate",
				"class": "OC\\DB\\MigrationService",
				"type": "->",
				"args": []
			},
			{
				"file": "/var/www/html/lib/private/Updater.php",
				"line": 359,
				"function": "updateApp",
				"class": "OC_App",
				"type": "::",
				"args": [
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/lib/private/Updater.php",
				"line": 271,
				"function": "doAppUpgrade",
				"class": "OC\\Updater",
				"type": "->",
				"args": []
			},
			{
				"file": "/var/www/html/lib/private/Updater.php",
				"line": 139,
				"function": "doUpgrade",
				"class": "OC\\Updater",
				"type": "->",
				"args": [
					"27.0.0.8",
					"26.0.2.1"
				]
			},
			{
				"file": "/var/www/html/core/ajax/update.php",
				"line": 185,
				"function": "upgrade",
				"class": "OC\\Updater",
				"type": "->",
				"args": []
			}
		],
		"File": "/var/www/html/lib/private/DB/MigrationService.php",
		"Line": 421,
		"Previous": {
			"Exception": "Exception",
			"Message": "LDAP Operations error",
			"Code": 1,
			"Trace": [
				{
					"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
					"line": 411,
					"function": "processLDAPError",
					"class": "OCA\\User_LDAP\\LDAP",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						1,
						"Operations error"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
					"line": 308,
					"function": "postFunctionCall",
					"class": "OCA\\User_LDAP\\LDAP",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
					"line": 214,
					"function": "invokeLDAPMethod",
					"class": "OCA\\User_LDAP\\LDAP",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"function": "search",
					"class": "OCA\\User_LDAP\\LDAP",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 1065,
					"function": "call_user_func_array",
					"args": [
						[
							[
								"OCA\\User_LDAP\\LDAP"
							],
							"*** sensitive parameters replaced ***"
						],
						[
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***",
							"*** sensitive parameters replaced ***"
						]
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 1068,
					"function": "OCA\\User_LDAP\\{closure}",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 1126,
					"function": "invokeLDAPMethod",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 1290,
					"function": "executeSearch",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 977,
					"function": "search",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/Access.php",
					"line": 869,
					"function": "searchUsers",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/User_LDAP.php",
					"line": 284,
					"function": "fetchListOfUsers",
					"class": "OCA\\User_LDAP\\Access",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/user_ldap/lib/User_Proxy.php",
					"line": 205,
					"function": "getUsers",
					"class": "OCA\\User_LDAP\\User_LDAP",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/lib/private/User/Manager.php",
					"line": 521,
					"function": "getUsers",
					"class": "OCA\\User_LDAP\\User_Proxy",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/apps/dav/lib/CardDAV/SyncService.php",
					"line": 277,
					"function": "callForAllUsers",
					"class": "OC\\User\\Manager",
					"type": "->",
					"args": [
						[
							"Closure"
						]
					]
				},
				{
					"file": "/var/www/html/apps/dav/lib/Migration/Version1027Date20230504122946.php",
					"line": 52,
					"function": "syncInstance",
					"class": "OCA\\DAV\\CardDAV\\SyncService",
					"type": "->",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/lib/private/DB/MigrationService.php",
					"line": 537,
					"function": "postSchemaChange",
					"class": "OCA\\DAV\\Migration\\Version1027Date20230504122946",
					"type": "->",
					"args": [
						[
							"OC\\Migration\\SimpleOutput"
						],
						[
							"Closure"
						],
						[
							"oc_"
						]
					]
				},
				{
					"file": "/var/www/html/lib/private/DB/MigrationService.php",
					"line": 417,
					"function": "executeStep",
					"class": "OC\\DB\\MigrationService",
					"type": "->",
					"args": [
						"1027Date20230504122946",
						false
					]
				},
				{
					"file": "/var/www/html/lib/private/legacy/OC_App.php",
					"line": 844,
					"function": "migrate",
					"class": "OC\\DB\\MigrationService",
					"type": "->",
					"args": []
				},
				{
					"file": "/var/www/html/lib/private/Updater.php",
					"line": 359,
					"function": "updateApp",
					"class": "OC_App",
					"type": "::",
					"args": [
						"*** sensitive parameters replaced ***"
					]
				},
				{
					"file": "/var/www/html/lib/private/Updater.php",
					"line": 271,
					"function": "doAppUpgrade",
					"class": "OC\\Updater",
					"type": "->",
					"args": []
				},
				{
					"file": "/var/www/html/lib/private/Updater.php",
					"line": 139,
					"function": "doUpgrade",
					"class": "OC\\Updater",
					"type": "->",
					"args": [
						"27.0.0.8",
						"26.0.2.1"
					]
				},
				{
					"file": "/var/www/html/core/ajax/update.php",
					"line": 185,
					"function": "upgrade",
					"class": "OC\\Updater",
					"type": "->",
					"args": []
				}
			],
			"File": "/var/www/html/apps/user_ldap/lib/LDAP.php",
			"Line": 379
		},
		"message": "Database error when running migration 1027Date20230504122946 for app dav\nLDAP Operations error",
		"exception": {},
		"CustomMessage": "Database error when running migration 1027Date20230504122946 for app dav\nLDAP Operations error"
	}
}

@MG-5
Copy link

MG-5 commented Jun 20, 2023

I have the same symptoms but without user_ldap activated.

Error message:

{
   "reqId":"dvK4KAT0GSaAbg2VDrE3",
   "level":3,
   "time":"2023-06-20T23:34:02+00:00",
   "remoteAddr":"",
   "user":"--",
   "app":"no app in context",
   "method":"",
   "url":"--",
   "message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
   "userAgent":"--",
   "version":"26.0.2.1",
   "exception":{
      "Exception":"Exception",
      "Message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
      "Code":0,
      "Trace":[
         {
            "file":"/config/www/nextcloud/lib/private/legacy/OC_App.php",
            "line":844,
            "function":"migrate",
            "class":"OC\\DB\\MigrationService",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/lib/private/Updater.php",
            "line":359,
            "function":"updateApp",
            "class":"OC_App",
            "type":"::",
            "args":[
               "*** sensitive parameters replaced ***"
            ]
         },
         {
            "file":"/config/www/nextcloud/lib/private/Updater.php",
            "line":271,
            "function":"doAppUpgrade",
            "class":"OC\\Updater",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/lib/private/Updater.php",
            "line":139,
            "function":"doUpgrade",
            "class":"OC\\Updater",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/core/Command/Upgrade.php",
            "line":225,
            "function":"upgrade",
            "class":"OC\\Updater",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
            "line":298,
            "function":"execute",
            "class":"OC\\Core\\Command\\Upgrade",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
            "line":1040,
            "function":"run",
            "class":"Symfony\\Component\\Console\\Command\\Command",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
            "line":301,
            "function":"doRunCommand",
            "class":"Symfony\\Component\\Console\\Application",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
            "line":171,
            "function":"doRun",
            "class":"Symfony\\Component\\Console\\Application",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/lib/private/Console/Application.php",
            "line":211,
            "function":"run",
            "class":"Symfony\\Component\\Console\\Application",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/console.php",
            "line":100,
            "function":"run",
            "class":"OC\\Console\\Application",
            "type":"->"
         },
         {
            "file":"/config/www/nextcloud/occ",
            "line":11,
            "args":[
               "/config/www/nextcloud/console.php"
            ],
            "function":"require_once"
         }
      ],
      "File":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
      "Line":421,
      "Previous":{
         "Exception":"Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException",
         "Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
         "Code":1364,
         "Trace":[
            {
               "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
               "line":1814,
               "function":"convert",
               "class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
               "line":1749,
               "function":"handleDriverException",
               "class":"Doctrine\\DBAL\\Connection",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
               "line":1163,
               "function":"convertExceptionDuringQuery",
               "class":"Doctrine\\DBAL\\Connection",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/DB/Connection.php",
               "line":295,
               "function":"executeStatement",
               "class":"Doctrine\\DBAL\\Connection",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
               "line":354,
               "function":"executeStatement",
               "class":"OC\\DB\\Connection",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
               "line":280,
               "function":"execute",
               "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
               "line":433,
               "function":"execute",
               "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
               "line":63,
               "function":"OCA\\DAV\\CardDAV\\{closure}",
               "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
               "type":"->",
               "args":[
                  "*** sensitive parameters replaced ***"
               ]
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
               "line":422,
               "function":"atomic",
               "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
               "line":125,
               "function":"createAddressBook",
               "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
               "type":"->",
               "args":[
                  "*** sensitive parameters replaced ***"
               ]
            },
            {
               "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
               "line":63,
               "function":"OCA\\DAV\\CardDAV\\{closure}",
               "class":"OCA\\DAV\\CardDAV\\SyncService",
               "type":"->",
               "args":[
                  "*** sensitive parameters replaced ***"
               ]
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
               "line":120,
               "function":"atomic",
               "class":"OCA\\DAV\\CardDAV\\SyncService",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
               "line":267,
               "function":"ensureSystemAddressBookExists",
               "class":"OCA\\DAV\\CardDAV\\SyncService",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
               "line":276,
               "function":"getLocalSystemAddressBook",
               "class":"OCA\\DAV\\CardDAV\\SyncService",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/apps/dav/lib/Migration/Version1027Date20230504122946.php",
               "line":52,
               "function":"syncInstance",
               "class":"OCA\\DAV\\CardDAV\\SyncService",
               "type":"->",
               "args":[
                  "*** sensitive parameters replaced ***"
               ]
            },
            {
               "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
               "line":537,
               "function":"postSchemaChange",
               "class":"OCA\\DAV\\Migration\\Version1027Date20230504122946",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
               "line":417,
               "function":"executeStep",
               "class":"OC\\DB\\MigrationService",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/legacy/OC_App.php",
               "line":844,
               "function":"migrate",
               "class":"OC\\DB\\MigrationService",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/Updater.php",
               "line":359,
               "function":"updateApp",
               "class":"OC_App",
               "type":"::",
               "args":[
                  "*** sensitive parameters replaced ***"
               ]
            },
            {
               "file":"/config/www/nextcloud/lib/private/Updater.php",
               "line":271,
               "function":"doAppUpgrade",
               "class":"OC\\Updater",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/Updater.php",
               "line":139,
               "function":"doUpgrade",
               "class":"OC\\Updater",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/core/Command/Upgrade.php",
               "line":225,
               "function":"upgrade",
               "class":"OC\\Updater",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
               "line":298,
               "function":"execute",
               "class":"OC\\Core\\Command\\Upgrade",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
               "line":1040,
               "function":"run",
               "class":"Symfony\\Component\\Console\\Command\\Command",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
               "line":301,
               "function":"doRunCommand",
               "class":"Symfony\\Component\\Console\\Application",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
               "line":171,
               "function":"doRun",
               "class":"Symfony\\Component\\Console\\Application",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/lib/private/Console/Application.php",
               "line":211,
               "function":"run",
               "class":"Symfony\\Component\\Console\\Application",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/console.php",
               "line":100,
               "function":"run",
               "class":"OC\\Console\\Application",
               "type":"->"
            },
            {
               "file":"/config/www/nextcloud/occ",
               "line":11,
               "args":[
                  "/config/www/nextcloud/console.php"
               ],
               "function":"require_once"
            }
         ],
         "File":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
         "Line":116,
         "Previous":{
            "Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
            "Message":"SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
            "Code":1364,
            "Trace":[
               {
                  "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
                  "line":103,
                  "function":"new",
                  "class":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
                  "type":"::"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
                  "line":1155,
                  "function":"execute",
                  "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/DB/Connection.php",
                  "line":295,
                  "function":"executeStatement",
                  "class":"Doctrine\\DBAL\\Connection",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
                  "line":354,
                  "function":"executeStatement",
                  "class":"OC\\DB\\Connection",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
                  "line":280,
                  "function":"execute",
                  "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
                  "line":433,
                  "function":"execute",
                  "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
                  "line":63,
                  "function":"OCA\\DAV\\CardDAV\\{closure}",
                  "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                  "type":"->",
                  "args":[
                     "*** sensitive parameters replaced ***"
                  ]
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
                  "line":422,
                  "function":"atomic",
                  "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                  "line":125,
                  "function":"createAddressBook",
                  "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                  "type":"->",
                  "args":[
                     "*** sensitive parameters replaced ***"
                  ]
               },
               {
                  "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
                  "line":63,
                  "function":"OCA\\DAV\\CardDAV\\{closure}",
                  "class":"OCA\\DAV\\CardDAV\\SyncService",
                  "type":"->",
                  "args":[
                     "*** sensitive parameters replaced ***"
                  ]
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                  "line":120,
                  "function":"atomic",
                  "class":"OCA\\DAV\\CardDAV\\SyncService",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                  "line":267,
                  "function":"ensureSystemAddressBookExists",
                  "class":"OCA\\DAV\\CardDAV\\SyncService",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                  "line":276,
                  "function":"getLocalSystemAddressBook",
                  "class":"OCA\\DAV\\CardDAV\\SyncService",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/apps/dav/lib/Migration/Version1027Date20230504122946.php",
                  "line":52,
                  "function":"syncInstance",
                  "class":"OCA\\DAV\\CardDAV\\SyncService",
                  "type":"->",
                  "args":[
                     "*** sensitive parameters replaced ***"
                  ]
               },
               {
                  "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
                  "line":537,
                  "function":"postSchemaChange",
                  "class":"OCA\\DAV\\Migration\\Version1027Date20230504122946",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
                  "line":417,
                  "function":"executeStep",
                  "class":"OC\\DB\\MigrationService",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/legacy/OC_App.php",
                  "line":844,
                  "function":"migrate",
                  "class":"OC\\DB\\MigrationService",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/Updater.php",
                  "line":359,
                  "function":"updateApp",
                  "class":"OC_App",
                  "type":"::",
                  "args":[
                     "*** sensitive parameters replaced ***"
                  ]
               },
               {
                  "file":"/config/www/nextcloud/lib/private/Updater.php",
                  "line":271,
                  "function":"doAppUpgrade",
                  "class":"OC\\Updater",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/Updater.php",
                  "line":139,
                  "function":"doUpgrade",
                  "class":"OC\\Updater",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/core/Command/Upgrade.php",
                  "line":225,
                  "function":"upgrade",
                  "class":"OC\\Updater",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
                  "line":298,
                  "function":"execute",
                  "class":"OC\\Core\\Command\\Upgrade",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                  "line":1040,
                  "function":"run",
                  "class":"Symfony\\Component\\Console\\Command\\Command",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                  "line":301,
                  "function":"doRunCommand",
                  "class":"Symfony\\Component\\Console\\Application",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                  "line":171,
                  "function":"doRun",
                  "class":"Symfony\\Component\\Console\\Application",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/lib/private/Console/Application.php",
                  "line":211,
                  "function":"run",
                  "class":"Symfony\\Component\\Console\\Application",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/console.php",
                  "line":100,
                  "function":"run",
                  "class":"OC\\Console\\Application",
                  "type":"->"
               },
               {
                  "file":"/config/www/nextcloud/occ",
                  "line":11,
                  "args":[
                     "/config/www/nextcloud/console.php"
                  ],
                  "function":"require_once"
               }
            ],
            "File":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
            "Line":30,
            "Previous":{
               "Exception":"PDOException",
               "Message":"SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
               "Code":"HY000",
               "Trace":[
                  {
                     "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
                     "line":101,
                     "function":"execute",
                     "class":"PDOStatement",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
                     "line":1155,
                     "function":"execute",
                     "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/DB/Connection.php",
                     "line":295,
                     "function":"executeStatement",
                     "class":"Doctrine\\DBAL\\Connection",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
                     "line":354,
                     "function":"executeStatement",
                     "class":"OC\\DB\\Connection",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
                     "line":280,
                     "function":"execute",
                     "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
                     "line":433,
                     "function":"execute",
                     "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
                     "line":63,
                     "function":"OCA\\DAV\\CardDAV\\{closure}",
                     "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                     "type":"->",
                     "args":[
                        "*** sensitive parameters replaced ***"
                     ]
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php",
                     "line":422,
                     "function":"atomic",
                     "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                     "line":125,
                     "function":"createAddressBook",
                     "class":"OCA\\DAV\\CardDAV\\CardDavBackend",
                     "type":"->",
                     "args":[
                        "*** sensitive parameters replaced ***"
                     ]
                  },
                  {
                     "file":"/config/www/nextcloud/lib/public/AppFramework/Db/TTransactional.php",
                     "line":63,
                     "function":"OCA\\DAV\\CardDAV\\{closure}",
                     "class":"OCA\\DAV\\CardDAV\\SyncService",
                     "type":"->",
                     "args":[
                        "*** sensitive parameters replaced ***"
                     ]
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                     "line":120,
                     "function":"atomic",
                     "class":"OCA\\DAV\\CardDAV\\SyncService",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                     "line":267,
                     "function":"ensureSystemAddressBookExists",
                     "class":"OCA\\DAV\\CardDAV\\SyncService",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/CardDAV/SyncService.php",
                     "line":276,
                     "function":"getLocalSystemAddressBook",
                     "class":"OCA\\DAV\\CardDAV\\SyncService",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/apps/dav/lib/Migration/Version1027Date20230504122946.php",
                     "line":52,
                     "function":"syncInstance",
                     "class":"OCA\\DAV\\CardDAV\\SyncService",
                     "type":"->",
                     "args":[
                        "*** sensitive parameters replaced ***"
                     ]
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
                     "line":537,
                     "function":"postSchemaChange",
                     "class":"OCA\\DAV\\Migration\\Version1027Date20230504122946",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/DB/MigrationService.php",
                     "line":417,
                     "function":"executeStep",
                     "class":"OC\\DB\\MigrationService",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/legacy/OC_App.php",
                     "line":844,
                     "function":"migrate",
                     "class":"OC\\DB\\MigrationService",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/Updater.php",
                     "line":359,
                     "function":"updateApp",
                     "class":"OC_App",
                     "type":"::",
                     "args":[
                        "*** sensitive parameters replaced ***"
                     ]
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/Updater.php",
                     "line":271,
                     "function":"doAppUpgrade",
                     "class":"OC\\Updater",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/Updater.php",
                     "line":139,
                     "function":"doUpgrade",
                     "class":"OC\\Updater",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/core/Command/Upgrade.php",
                     "line":225,
                     "function":"upgrade",
                     "class":"OC\\Updater",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
                     "line":298,
                     "function":"execute",
                     "class":"OC\\Core\\Command\\Upgrade",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                     "line":1040,
                     "function":"run",
                     "class":"Symfony\\Component\\Console\\Command\\Command",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                     "line":301,
                     "function":"doRunCommand",
                     "class":"Symfony\\Component\\Console\\Application",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/3rdparty/symfony/console/Application.php",
                     "line":171,
                     "function":"doRun",
                     "class":"Symfony\\Component\\Console\\Application",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/lib/private/Console/Application.php",
                     "line":211,
                     "function":"run",
                     "class":"Symfony\\Component\\Console\\Application",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/console.php",
                     "line":100,
                     "function":"run",
                     "class":"OC\\Console\\Application",
                     "type":"->"
                  },
                  {
                     "file":"/config/www/nextcloud/occ",
                     "line":11,
                     "args":[
                        "/config/www/nextcloud/console.php"
                     ],
                     "function":"require_once"
                  }
               ],
               "File":"/config/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
               "Line":101
            }
         }
      },
      "message":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value",
      "exception":{
         
      },
      "CustomMessage":"Database error when running migration 1027Date20230504122946 for app dav\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value"
   }
}

Searching in MariaDB for columns with "id" i got this:

MariaDB [(none)]> select * from information_schema.columns where column_name="id";
+---------------+--------------------+---------------------------------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+--------------------+---------------------+------------+----------------+---------------------------------+----------------+--------------+-----------------------+
| TABLE_CATALOG | TABLE_SCHEMA       | TABLE_NAME                            | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME     | COLUMN_TYPE         | COLUMN_KEY | EXTRA          | PRIVILEGES                      | COLUMN_COMMENT | IS_GENERATED | GENERATION_EXPRESSION |
+---------------+--------------------+---------------------------------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+--------------------+---------------------+------------+----------------+---------------------------------+----------------+--------------+-----------------------+
| def           | information_schema | COLLATIONS                            | ID          |                3 | NULL           | YES         | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(11)          |            |                | select                          |                | NEVER        | NULL                  |
| def           | information_schema | COLLATION_CHARACTER_SET_APPLICABILITY | ID          |                4 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(11)          |            |                | select                          |                | NEVER        | NULL                  |
| def           | information_schema | PROCESSLIST                           | ID          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(4)           |            |                | select                          |                | NEVER        | NULL                  |
| def           | information_schema | INNODB_SYS_FOREIGN_COLS               | ID          |                1 | NULL           | NO          | varchar   |                      193 |                    579 |              NULL |          NULL |               NULL | utf8mb3            | utf8mb3_general_ci | varchar(193)        |            |                | select                          |                | NEVER        | NULL                  |
| def           | information_schema | INNODB_SYS_FOREIGN                    | ID          |                1 | NULL           | NO          | varchar   |                      193 |                    579 |              NULL |          NULL |               NULL | utf8mb3            | utf8mb3_general_ci | varchar(193)        |            |                | select                          |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_accounts_data                      | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_addressbookchanges                 | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_addressbooks                       | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned |            |                | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_authorized_groups                  | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_authtoken                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_bruteforce_attempts                | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_appt_bookings             | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_appt_configs              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_invitations               | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_reminders                 | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_resources                 | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_resources_md              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_rooms                     | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendar_rooms_md                  | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendarchanges                    | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendarobjects                    | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendarobjects_props              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendars                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_calendarsubscriptions              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_cards                              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_cards_properties                   | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_circle                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_member                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_mount                      | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_mountpoint                 | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_remote                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_share_lock                 | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_circles_token                      | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_collres_collections                | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_comments                           | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_dav_cal_proxy                      | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_dav_shares                         | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_direct_edit                        | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_directlink                         | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_file_locks                         | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_file_metadata                      | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        |                | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_files_trash                        | id          |                2 | ''             | NO          | varchar   |                      250 |                   1000 |              NULL |          NULL |               NULL | utf8mb4            | utf8mb4_bin        | varchar(250)        | MUL        |                | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_files_versions                     | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_flow_checks                        | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_flow_operations                    | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_flow_operations_scope              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_jobs                               | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_known_users                        | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_login_flow_v2                      | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_mimetypes                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_mounts                             | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_notifications_pushhash             | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_notifications_settings             | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_oauth2_access_tokens               | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_oauth2_clients                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_open_local_editor                  | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_photos_albums_collabs              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_privacy_admins                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_profile_config                     | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_properties                         | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_ratelimit_entries                  | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_reactions                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_recent_contact                     | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_schedulingobjects                  | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_share                              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_share_external                     | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_storages                           | id          |                2 | NULL           | YES         | varchar   |                       64 |                    256 |              NULL |          NULL |               NULL | utf8mb4            | utf8mb4_bin        | varchar(64)         | UNI        |                | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_storages_credentials               | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_systemtag                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_text_documents                     | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        |                | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_text_sessions                      | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_text_steps                         | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_trusted_servers                    | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_twofactor_backupcodes              | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                19 |             0 |               NULL | NULL               | NULL               | bigint(20)          | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_twofactor_totp_secrets             | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_twofactor_u2f_registrations        | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_user_status                        | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_user_transfer_owner                | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_vcategory                          | id          |                1 | NULL           | NO          | bigint    |                     NULL |                   NULL |                20 |             0 |               NULL | NULL               | NULL               | bigint(20) unsigned | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_webauthn                           | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(11)             | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
| def           | nextcloud          | oc_whats_new                          | id          |                1 | NULL           | NO          | int       |                     NULL |                   NULL |                10 |             0 |               NULL | NULL               | NULL               | int(10) unsigned    | PRI        | auto_increment | select,insert,update,references |                | NEVER        | NULL                  |
+---------------+--------------------+---------------------------------------+-------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+--------------------+---------------------+------------+----------------+---------------------------------+----------------+--------------+-----------------------+

@bpoppinga23
Copy link

bpoppinga23 commented Jun 21, 2023

I also tried to docker-compose up -d my installation (with nextcloud image 27.0.0, mariadb 11.0.2).

I was struggling with a similar issue and got it working again. Problem seems to be the user_ldap app. I disabled it after the first failed upgrade attempt, then did the (successful) upgrade, and re-enabled it. Hope this bit of information helps a bit. Good luck.

docker exec -u www-data <docker_id> php occ app:disable user_ldap
docker exec -u www-data <docker_id> php occ upgrade
docker exec -u www-data <docker_id> php occ app:enable user_ldap
docker exec -u www-data <docker_id> php occ maintenance:mode --off

@Chifilly
Copy link
Author

I also tried to docker-compose up -d my installation (with nextcloud image 27.0.0, mariadb 11.0.2).

I was struggling with a similar issue and got it working again. Problem seems to be the user_ldap app. I disabled it after the first failed upgrade attempt, then did the (successful) upgrade, and re-enabled it. Hope this bit of information helps a bit. Good luck.

docker exec -u www-data <docker_id> php occ app:disable user_ldap docker exec -u www-data <docker_id> php occ upgrade docker exec -u www-data <docker_id> php occ app:enable user_ldap docker exec -u www-data <docker_id> php occ maintenance:mode --off

Thank you! Doing that allowed me to update, however the original issue is still relevant, since having user_ldap enabled still breaks updating, and also the second issue from mod25 I think is still relevant

@ChristophWurst
Copy link
Member

Problem seems to be the user_ldap app. I disabled it after the first failed upgrade attempt, then did the (successful) upgrade, and re-enabled it. Hope this bit of information helps a bit. Good luck.

I think this only helps with the symptoms because during your upgrade most users would not have been found so the problematic migration of their data didn't happen.

@szaimen
Copy link
Contributor

szaimen commented Jun 22, 2023

Maybe it would be good to put the sync address book into a command and warn in the admin overview if it was not run instead of running it in a migration?

@ChristophWurst
Copy link
Member

Then we'll get the but I don't have access to CLI complaint. That's why we run it for all instances.

@ChristophWurst
Copy link
Member

Yet thanks for the idea. @bpoppinga23 please try running occ dav:sync-system-addressbook now. I wonder if it will still fail or only fail during an upgrade.

https://github.com/nextcloud/server/blob/master/apps/dav/lib/Command/SyncSystemAddressBook.php for the existing CLI command.

@MG-5
Copy link

MG-5 commented Jun 22, 2023

In my case, I got Nextcloud working again. (user_ldap is not installed, so the cause of problem is different)
I used occ config:list to list all entries and occ config:app:delete dav <entry> to delete all entries from dav. This is how the upgrade worked in my case. I had to reinstall the Calendar app afterwards.

But entering the command: dav:sync-system-addressbook suggested by @ChristophWurst still goes the error message:

docker exec -it nextcloud occ dav:sync-system-addressbook 
Syncing users ...
    0 [>---------------------------]
In ExceptionConverter.php line 116:
                                                                                                                               
  An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value  
                                                                                                                               

In Exception.php line 30:
                                                                                
  SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value  
                                                                                

In Statement.php line 101:
                                                                                
  SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value  
                                                                                

dav:sync-system-addressbook

@ChristophWurst
Copy link
Member

Thanks for checking.

1364 Field 'id' doesn't have a default value

It happens when the system address book is created.

oc_addressbooks.id should be auto increment and a primary key. INSERTs should work without specifying an id.

From your dump at #38902 (comment) I see it's not a PRI nor auto_increment.

@mod25
Copy link

mod25 commented Jun 22, 2023

@ChristophWurst mine didn't work

ubuntu@docker:~$ docker exec -it -u 33 nextcloud php occ dav:sync-system-addressbook 
Nextcloud or one of the apps require upgrade - only a limited number of commands are available

You may use your browser or the occ upgrade command to do the upgrade
      There are no commands defined in the "dav" namespace.  

ubuntu@docker:~$ docker exec -it -u 33 nextcloud php occ app:disable dav
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
dav can't be disabled.

what shall i do to get upgrade ready?

@ChristophWurst

This comment was marked as resolved.

@mod25

This comment was marked as resolved.

@ChristophWurst
Copy link
Member

I don't know. Please restore your backup and wait for this issue to be resolved.

@ChristophWurst
Copy link
Member

@Chifilly @kimberlyeet thanks a lot. I'm surprised tbh. I expected 50k users instances 🙈

I'd also like to point out, running occ dav:sync-system-addressbook after upgrading (I did the disable user_ldap, upgrade, then re-enable) still fails for me too;

That is good (for me) because then we can continue the debugging. Let's run this command with all debug options:

NC_debug=true NC_loglevel=0 php -f occ dav:sync-system-addressbook

Then inspect your data/nextcloud.log and drop the log messages that were written the time you ran the command. We should see the LDAP commands run in the background and hopefully get more info about the failed search.

@aaronnad
Copy link

Figured I'd chime in on this too,

docker exec -u www-data nextcloud-app php occ user:report
+------------------+---+
| User Report      |   |
+------------------+---+
| Database         | 1 |
| LDAP             | 2 |
|                  |   |
| total users      | 3 |
|                  |   |
| user directories | 1 |
| active users     | 2 |
| disabled users   | 0 |
+------------------+---+
NC_debug=true NC_loglevel=0 php -f occ dav:sync-system-addressbook
Syncing users ...
    1 [->--------------------------]
In LDAP.php line 379:

  LDAP Operations error


dav:sync-system-addressbook
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"serverDI","method":"","url":"--","message":"The requested alias \"SystemConfig\" is deprecated. Please request \"OC\\SystemConfig\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"--","version":"27.0.0.8","data":{"app":"serverDI"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"Activity generated for a changed card in addressbook 2","userAgent":"--","version":"27.0.0.8","data":{"app":"dav"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"getUsers: Options: search  limit 500 offset 0 Filter: (&(&(|(objectclass=user))(|(memberof=cn=PG-Nextcloud-Access,ou=groups,dc=ldap,DC=domain,DC=tld)))(displayName=*)(|(displayName=)(displayName=*)))","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Turned off SSL certificate validation successfully.","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_connect with parameters [\"ldap:\\/\\/192.168.50.11:389\"]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_set_option with parameters [{},17,3]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_set_option with parameters [{},8,0]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_set_option with parameters [{},20485,\"15\"]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_bind with parameters [{},\"cn=binduser,ou=users,dc=ldap,DC=domain,DC=tld\",\"<plaintext-password>\"]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"initializing paged search for filter (&(&(|(objectclass=user))(|(memberof=cn=PG-Nextcloud-Access,ou=groups,dc=ldap,DC=domain,DC=tld)))(displayName=*)(|(displayName=)(displayName=*))), base DC=ldap,DC=domain,DC=tld, attr [\"entryuuid\",\"nsuniqueid\",\"objectguid\",\"guid\",\"ipauniqueid\",\"dn\",\"uid\",\"samaccountname\",\"memberof\",\"nextcloud_quota\",\"displayname\"], pageSize 500, offset 0","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Ready for a paged search","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_search with parameters [{},\"DC=ldap,DC=domain,DC=tld\",\"(&(&(|(objectclass=user))(|(memberof=cn=PG-Nextcloud-Access,ou=groups,dc=ldap,DC=domain,DC=tld)))(displayName=*)(|(displayName=)(displayName=*)))\",[\"entryuuid\",\"nsuniqueid\",\"objectguid\",\"guid\",\"ipauniqueid\",\"dn\",\"uid\",\"samaccountname\",\"memberof\",\"nextcloud_quota\",\"displayname\"],0,0,-1,0,[{\"oid\":\"1.2.840.113556.1.4.319\",\"value\":{\"size\":500,\"cookie\":\"\"},\"iscritical\":false}]]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":3,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"ldap_search(): Search: Operations error at /var/www/html/apps/user_ldap/lib/LDAP.php#306","userAgent":"--","version":"27.0.0.8","data":{"app":"PHP"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"LDAP error Operations error (1) after calling ldap_search","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}
{"reqId":"cbCona2Ol1lhPNBn0WGT","level":0,"time":"2023-06-26T21:13:12+00:00","remoteAddr":"","user":"--","app":"user_ldap","method":"","url":"--","message":"Calling LDAP function ldap_unbind with parameters [{}]","userAgent":"--","version":"27.0.0.8","data":{"app":"user_ldap"}}

Using Authentik as my backend for LDAP

@aaronnad
Copy link

I'll also add that since the upgrade, not only did LDAP initally break, but being able to view the users tab has also broken now

{"reqId":"fjPrOA8voilOBomXEBCs","level":3,"time":"2023-06-26T21:21:41+00:00","remoteAddr":"192.168.1.34","user":"Aaron","app":"PHP","method":"GET","url":"/settings/users","message":"ldap_search(): Search: Operations error at /var/www/html/apps/user_ldap/lib/LDAP.php#306","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"27.0.0.8","data":{"app":"PHP"}}
{"reqId":"fjPrOA8voilOBomXEBCs","level":3,"time":"2023-06-26T21:21:41+00:00","remoteAddr":"192.168.1.34","user":"Aaron","app":"index","method":"GET","url":"/settings/users","message":"LDAP Operations error","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0","version":"27.0.0.8","exception":{"Exception":"Exception","Message":"LDAP Operations error","Code":1,"Trace":[{"file":"/var/www/html/apps/user_ldap/lib/LDAP.php","line":411,"function":"processLDAPError","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",1,"Operations error"]},{"file":"/var/www/html/apps/user_ldap/lib/LDAP.php","line":308,"function":"postFunctionCall","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/LDAP.php","line":214,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"function":"search","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":1065,"function":"call_user_func_array","args":[[["OCA\\User_LDAP\\LDAP"],"*** sensitive parameters replaced ***"],["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","And 3 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":1068,"function":"OCA\\User_LDAP\\{closure}","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":1126,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":1290,"function":"executeSearch","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":1007,"function":"search","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",null,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Access.php","line":935,"function":"searchGroups","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",null,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Group_LDAP.php","line":1090,"function":"fetchListOfGroups","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",null,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/user_ldap/lib/Group_Proxy.php","line":270,"function":"getGroups","class":"OCA\\User_LDAP\\Group_LDAP","type":"->","args":["*** sensitive parameters replaced ***",null,"*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Group/Manager.php","line":246,"function":"getGroups","class":"OCA\\User_LDAP\\Group_Proxy","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Group/MetaData.php","line":188,"function":"search","class":"OC\\Group\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Group/MetaData.php","line":93,"function":"getGroups","class":"OC\\Group\\MetaData","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/settings/lib/Controller/UsersController.php","line":198,"function":"get","class":"OC\\Group\\MetaData","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"usersList","class":"OCA\\Settings\\Controller\\UsersController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\UsersController"],"usersList"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Settings\\Controller\\UsersController"],"usersList"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\UsersController","usersList",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["settings.Users.usersList"]]},{"file":"/var/www/html/lib/base.php","line":1064,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/users"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps/user_ldap/lib/LDAP.php","Line":379,"CustomMessage":"--"}}

Screenshot 2023-06-26 222521

@Chifilly
Copy link
Author

Here are the logs from me;

{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:02+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_connect with parameters [\"ldap:\\/\\/authentik-outpost--ldap:3389\"]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:02+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_set_option with parameters [{},17,3]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:02+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_set_option with parameters [{},8,0]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:02+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_set_option with parameters [{},20485,\"15\"]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:02+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_bind with parameters [{},\"cn=admin,ou=users,dc=nextcloud,dc=allsopp,dc=local\",\"***REDACTED***\"]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "initializing paged search for filter (&(memberOf=CN=Access - Nextcloud,OU=groups,DC=nextcloud,DC=allsopp,DC=local)(displayname=*)(|(displayname=)(displayname=*))), base ou=users,dc=nextcloud,dc=allsopp,dc=local, attr [\"entryuuid\",\"nsuniqueid\",\"objectguid\",\"guid\",\"ipauniqueid\",\"dn\",\"uid\",\"samaccountname\",\"memberof\",\"mail\",\"displayname\",\"jpegphoto\",\"thumbnailphoto\"], pageSize 500, offset 0",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Ready for a paged search",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_search with parameters [{},\"ou=users,dc=nextcloud,dc=allsopp,dc=local\",\"(&(memberOf=CN=Access - Nextcloud,OU=groups,DC=nextcloud,DC=allsopp,DC=local)(displayname=*)(|(displayname=)(displayname=*)))\",[\"entryuuid\",\"nsuniqueid\",\"objectguid\",\"guid\",\"ipauniqueid\",\"dn\",\"uid\",\"samaccountname\",\"memberof\",\"mail\",\"displayname\",\"jpegphoto\",\"thumbnailphoto\"],0,0,-1,0,[{\"oid\":\"1.2.840.113556.1.4.319\",\"value\":{\"size\":500,\"cookie\":\"\"},\"iscritical\":false}]]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 3,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "PHP",
	"method": "",
	"url": "--",
	"message": "ldap_search(): Search: Operations error at /var/www/html/apps/user_ldap/lib/LDAP.php#306",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "PHP"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "LDAP error Operations error (1) after calling ldap_search",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 3,
	"time": "2023-06-27T12:45:03+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "core",
	"method": "",
	"url": "--",
	"message": "Error while running background job (class: OCA\\User_LDAP\\Jobs\\Sync, arguments: )",
	"userAgent": "--",
	"version": "27.0.0.8",
	"exception": {
		"Exception": "Exception",
		"Message": "LDAP Operations error",
		"Code": 1,
		"Trace": [
			{
				"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
				"line": 411,
				"function": "processLDAPError",
				"class": "OCA\\User_LDAP\\LDAP",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					1,
					"Operations error"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
				"line": 308,
				"function": "postFunctionCall",
				"class": "OCA\\User_LDAP\\LDAP",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/LDAP.php",
				"line": 214,
				"function": "invokeLDAPMethod",
				"class": "OCA\\User_LDAP\\LDAP",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"function": "search",
				"class": "OCA\\User_LDAP\\LDAP",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 1065,
				"function": "call_user_func_array",
				"args": [
					[
						[
							"OCA\\User_LDAP\\LDAP"
						],
						"*** sensitive parameters replaced ***"
					],
					[
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***",
						"*** sensitive parameters replaced ***"
					]
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 1068,
				"function": "OCA\\User_LDAP\\{closure}",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 1126,
				"function": "invokeLDAPMethod",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 1290,
				"function": "executeSearch",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 977,
				"function": "search",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Access.php",
				"line": 869,
				"function": "searchUsers",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***"
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Jobs/Sync.php",
				"line": 169,
				"function": "fetchListOfUsers",
				"class": "OCA\\User_LDAP\\Access",
				"type": "->",
				"args": [
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					"*** sensitive parameters replaced ***",
					true
				]
			},
			{
				"file": "/var/www/html/apps/user_ldap/lib/Jobs/Sync.php",
				"line": 143,
				"function": "runCycle",
				"class": "OCA\\User_LDAP\\Jobs\\Sync",
				"type": "->",
				"args": [
					[
						"s01",
						"*** sensitive parameters replaced ***"
					]
				]
			},
			{
				"file": "/var/www/html/lib/public/BackgroundJob/Job.php",
				"line": 86,
				"function": "run",
				"class": "OCA\\User_LDAP\\Jobs\\Sync",
				"type": "->",
				"args": [
					null
				]
			},
			{
				"file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
				"line": 103,
				"function": "start",
				"class": "OCP\\BackgroundJob\\Job",
				"type": "->",
				"args": [
					[
						"OC\\BackgroundJob\\JobList"
					]
				]
			},
			{
				"file": "/var/www/html/lib/public/BackgroundJob/TimedJob.php",
				"line": 93,
				"function": "start",
				"class": "OCP\\BackgroundJob\\TimedJob",
				"type": "->",
				"args": [
					[
						"OC\\BackgroundJob\\JobList"
					]
				]
			},
			{
				"file": "/var/www/html/cron.php",
				"line": 152,
				"function": "execute",
				"class": "OCP\\BackgroundJob\\TimedJob",
				"type": "->",
				"args": [
					[
						"OC\\BackgroundJob\\JobList"
					],
					[
						"OC\\Log"
					]
				]
			}
		],
		"File": "/var/www/html/apps/user_ldap/lib/LDAP.php",
		"Line": 379,
		"message": "Error while running background job (class: OCA\\User_LDAP\\Jobs\\Sync, arguments: )",
		"exception": {},
		"CustomMessage": "Error while running background job (class: OCA\\User_LDAP\\Jobs\\Sync, arguments: )"
	}
}
{
	"reqId": "1IAV3J2CIoke20M2s8OF",
	"level": 0,
	"time": "2023-06-27T12:45:04+00:00",
	"remoteAddr": "",
	"user": "--",
	"app": "user_ldap",
	"method": "",
	"url": "--",
	"message": "Calling LDAP function ldap_unbind with parameters [{}]",
	"userAgent": "--",
	"version": "27.0.0.8",
	"data": {
		"app": "user_ldap"
	}
}

Also, I think the logs for the ldap_bind function should be included in whatever the "remove sensitive information" function you do, because the logs show the LDAP password in plain text in the logs

@ChristophWurst
Copy link
Member

Also, I think the logs for the ldap_bind function should be included in whatever the "remove sensitive information" function you do, because the logs show the LDAP password in plain text in the logs

Could you check if there is a ticket and if not create one? Thanks

@ChristophWurst
Copy link
Member

@aaronnad what LDAP server do you use?

@ChristophWurst
Copy link
Member

ChristophWurst commented Jun 27, 2023

"message": "Calling LDAP function ldap_search with parameters [{},\"ou=...

Asked for quick feedback from an LDAP expert and I was told an operation error is likely not a Nextcloud issue.

Could you try the same search filter on the CLI? You can use ldapsearch. This might be an issue with the server.

(|(displayname=)(displayname=*)) is problematic apparently

@ChristophWurst
Copy link
Member

@Chifilly could you share your (redacted) login and user filters? You can access them via occ ldap:show-config s01.

@Chifilly
Copy link
Author

"message": "Calling LDAP function ldap_search with parameters [{},\"ou=...

Asked for quick feedback from an LDAP expert and I was told an operation error is likely not a Nextcloud issue.

Could you try the same search filter on the CLI? You can use ldapsearch. This might be an issue with the server.

(|(displayname=)(displayname=*)) is problematic apparently

Strange, because it worked fine prior to v27, and when I go into the LDAP/AD integration settings and click Verify settings and count users it works and shows 3 users found as expected, and testing each user on the Login Attributes page returns User found and settings verified.

@Chifilly could you share your (redacted) login and user filters? You can access them via occ ldap:show-config s01.

The only thing I redacted was the plain text password in my logs, but here's my config;

+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                             |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                                                                                               |
| homeFolderNamingRule          |                                                                                                                                                 |
| lastJpegPhotoLookup           | 0                                                                                                                                               |
| ldapAgentName                 | cn=admin,ou=users,dc=nextcloud,dc=allsopp,dc=local                                                                                              |
| ldapAgentPassword             | ***                                                                                                                                             |
| ldapAttributeAddress          |                                                                                                                                                 |
| ldapAttributeBiography        |                                                                                                                                                 |
| ldapAttributeFediverse        |                                                                                                                                                 |
| ldapAttributeHeadline         |                                                                                                                                                 |
| ldapAttributeOrganisation     |                                                                                                                                                 |
| ldapAttributePhone            |                                                                                                                                                 |
| ldapAttributeRole             |                                                                                                                                                 |
| ldapAttributeTwitter          |                                                                                                                                                 |
| ldapAttributeWebsite          |                                                                                                                                                 |
| ldapAttributesForGroupSearch  |                                                                                                                                                 |
| ldapAttributesForUserSearch   |                                                                                                                                                 |
| ldapBackgroundHost            |                                                                                                                                                 |
| ldapBackgroundPort            |                                                                                                                                                 |
| ldapBackupHost                |                                                                                                                                                 |
| ldapBackupPort                |                                                                                                                                                 |
| ldapBase                      | dc=nextcloud,dc=allsopp,dc=local                                                                                                                |
| ldapBaseGroups                | ou=groups,dc=nextcloud,dc=allsopp,dc=local                                                                                                      |
| ldapBaseUsers                 | ou=users,dc=nextcloud,dc=allsopp,dc=local                                                                                                       |
| ldapCacheTTL                  | 600                                                                                                                                             |
| ldapConfigurationActive       | 1                                                                                                                                               |
| ldapConnectionTimeout         | 15                                                                                                                                              |
| ldapDefaultPPolicyDN          |                                                                                                                                                 |
| ldapDynamicGroupMemberURL     |                                                                                                                                                 |
| ldapEmailAttribute            | mail                                                                                                                                            |
| ldapExperiencedAdmin          | 0                                                                                                                                               |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                 |
| ldapExpertUUIDUserAttr        |                                                                                                                                                 |
| ldapExpertUsernameAttr        |                                                                                                                                                 |
| ldapExtStorageHomeAttribute   |                                                                                                                                                 |
| ldapGidNumber                 | gidNumber                                                                                                                                       |
| ldapGroupDisplayName          | cn                                                                                                                                              |
| ldapGroupFilter               | (&(|(objectclass=group))(|(cn=Access - Nextcloud)))                                                                                             |
| ldapGroupFilterGroups         | Access - Nextcloud                                                                                                                              |
| ldapGroupFilterMode           | 0                                                                                                                                               |
| ldapGroupFilterObjectclass    | group                                                                                                                                           |
| ldapGroupMemberAssocAttr      | member                                                                                                                                          |
| ldapHost                      | ldap://authentik-outpost--ldap                                                                                                                  |
| ldapIgnoreNamingRules         |                                                                                                                                                 |
| ldapLoginFilter               | (&(memberOf=CN=Access - Nextcloud,OU=groups,DC=nextcloud,DC=allsopp,DC=local)(|(|(mailPrimaryAddress=%uid)(mail=%uid))(|(cn=%uid)(mail=%uid)))) |
| ldapLoginFilterAttributes     | cn;mail                                                                                                                                         |
| ldapLoginFilterEmail          | 1                                                                                                                                               |
| ldapLoginFilterMode           | 0                                                                                                                                               |
| ldapLoginFilterUsername       | 0                                                                                                                                               |
| ldapMatchingRuleInChainState  | unknown                                                                                                                                         |
| ldapNestedGroups              | 0                                                                                                                                               |
| ldapOverrideMainServer        |                                                                                                                                                 |
| ldapPagingSize                | 500                                                                                                                                             |
| ldapPort                      | 3389                                                                                                                                            |
| ldapQuotaAttribute            |                                                                                                                                                 |
| ldapQuotaDefault              |                                                                                                                                                 |
| ldapTLS                       | 0                                                                                                                                               |
| ldapUserAvatarRule            | default                                                                                                                                         |
| ldapUserDisplayName           | displayname                                                                                                                                     |
| ldapUserDisplayName2          |                                                                                                                                                 |
| ldapUserFilter                | (memberOf=CN=Access - Nextcloud,OU=groups,DC=nextcloud,DC=allsopp,DC=local)                                                                     |
| ldapUserFilterGroups          |                                                                                                                                                 |
| ldapUserFilterMode            | 1                                                                                                                                               |
| ldapUserFilterObjectclass     |                                                                                                                                                 |
| ldapUuidGroupAttribute        | auto                                                                                                                                            |
| ldapUuidUserAttribute         | auto                                                                                                                                            |
| turnOffCertCheck              | 0                                                                                                                                               |
| turnOnPasswordChange          | 0                                                                                                                                               |
| useMemberOfToDetectMembership | 1                                                                                                                                               |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+

@szaimen
Copy link
Contributor

szaimen commented Jun 27, 2023

Hi @Chifilly are you using some kind of appliance? How did you install Nextcloud?

@Chifilly
Copy link
Author

Hi @Chifilly are you using some kind of appliance? How did you install Nextcloud?

It's installed via Docker on an old computer that I turned into a server that's running Ubuntu 20.04.6

@szaimen
Copy link
Contributor

szaimen commented Jun 27, 2023

And which docker inage are you using?

@Chifilly
Copy link
Author

And which docker inage are you using?

The docker official image nextcloud

@come-nc
Copy link
Contributor

come-nc commented Jun 29, 2023

I suspect the bug comes from #32499
Can you try this patch:

diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 3fbb003ed51..0b115c42764 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -1545,12 +1545,16 @@ class Access extends LDAPUtility {
                                return '';
                        }
                        // wildcards don't work with some attributes
-                       $filter[] = $fallbackAttribute . '=' . $originalSearch;
+                       if ($originalSearch !== '') {
+                               $filter[] = $fallbackAttribute . '=' . $originalSearch;
+                       }
                        $filter[] = $fallbackAttribute . '=' . $search;
                } else {
                        foreach ($searchAttributes as $attribute) {
                                // wildcards don't work with some attributes
-                               $filter[] = $attribute . '=' . $originalSearch;
+                               if ($originalSearch !== '') {
+                                       $filter[] = $attribute . '=' . $originalSearch;
+                               }
                                $filter[] = $attribute . '=' . $search;
                        }
                }

@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jun 29, 2023
tcitworld added a commit that referenced this issue Jul 27, 2023
Using nested transactions without savepoints is actually deprecated by Doctrine:
https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting

Without savepoints, a nested transaction can be rollbacked but not
handled properly in the "real" transaction, leading to the following
error:
Transaction commit failed because the transaction has been marked for rollback only.

Ref
#36528 (comment)
(and possibly) #38902 (comment)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Aug 8, 2023
tcitworld added a commit that referenced this issue Oct 6, 2023
Using nested transactions without savepoints is actually deprecated by Doctrine:
https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting

Without savepoints, a nested transaction can be rollbacked but not
handled properly in the "real" transaction, leading to the following
error:
Transaction commit failed because the transaction has been marked for rollback only.

Ref
#36528 (comment)
(and possibly) #38902 (comment)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
tcitworld added a commit that referenced this issue Feb 1, 2024
Using nested transactions without savepoints is actually deprecated by Doctrine:
https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting

Without savepoints, a nested transaction can be rollbacked but not
handled properly in the "real" transaction, leading to the following
error:
Transaction commit failed because the transaction has been marked for rollback only.

Ref
#36528 (comment)
(and possibly) #38902 (comment)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
AndyScherzinger pushed a commit that referenced this issue Feb 27, 2024
Using nested transactions without savepoints is actually deprecated by Doctrine:
https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html#transaction-nesting

Without savepoints, a nested transaction can be rollbacked but not
handled properly in the "real" transaction, leading to the following
error:
Transaction commit failed because the transaction has been marked for rollback only.

Ref
#36528 (comment)
(and possibly) #38902 (comment)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.