Hello,
I had a NextcloudPi install running with external access for several months. A few days ago, I wanted to access my Nextcloud from a new phone and the browser would not load the webpage, mentioning âUnsecure connectionâ. It was working well on other devices.
I tried to renew the certificate without any success.
I may have broken something as now httpd and Apache are not working anymore. I do not have web access anymore to Nextcloud nor to NextcloudPi.
It seems httpd does not start because there is no certificate, but I cannot have a new certificate from Letsencrypt. I tried to restore the ncp config that I saved a few months ago without any positive change on my issues.
Could someone help me solve this please?
Problems:
HTTPD service down
HTTPd logs
[Thu Aug 19 19:22:40.855945 2021] [ssl:emerg] [pid 2316:tid 3069297168] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
nc-error.log
[Thu Aug 19 19:22:40.855718 2021] [ssl:emerg] [pid 2316:tid 3069297168] AH02572: Failed to configure at least one certificate and key for zacans.mooo.com:443
[Thu Aug 19 19:22:40.855915 2021] [ssl:emerg] [pid 2316:tid 3069297168] SSL Library Error: error:140A80B1:SSL routines:SSL_CTX_check_private_key:no certificate assigned
Trying to start httpd
sudo service httpd start
Failed to start httpd.service: Unit httpd.service not found.
Trying to run letsencrypt from ncp-config to acquire a new certificate
Running letsencrypt
find: â/etc/letsencrypt/live/â: No such file or directory
letsencrypt certificates disabled. Using self-signed certificates instead.
Trying to start Apache
sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See âsystemctl status apache2.serviceâ and âjournalctl -xeâ for details.
systemctl status apache2.service
systemctl status apache2.service
â apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-08-19 20:45:20 CEST; 40s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 4906 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Aug 19 20:45:20 nextcloudpi systemd[1]: Starting The Apache HTTP ServerâŚ
Aug 19 20:45:20 nextcloudpi apachectl[4906]: AH00526: Syntax error on line 10 of /etc/apache2/sites-enabled/nextcloud.conf:
Aug 19 20:45:20 nextcloudpi apachectl[4906]: SSLCertificateFile: file â/etc/letsencrypt/live/zacans.mooo.com/fullchain.pemâ does not exist or is empty
Aug 19 20:45:20 nextcloudpi apachectl[4906]: Action âstartâ failed.
Aug 19 20:45:20 nextcloudpi apachectl[4906]: The Apache error log may have more information.
Aug 19 20:45:20 nextcloudpi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 19 20:45:20 nextcloudpi systemd[1]: apache2.service: Failed with result âexit-codeâ.
Aug 19 20:45:20 nextcloudpi systemd[1]: Failed to start The Apache HTTP Server.
journalctl -xe
Aug 19 20:45:20 nextcloudpi apachectl[4906]: AH00526: Syntax error on line 10 of /etc/apache2/sites-enabled/nextcloud.conf:
Aug 19 20:45:20 nextcloudpi apachectl[4906]: SSLCertificateFile: file â/etc/letsencrypt/live/zacans.mooo.com/fullchain.pemâ does not exist or is empty
Aug 19 20:45:20 nextcloudpi apachectl[4906]: Action âstartâ failed.
Aug 19 20:45:20 nextcloudpi apachectl[4906]: The Apache error log may have more information.
Aug 19 20:45:20 nextcloudpi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
â Subject: Unit process exited
ncp-report
NextCloudPi diagnostics
NextCloudPi version v1.38.5
NextCloudPi image NextCloudPi_03-28-20
distribution Raspbian GNU/Linux 10 \n \l
automount yes
USB devices sda
datadir /media/DonnĂŠes/ncdata
data in SD no
data filesystem btrfs
data disk usage 973G/7.3T
rootfs usage 4.1G/29G
swapfile /var/swap
dbdir /var/lib/mysql
Nextcloud check ok
Nextcloud version 20.0.12.1
HTTPD service down
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 closed
port check 443 closed
IP ***REMOVED SENSITIVE VALUE***
gateway ***REMOVED SENSITIVE VALUE***
interface eth0
certificates ***REMOVED SENSITIVE VALUE***
NAT loopback no
uptime 2:06
Nextcloud configuration
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"0": "localhost",
"5": "nextcloudpi.local",
"7": "nextcloudpi",
"8": "nextcloudpi.lan",
"11": "2a01:e0a:a6c:9460::f452:8b91",
"1": "192.168.1.3",
"3": "zacans.mooo.com",
"2": "zacans.mooo.com",
"12": "zacans.mooo.com"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "20.0.12.1",
"overwrite.cli.url": "https:\/\/zacans.mooo.com\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"tempdirectory": "\/media\/Donn\u00e9es\/ncdata\/tmp",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60",
"overwriteprotocol": "https",
"maintenance": false,
"logfile": "\/media\/Donn\u00e9es\/ncdata\/nextcloud.log",
"loglevel": "2",
"log_type": "file",
"htaccess.RewriteBase": "\/",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "zacans.mooo.com",
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"enable_previews": true,
"enabledPreviewProviders": {
"0": "OC\\Preview\\TXT",
"1": "OC\\Preview\\MarkDown",
"2": "OC\\Preview\\OpenDocument",
"3": "OC\\Preview\\PDF",
"4": "OC\\Preview\\MSOffice2003",
"5": "OC\\Preview\\MSOfficeDoc",
"6": "OC\\Preview\\PDF",
"7": "OC\\Preview\\Image",
"8": "OC\\Preview\\Photoshop",
"9": "OC\\Preview\\TIFF",
"10": "OC\\Preview\\SVG",
"11": "OC\\Preview\\Font",
"12": "OC\\Preview\\MP3",
"13": "OC\\Preview\\Movie",
"15": "OC\\Preview\\MP4",
"16": "OC\\Preview\\AVI"
},
"theme": ""
}
}
HTTPd logs
[Thu Aug 19 14:06:06.499960 2021] [ssl:emerg] [pid 15230:tid 3069456912] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
[Thu Aug 19 18:14:22.452917 2021] [ssl:emerg] [pid 20344:tid 3069305360] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
[Thu Aug 19 18:59:44.496571 2021] [ssl:emerg] [pid 1674:tid 3070054928] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
[Thu Aug 19 19:13:02.485256 2021] [ssl:emerg] [pid 2009:tid 3069878800] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
[Thu Aug 19 19:22:40.468843 2021] [ssl:emerg] [pid 2309:tid 3069633040] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
[Thu Aug 19 19:22:40.855945 2021] [ssl:emerg] [pid 2316:tid 3069297168] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/nc-error.log for more information
AH00016: Configuration Failed
Database logs
2021-08-19 18:51:12 0 [Note] InnoDB: Uses event mutexes
2021-08-19 18:51:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-19 18:51:12 0 [Note] InnoDB: Number of pools: 1
2021-08-19 18:51:12 0 [Note] InnoDB: Using generic crc32 instructions
2021-08-19 18:51:12 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 1, chunk size = 128M
2021-08-19 18:51:12 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-19 18:51:12 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-08-19 18:51:13 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-08-19 18:51:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-19 18:51:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-19 18:51:13 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-08-19 18:51:13 0 [Note] InnoDB: 10.3.29 started; log sequence number 3786144722; transaction id 15274389
2021-08-19 18:51:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-08-19 18:51:13 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-19 18:51:13 0 [Note] Server socket created on IP: '127.0.0.1'.
2021-08-19 18:51:13 0 [Note] Reading of all Master_info entries succeeded
2021-08-19 18:51:13 0 [Note] Added new Master_info '' to hash table
2021-08-19 18:51:13 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.29-MariaDB-0+deb10u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Raspbian 10
2021-08-19 18:51:16 0 [Note] InnoDB: Buffer pool(s) load completed at 210819 18:51:16