Nextcloud version (eg, 20.0.5): 26.0.1 (issue began at 26.0)
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04.6 LTS
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.0
PHP version (eg, 7.4): 8.0
The issue you are facing:
I got the security warning about HSTS from admin page after upgrading to version 26.0. I’ve checked my nginx config and it seems that the Strict-Transport-Security HTTP header is enabled server-wide.
cat /etc/nginx/nginx.conf
...
http {
...
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
...
cat /etc/nginx/conf.d/nextcloud.conf
...
server {
listen 443 ssl http2;
server_name mydomain.org;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
...
root /var/www/;
...
location ^~ /nextcloud {
....
}
}
...
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Check that nginx config adds HSTS header server-wide
- Reload nginx config
- Check that HSTS Preload List site aknowledges that the site is eligible for adding to the list.
- Nextcloud Admin page still shows the warning about adding HSTS header.
The output of your Nextcloud log in Admin > Logging:
skipped
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'redacted',
'passwordsalt' => '+redacted',
'secret' => 'redacted',
'trusted_domains' =>
array (
0 => 'IP',
1 => 'mydomain.org',
),
'datadirectory' => '/redacted',
'overwrite.cli.url' => 'http://IP/nextcloud',
'dbtype' => 'mysql',
'version' => '26.0.1.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'redacted',
'dbpassword' => 'redacted/u+',
'logtimezone' => 'UTC',
'installed' => true,
'maintenance' => false,
'loglevel' => 2,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'dbindex' => 0,
'timeout' => 1.5,
),
'theme' => '',
'updater.release.channel' => 'stable',
'app_install_overwrite' =>
array (
0 => 'twofactor_totp',
1 => 'files_opds',
2 => 'files_reader',
3 => 'drawio',
4 => 'twofactor_gateway',
),
'mysql.utf8mb4' => true,
'default_phone_region' => 'redacted',
'mail_smtpmode' => 'smtp',
'mail_smtpauth' => 1,
'mail_sendmailmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_smtphost' => 'smtp.gmail.com',
'mail_from_address' => 'redacted',
'mail_domain' => 'gmail.com',
'mail_smtpname' => 'redacted@gmail.com',
'mail_smtppassword' => 'redacted',
'mail_smtpauthtype' => 'LOGIN',
);
The output of your Apache/nginx/system log in /var/log/____
:
skipped
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
`
Error core GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 30000 milliseconds with 4898816 out of 8212347 bytes received (see libcurl - Error Codes) for https://download.geonames.org/export/dump/cities1000.zip
2023-04-07T09:55:43+0500
Error no app in context Exception: App “Mind Map” cannot be installed because it is not compatible with this version of the server.
2023-04-07T09:54:18+0500
Error remote OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction
2023-04-05T12:40:55+0500
Error PHP OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php#71
2023-04-05T12:40:32+0500
Error PHP OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php#71
2023-04-05T12:40:31+0500
Error webdav Sabre\DAV\Exception\ServiceUnavailable: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction
2023-04-05T12:40:03+0500