Hello Guys,
Since it's my 1st post on the board, I'd like to thank all devs for their hard work, openmediavault is by far the best NAS solution I've ever used, although it can be tricky at times
After renewing my letsencrypt certificate I found myself in an odd situation where nginx is apparently trying to refer to previous certificate, however, in a location that does not exist (/etc/nginx/etc/ssl/certs/).
The aforementioned renewal did not go as smooth as it should, after the first try I ended up having an incorrect pair of .crt and .key files, so I removed both and gave letsencrypt another try which was successful this time. After that I restarted nginx without a problem and everything was working fine for 3 days (in fact it still does, as I did not restart nginx, but only tried reloading it to no avail).
The error that I get while trying to reload nginx is as follows, the filename of the missing file is exactly the same as that of previous certificate which was about to expire, the file is no longer present as I removed it.
Error #0:
exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; nginx -t 2>&1' with exit code '1': nginx: [emerg] BIO_new_file("/etc/nginx/etc/ssl/certs/openmediavault-d77ff21c-d34d-41d7-87be-15f5ba230a61.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/etc/ssl/certs/openmediavault-d77ff21c-d34d-41d7-87be-15f5ba230a61.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed' in /usr/share/php/openmediavault/system/process.inc:175
Stack trace:
#0 /usr/share/openmediavault/engined/module/webserver.inc(40): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMVModuleNginxAbstract->applyConfig()
#2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatus4x...', '/tmp/bgoutputJb...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}
Alles anzeigen
I've checked nginx configuration files and they look alright, I also tried creating a new one using omv-mkconf, it didn't help either. It seems to me that a reference to the old certificate remains in one of the files (but why is the location incorrect?) which causes the problem, I'll be most grateful for pointing myself in the right direction.
Some details in case they're needed:
OMV Version: 3.0.99
OMV-letsencrypt plugin version: 3.4.5
nginx plugin version: 3.0.11
Thank you!