Help - unauthenticated after upgrade to 28.0.2.5

Just ran into a bizarre issue. Running nextcloud with dockercompose for YEARS no issues. Upgraded the images last night and now I am getting :

2024-02-21 17:11:25 11 [Warning] Aborted connection 11 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.12' (This connection closed normally without authentication)

I can connect using the username and password from the mariadb container.

DID NEXTCLOUD change the docker variables?

There is NOTHING in the nextcloud docker logs.

Here is my compose.

  nextcloud:
    image: nextcloud
    container_name: "nextcloud"
    restart: unless-stopped
    links:
      - nextcloud_db
    security_opt:
      - no-new-privileges:true
    environment:
      - MYSQL_PASSWORD=XXXXXXXX
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=nextcloud_db
      - NEXTCLOUD_ADMIN_USER=admin
      - NEXTCLOUD_ADMIN_PASSWORD=XXXXXXXX
      - NEXTCLOUD_HOSTNAME=next.ieacro.com
      - NEXTCLOUD_TRUSTED_DOMAINS=next.ieacro.com
    volumes:
      - "/home/nextcloud/html/:/var/www/html/"

  nextcloud_db:
    image: mariadb
    container_name: "nextcloud_db"
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    environment:
      - MARIADB_ROOT_PASSWORD=XXXXXXXX
      - MARIADB_PASSWORD=XXXXXXXX
      - MARIADB_DATABASE=nextcloud
      - MARIADB_USER=nextcloud
      - MARIADB_AUTO_UPGRADE=true
    volumes:
      - "/home/nextcloud/db/:/var/lib/mysql/"
1 Like

I was able to isolate it to the nextcloud pod not using the environment variables.

Found this error message in the next logs :

{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers","Code":2054,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"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/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/index.php","line":37,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] Server sent charset (0) unknown to the client. Please, report to the developers"}

Found the solution.
Add --character-set-server=utf8 to the mariadb command line.

1 Like