On Plesk server Nginx service is unable to start or restart: system library : fopen : No such file or directory

Follow

Comments

4 comments

  • Avatar
    Liv

    Hi, unfortunately step 5 results in the following error:

    "ERR [panel] Apache config (15259610120.62015100) generation failed: Template_Exception: nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-Yfl6ly") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-Yfl6ly','r') error:2006D080:BIO routines:BIO_new_file:no such file)
    nginx: configuration file /etc/nginx/nginx.conf test failed

    file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
    line: 75
    code: 0
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-Yfl6ly") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-Yfl6ly','r') error:2006D080:BIO routines:BIO_new_file:no such file)
    nginx: configuration file /etc/nginx/nginx.conf test failed"

    What can I do now to start nginx and fix my webconfig files?

  • Avatar
    Ivan Postnikov

    @Liv, to resolve the issue with Apache certificates missing, use this link.

    After that reapply steps from the following article.

  • Avatar
    Liv

    @Ivan, sorry completely missed your answer. It's Saturday so figured give it another try ;)

    I'm really stuck though. Let me replicate what I've done.

    So first I went the article and did step 2: ls -l /usr/local/psa/var/certificates/

    I get a list of certificates, the one from my error is not in the list.

    Then I did this: cp -rf /usr/local/opt/psa/var/certificates/cert-Ybzgms /usr/local/opt/psa/var/certificates/cert-Yfl6ly

    (the first certificate is just one the ones I see listed, the second is the certificate from my error)

    My certificates look like this in the list: -r-------- 1 root root 5155 Sep 15 14:37 cert-Ybzgms

    But I get this error: cp: cannot stat ‘/usr/local/opt/psa/var/certificates/cert-YCGwrP’: No such file or directory

    So basically whatever I do, it says there is not file or directory. I still can't start nginx and when I go in Plesk to my webserver configuration files I see an error for the nginxWebmail.php file for all domains.

    So, I guessed something is wrong with the permissions then so I tried doing things I don't really understand like: mkdir /usr/local/psa/var/certificates/cert-Yfl6ly

    which creates a certificate file but ofc not correct, it looks like this: drwxr-xr-x 2 root root 6 Sep 15 14:30 cert-Yfl6ly

    Thats weird, so tried to change the permission to what I saw in the article you mentioned to -rw-r--r-- with this: chmod 644 /usr/local/opt/psa/var/certificates/cert-Yfl6ly, this results in this error: chmod: cannot access '/usr/local/opt/psa/var/certificates/': No such file or directory

    So I'm stuck super stuck, now I have this certificate file that's wrong and I keep getting the no file or directory error for everything. Could you please help me out finding out what to do next?

     

  • Avatar
    Ivan Postnikov

    @Liv

    > But I get this error: cp: cannot stat ‘/usr/local/opt/psa/var/certificates/cert-YCGwrP’: No such file or directory

    This means that one more certificate is missing, it also needs to be recreated from existing certificate.

    > I don't really understand like: mkdir /usr/local/psa/var/certificates/cert-Yfl6ly

    This command creates a directory, it should not be used here.

    >  in Plesk to my webserver configuration files I see an error for the nginxWebmail.php file for all domains.

    What is the full error message shown?

    > Thats weird, so tried to change the permission to what I saw in the article you mentioned to -rw-r--r-- with this: chmod 644 /usr/local/opt/psa/var/certificates/cert-Yfl6ly

    The incorrect path is specified in the command, use /usr/local/psa/var/certificates/cert-Yfl6ly

     

    As the issue is quite critical I would suggest contacting support:

    https://support.plesk.com/hc/en-us/articles/213409109-How-to-get-technical-support-for-Plesk-

Please sign in to leave a comment.

Have more questions? Submit a request