Letsencrypt omv-extras plugin, nginx errors after renewing certificate?

  • Hi, after running omv-letsencrypt scheduled job, i got an error about nginx export failed... After reboot no WebUI.


    nginx -t gives me the following:
    # nginx -t
    nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/ssl/private/openmediavault-90d5f68a-d908-4159-8f4e-991518fcd5ed.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
    nginx: configuration file /etc/nginx/nginx.conf test failed



    Any help would be appreciated..

    • Offizieller Beitrag

    The cert you generated must be bad. What does the log say? cat /var/log/letsencrypt/letsencrypt.log

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Letsencrypt seems to do the job correctly, and the certificate works in my emby install..


    Here's the log:


    # cat /var/log/letsencrypt/letsencrypt.log
    2017-11-20 23:40:20,080:DEBUG:certbot.main:Root logging level set at 30
    2017-11-20 23:40:20,081:INFO:certbot.main:Saving debug log to /var/log/letsencrypt/letsencrypt.log
    2017-11-20 23:40:20,083:DEBUG:certbot.main:certbot version: 0.10.2
    2017-11-20 23:40:20,083:DEBUG:certbot.main:Arguments: ['-q']
    2017-11-20 23:40:20,085:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#webroot,PluginEntryPoint#null,PluginEntryPoint#manual,PluginEntryPoint#standalone)
    2017-11-20 23:40:20,128:DEBUG:parsedatetime:parse (top of loop): [30 days][]
    2017-11-20 23:40:20,133:DEBUG:parsedatetime:CRE_UNITS matched
    2017-11-20 23:40:20,134:DEBUG:parsedatetime:parse (bottom) [][30 days][][]
    2017-11-20 23:40:20,134:DEBUG:parsedatetime:weekday False, dateStd False, dateStr False, time False, timeStr False, meridian False
    2017-11-20 23:40:20,134:DEBUG:parsedatetime:dayStr False, modifier False, modifier2 False, units True, qunits False
    2017-11-20 23:40:20,135:DEBUG:parsedatetime:_evalString(30 days, time.struct_time(tm_year=2017, tm_mon=11, tm_mday=20, tm_hour=23, tm_min=40, tm_sec=20, tm_wday=0, tm_yday=324, tm_isdst=0))
    2017-11-20 23:40:20,135:DEBUG:parsedatetime:_buildTime: [30 ][][days]
    2017-11-20 23:40:20,135:DEBUG:parsedatetime:units days --> realunit days
    2017-11-20 23:40:20,135:DEBUG:parsedatetime:return
    2017-11-20 23:40:20,135:INFO:certbot.renewal:Cert not yet due for renewal
    2017-11-20 23:40:20,135:DEBUG:certbot.renewal:no renewal failures


    When i run omv-letsencrypt i get the following error (after the certificate has been renewed/checked for expiration):


    Applying Configuration Changes
    {"response":null,"error":{"code":0,"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] SSL_CTX_use_PrivateKey_file(\"\/etc\/ssl\/private\/openmediavault-90d5f68a-d908-4159-8f4e-991518fcd5ed.key\") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)\nnginx: configuration file \/etc\/nginx\/nginx.conf test failed","trace":"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] SSL_CTX_use_PrivateKey_file(\"\/etc\/ssl\/private\/openmediavault-90d5f68a-d908-4159-8f4e-991518fcd5ed.key\") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)\nnginx: configuration file \/etc\/nginx\/nginx.conf test failed' in \/usr\/share\/php\/openmediavault\/system\/process.inc:175\nStack trace:\n#0 \/usr\/share\/openmediavault\/engined\/module\/webserver.inc(40): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engined\/rpc\/config.inc(168): OMVModuleNginxAbstract->applyConfig()\n#2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(124): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(536): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}}
    ERROR: Failed to execute RPC (service=Config, method=applyChanges)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!