Updater gibt Zertifikatsfehler aus

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): 22.1.1.2
Operating system and version (eg, Ubuntu 20.04): Qnap 5.0.0.1828
Apache or nginx version (eg, Apache 2.4.25): 2.4.46
PHP version (eg, 7.4): 7.3.7

The issue you are facing:
Wenn ich im Web-Frontend prĂŒfe, ob eine neue Version angeboten wird, wird mir die 22.2.0. angeboten.
Wenn ich dann auf der Konsole ĂŒber SSH den Updater ausfĂŒhre, erhalte ich die Meldung “Could not do request to updater server: SSL certificate problem: certificate has expired.”

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

Steps to replicate it:

  1. Log in auf der Qnap mit SSH
  2. ln -s /mnt/ext/opt/apache/bin/php /bin/php
  3. sudo -u httpdusr php -d memory_limit=2G /share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/updater/updater.phar
  4. Meldung “Could not do request to updater server: SSL certificate problem: certificate has expired.” wird angezeigt

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

<?php
$CONFIG = array (
  'instanceid' => 'ockhacm3wrjl',
  'passwordsalt' => 'F2NqsBnFZXScDBLldY6TDtdfOFPX2y',
  'secret' => 'q5LHdz6miIEac0Om9kqiySu8Mb8X5IfuI3mcrAKDdYCjK/4s',
  'trusted_domains' => 
  array (
    0 => 'X.X.X.X',
    1 => 'XXXXXXXX-YYYYYYY.dyndns.org',
  ),
  'datadirectory' => '/share/CACHEDEV1_DATA/.qpkg/NextCloud/nextcloud/data',
  'overwrite.cli.url' => 'http://192.168.1.241:90/nextcloud',
  'dbtype' => 'mysql',
  'version' => '22.1.1.2',
  'dbname' => 'Nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'logtimezone' => 'Europe/Berlin',
  'default_language' => 'de',
  'default_phone_region' => 'DE',
  'default_locale' => 'de_DE',
  'installed' => true,
  'maintenance' => false,
  'updater.release.channel' => 'stable',
  'theme' => '',
  'loglevel' => 2,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'app_install_overwrite' => 
  array (
    0 => 'calendar',
    1 => 'weather',
  ),
  'mail_sendmailmode' => 'smtp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => 'Nextcloud',
  'mail_domain' => 't-online.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'securesmtp.t-online.de',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'mail_smtpname',
  'mail_smtppassword' => 'mail_smtppassword',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'mysql.utf8mb4' => true,
  'updater.secret' => '$2y$10$99kvam6bscBAhHT8oEoLoOFE5Fnpi1CDBPVAnKDUO6DwfyMsQKKPu',
);

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

PASTE HERE

Ich bin ziemlicher Neuling. Ich gebe gerne jede benötigte Info weiter - wenn mir jemand sagt, wo oder wie ich diese finde.

Lese hier. Du musst bei dir das abgelaufende CA-Zertifikat ISRG_Root_X1 entfernen.

Wenn ich das ISRG_Root_X1.pem aus /etc/SSL/certs/ entferne, bleibt der Fehler mit der gleichen Meldung bestehen.
Wenn ich, wie im Link beschrieben, das DST_Root_CA_X3.pem entferne, erhalte ich die Meldung:

[Exception]
Could not do request to updater server: SSL certificate problem: unable to get local issuer certificate

Oder muß ich erst neu starten? Falls ja, das ganze NAS oder nur den Webserver?

Das Zertifikat darfst du nicht entfernen, da es das offizielle Zertifikat ist.
Das kannst du dir auch im Browser ĂŒber https://apps.nextcloud.com anschauen.

Das ist nun ein anderer Fehler. Ich hoffe DST_Root_CA_X3.pem ist noch da. Du kannst vielleicht mal den Zugriff per curl oder wget manuell versuchen. Bekommst du Àhnliche Fehler?

Ich denke, ich soll es entfernen?
Ja, ich habe beide Zertifikate einfach umbenannt - somit kann ich sie wieder aktivieren.

Wie muß ich diese Befehle anwenden? Kannst Du mir einen kompletten Befehl nennen?

Nein. Nur DST_Root_CA_X3 entfernen. ISRG_Root_X1 behalten.

Leider ist das nicht ganz mit der PHP-curl vergleichbar.

Aber eigentlich so:

curl https://apps.nextcloud.com
wget https://apps.nextcloud.com

Ich hoffe es werden dabei die gleichen CA-Zertifikate aus /etc/ssl/certs verwendet.

Wenn ich “DST_Root_CA_X3.pem” in bak umbenenne, erhalte ich diese Meldungen:

curl https://apps.nextcloud.com
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

und

wget https://apps.nextcloud.com
–2021-10-27 11:01:54-- https://apps.nextcloud.com/
Resolving apps.nextcloud.com
 176.9.217.53, 2a01:4f8:130:32f1::53
Connecting to apps.nextcloud.com|176.9.217.53|:443
 connected.
ERROR: cannot verify apps.nextcloud.com’s certificate, issued by ‘CN=R3,O=Let’s Encrypt,C=US’:
Unable to locally verify the issuer’s authority.
To connect to apps.nextcloud.com insecurely, use `–no-check-certificate’.

Mit Original kommt das:

curl https://apps.nextcloud.com
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

bzw.

wget https://apps.nextcloud.com
–2021-10-27 11:06:16-- https://apps.nextcloud.com/
Resolving apps.nextcloud.com
 176.9.217.53, 2a01:4f8:130:32f1::53
Connecting to apps.nextcloud.com|176.9.217.53|:443
 connected.
ERROR: cannot verify apps.nextcloud.com’s certificate, issued by ‘CN=R3,O=Let’s Encrypt,C=US’:
Issued certificate has expired.
To connect to apps.nextcloud.com insecurely, use `–no-check-certificate’.

Ich denke du musst eine Lösung fĂŒr QNAP suchen. Hier mal ein Beispiel:
Let's Encrypt zertifikate nicht mehr zu beziehen - Sicherheit - NAS Hilfe und Support Forum

Kontrolliere mal Uhrzeit und Datum auf derner QNAP

Die QNAP bezieht die Zeitinformation aus dem gleichen Zeitserver wie mein komplettes Heimnetzwerk.
Datum und Zeit sind aktuell - habe es eben nochmal gecheckt.

In deinem Fall ist die Uhrzeit deines Servers ja auch nicht das Problem. Das Zertifikat DST_Root_CA_X3 ist abgelaufen. Du musst dir dafĂŒr eine Lösung fĂŒr QNAP raussuchen. Such entsprechend im Internet. Oben weiter hatte ich einen Beispiellink gepostet.

Hallo, fĂŒr mich hat der Rat eines befreundeten Users im Qnap-Forum geholfen.
Das ist/war die Lösung:

cd /share/

curl --silent --location --remote-name --insecure https://curl.haxx.se/ca/cacert.pem

mkdir certs

cat cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {if(length($0) > 0) print > "certs/cert" n ".pem"}'

cd certs

for filename in cert*pem;do mv $filename `openssl x509 -hash -noout -in $filename`.0; done;

cp *.0 /etc/ssl/certs/