Update SSL Certificate

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): 21
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2
PHP version (eg, 7.4): 7.4

The issue you are facing:
When I point my web browser to my Nextcloud server I get:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I need to update the SSL Certificate since it has expired. I have a wildcard certificate I generated with Let’s Encrypt. Can I use it in my nextcloud instance? Where do I save the files and how should I name them?

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

Steps to replicate it:

  1. point web browser to my nextcloud webserver

The output of your Nextcloud log in Admin > Logging:

Can't access

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

PASTE HERE

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

PASTE HERE

means apache is working but your database, fpm-php and/or redis aren’t working anymore. it’s not related with the certificate issue. or?

Thanks. Where can I find the server logs?

which howto did you use to install your nextcloud?

normally you’ll find all system logs in /var/log.

or you enter sudo systemctl status mariadb redis php7.4-fpm apache2 but the names of the services may vary.

got the idea?

i guess you didn’t use letsencrypt.

in /etc/apache2/sites-available you should the config file for nextcloud virtualhost. (depends on your installation.) there two variables:

  • SSLCertificateFile and
  • SSLCertificateKeyFile

pointing to your cert file. just put the new cert files in the same place.

if you use snap, everything is different. and we have to start again.

I ran sudo systemctl status and found out that my MariaDB is down. Any idea how to fix it? This is what I got:

 mariadb.service - MariaDB 10.3.29 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2021-07-11 12:46:43 EDT; 27min ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 778 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 799 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 801 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_reco>
    Process: 860 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILUR>
   Main PID: 860 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"

sudo systemctl start mariadb ?

This is what I get if I do that:

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

any reason given why mariadb is down?
did you check df -h if you run out of disc space?

Looks like the problem is:

Process: 4271 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)

I have no idea how to fix this. Do you? BTW Thanks for your help.

I checked df -h and I have about 27GB available

that’s the result. not the reason.
you should look at /var/log or probably /var/log/mysql or /var/log/mariadb. (you should it. :wink: )

/var/log/mysql shows:

2021-07-11 13:29:33 0 [Note] InnoDB: Using Linux native AIO
2021-07-11 13:29:33 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-07-11 13:29:33 0 [Note] InnoDB: Uses event mutexes
2021-07-11 13:29:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-07-11 13:29:33 0 [Note] InnoDB: Number of pools: 1
2021-07-11 13:29:33 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-07-11 13:29:33 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-07-11 13:29:33 0 [Note] InnoDB: Completed initialization of buffer pool
2021-07-11 13:29:33 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-07-11 13:29:33 0 [ERROR] InnoDB: Missing MLOG_CHECKPOINT at 7950204302 between the checkpoint 7950204302 and the end 7950203904.
2021-07-11 13:29:33 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-07-11 13:29:33 0 [Note] InnoDB: Starting shutdown...
2021-07-11 13:29:34 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-07-11 13:29:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-07-11 13:29:34 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-07-11 13:29:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-07-11 13:29:34 0 [ERROR] Aborting

Any clue?

Thanks

I found this http://mytechmembank.blogspot.com/2017/10/recovering-crashed-mysql-instance.html

It gives steps to do a dump of the data, then remove MYSQL and reinstall

Worth a shot?

seems to be a well know problem, because google knows a lot links. this is the first one.