Losts of "Could not boot workflowengine: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity' in 'field list'"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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

Nextcloud version (eg, 20.0.5): Nextcloud 22.2.0
Operating system and version (eg, Ubuntu 20.04): FreeBSD nextcloud 12.2-RELEASE-p10
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): PHP 7.4.13

The issue you are facing:
having lots of “unknown column ‘entity’” errors in log.
just noticed it after upgrade to v22, but i find it in logs with previous version v21, too.
cant tell when it exactly started.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

[no app in context] Fatal: Could not boot workflowengine: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity' in 'field list'

GET /apps/logreader/poll?lastReqId=V4E9GhIC7isRrSsC2QK3
from 192.168.3.10 by ak at 2021-11-01T19:34:20+00:00

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

root@nextcloud:/var/log/nextcloud # cat /usr/local/www/nextcloud/config/config.php 
<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => true,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'passwordsalt' => 'xxxXXXxxx',
  'secret' => 'xxxXXXxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.1.16',
    2 => 'nextcloud',
    3 => 'nextcloud.lan',
    4 => 'xxxXXXxxx.net',
  ),
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb.lan',
  'dbport' => '3306',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxXXXxxx',
  'dbpassword' => 'xxxXXXxxx',
  'installed' => true,
  'instanceid' => 'xxxXXXxxx',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'xxxXXXxxx',
  'default_phone_region' => 'de',
);

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

root@nextcloud:/var/log/nextcloud # tail -n 100 /var/log/nginx/error.log
2021/10/12 11:03:43 [warn] 42059#101240: *81513 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/1/69/0000008691 while reading upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /remote.php/dav/files/ak/share_nas_ssd/2021_Kroatien/21-09-12%2010-38-15%201600.mov HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:04:59 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37577&c=fc148a1311717fb40f0a40583afb0083&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:05:00 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37658&c=70ee3f6fedda04fc4aed77503a642627&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:05:00 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37635&c=81f9b12b08aa5af91a3fd2a14b449eea&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:05:00 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37547&c=f825363e5db225b9e812d438dc3df8d2&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:05:00 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37573&c=0c7791b9fbf0f60fdac2adcb30a2c9dd&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:05:00 [error] 42059#101240: *81513 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /core/preview?fileId=37593&c=cc75cf29c399ee33fa0703e220815cda&x=250&y=250&forceIcon=0&a=0 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 11:13:42 [error] 42059#101240: *81513 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /usr/local/www/nextcloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadCo" while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/12 12:01:06 [error] 42059#101240: *81513 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/www/nextcloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/" while reading response header from upstream, client: 192.168.1.1, server: xxxXXXxxx.net, request: "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/10/13 08:05:33 [error] 42059#101240: accept4() failed (53: Software caused connection abort)
2021/10/14 08:03:35 [error] 42058#103035: accept4() failed (53: Software caused connection abort)
2021/10/14 18:02:16 [error] 42058#103035: accept4() failed (53: Software caused connection abort)
2021/10/14 18:02:17 [error] 42059#101240: accept4() failed (53: Software caused connection abort)
2021/10/17 02:28:48 [error] 42059#101240: accept4() failed (53: Software caused connection abort)
2021/10/17 02:28:49 [error] 42058#103035: accept4() failed (53: Software caused connection abort)
2021/10/17 08:01:21 [error] 42059#101240: accept4() failed (53: Software caused connection abort)
2021/10/17 10:23:57 [error] 3788#102671: accept4() failed (53: Software caused connection abort)
2021/10/18 08:01:11 [error] 3788#102671: accept4() failed (53: Software caused connection abort)
2021/10/19 11:04:24 [error] 3788#102671: accept4() failed (53: Software caused connection abort)
2021/10/19 11:04:26 [error] 3788#102671: accept4() failed (53: Software caused connection abort)
2021/10/27 06:49:09 [error] 3738#102674: accept4() failed (53: Software caused connection abort)
2021/10/27 08:01:17 [error] 3738#102674: accept4() failed (53: Software caused connection abort)
2021/10/28 01:26:44 [error] 3737#102233: accept4() failed (53: Software caused connection abort)
2021/10/30 03:38:40 [error] 3738#102674: accept4() failed (53: Software caused connection abort)
2021/10/30 03:40:08 [error] 3738#102674: accept4() failed (53: Software caused connection abort)
2021/10/30 08:01:26 [error] 3737#102233: accept4() failed (53: Software caused connection abort)
2021/10/31 15:37:54 [error] 3738#102674: accept4() failed (53: Software caused connection abort)
2021/10/31 18:38:48 [warn] 3738#102674: *5931 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: 185.209.196.163, server: xxxXXXxxx.net, request: "GET /index.php/apps/files/ajax/download.php?dir=%2Fshare_nas_ssd&files=2021_Kroatien&downloadStartSecret=n8zyk8h2snq HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "xxxXXXxxx.net"
2021/11/01 15:27:13 [warn] 80202#101267: *777 an upstream response is buffered to a temporary file /var/tmp/nginx/fastcgi_temp/1/00/0000000001 while reading upstream, client: 192.168.3.10, server: xxxXXXxxx.net, request: "GET /settings/apps/list HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 16:57:24 [error] 80203#101400: *1902 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/" while reading response header from upstream, client: 192.168.3.10, server: xxxXXXxxx.net, request: "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 19:04:27 [error] 80202#101267: *1993 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_ncadmin'@'192.168.1.16' (using password: YES) in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextclou" while reading response header from upstream, client: 192.168.2.12, server: xxxXXXxxx.net, request: "PROPFIND /remote.php/caldav/calendars/ak/contact_birthdays/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 19:04:27 [error] 80203#101400: *1992 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_ncadmin'@'192.168.1.16' (using password: YES) in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextclou" while reading response header from upstream, client: 192.168.2.12, server: xxxXXXxxx.net, request: "PROPFIND /remote.php/caldav/calendars/ak/nextloud/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 19:04:27 [error] 80203#101400: *1996 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_ncadmin'@'192.168.1.16' (using password: YES) in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextclou" while reading response header from upstream, client: 192.168.2.12, server: xxxXXXxxx.net, request: "REPORT /remote.php/caldav/calendars/ak/contact_birthdays/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 19:04:27 [error] 80203#101400: *1997 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_ncadmin'@'192.168.1.16' (using password: YES) in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextclou" while reading response header from upstream, client: 192.168.2.12, server: xxxXXXxxx.net, request: "REPORT /remote.php/caldav/calendars/ak/nextloud/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 19:04:28 [error] 80202#101267: *2000 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_ncadmin'@'192.168.1.16' (using password: YES) in /usr/local/www/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/www/nextcloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /usr/local/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/www/nextcloud/lib/private/AppConfig.php(344): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/www/nextclou" while reading response header from upstream, client: 192.168.2.12, server: xxxXXXxxx.net, request: "GET /remote.php/webdav/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.lan"
2021/11/01 20:23:06 [error] 80203#101400: accept4() failed (53: Software caused connection abort)

pls note, the access denied error from today 2021/11/01 where caused by me. i migrated from mysql to mariadb and had faulty grants. migration to mariadb 10.4 hasnt fix it either.

pls help since i am completly lost :slight_smile:

this seems to work so far!
root@localhost [nextcloud]> alter table oc_flow_operations add column entity varchar(256) COLLATE utf8mb4_bin NOT NULL DEFAULT ‘’;
Query OK, 0 rows affected (0.013 sec)
Records: 0 Duplicates: 0 Warnings: 0