nginx stopped working

Discussion in 'Linux' started by ChrisV, May 4, 2018.

  1. ChrisV

    ChrisV New Member

    Joined:
    May 4, 2018
    Messages:
    1
    Likes Received:
    0
    Hello,

    my LiquidFiles Installation sudenly is not accessible over http/https any more.

    When logging on via ssh, i can see that nginx is not running any more.

    Can someone help me in this issue?


    Actual version is unknown,. but should be actual.


    Error-message i found are:

    Mai 03 12:55:54 files.iteanova.com nginx[3973]: Starting nginx: nginx: [emerg] PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0...
    Mai 03 12:55:54 files.xxxx.com nginx[3973]: [FAILED]
    Mai 03 12:55:54 files.xxxx.com systemd[1]: nginx.service: control process exited, code=exited status=1
    Mai 03 12:55:54 files.xxxx.com systemd[1]: Failed to start LSB: start and stop nginx.
    Mai 03 12:55:54 files.xxxx.com systemd[1]: Unit nginx.service entered failed state.

    also:

    [root@files ~]# nginx -t
    nginx: [emerg] PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:Type=X509_CINF error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:Field=cert_info, Type=X509 error:0906700D:pEM routines:pEM_ASN1_read_bio:ASN1 lib)
    nginx: configuration file /etc/nginx/nginx.conf test failed



    [root@files ~]# cat /var/log/nginx/error.log | tail
    2018/05/03 10:29:24 [notice] 1320#0: worker process 4440 exited with code 0
    2018/05/03 10:29:24 [notice] 1320#0: worker process 4439 exited with code 0
    2018/05/03 10:29:24 [notice] 1320#0: exit
    2018/05/03 11:09:58 [emerg] 1032#0: PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:Type=X509_CINF error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:Field=cert_info, Type=X509 error:0906700D:pEM routines:pEM_ASN1_read_bio:ASN1 lib)
    2018/05/03 12:15:27 [emerg] 1034#0: PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:Type=X509_CINF error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:Field=cert_info, Type=X509 error:0906700D:pEM routines:pEM_ASN1_read_bio:ASN1 lib)
    2018/05/03 12:49:48 [emerg] 3603#0: PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:Type=X509_CINF error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:Field=cert_info, Type=X509 error:0906700D:pEM routines:pEM_ASN1_read_bio:ASN1 lib)
    2018/05/03 12:55:54 [emerg] 3981#0: PEM_read_bio_X509("/etc/ssl/server.crt") failed (SSL: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:Type=X509_CINF error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:Field=cert_info, Type=X509 error:0906700D:pEM routines:pEM_ASN1_read_bio:ASN1 lib)
     
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    672
    Likes Received:
    15
    There is a damaged certificate file, or earlier the certificate had been migrated or imported with f.e. some issue like wrong (win) line ends,
    so Nginx could be started (or restarted).
    You can try to run "hostconfig" in the LF orange/grey console under "<F2> Setup" menu.
    Skip the initial questions about hostname and protocol, but hit "yes" when asked "Overwrite the certificate with a new self-signed certificate?"
    This will recreate a new default self-singed certificate, nginx will start and you should be able to login in to the web GUI.
    Then you will need to upload a valid signed certificate in "Admin > System > Certificate > Upload" menu (or alternatively switch the LF server to use Let's Encrypt free certificate in the main certificate menu - "Admin > System > Certificate)
     

Share This Page