Articles in this section

Cannot start nginx service on Plesk server: Failed to start Startup script for nginx service

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Cannot start nginx service:

    # service nginx start
    ● nginx.service - Startup script for nginx service
    ...
    systemd[1]: Starting Startup script for nginx service...
    systemd[1]: nginx.service: control process exited, code=exited status=1
    systemd[1]: Failed to start Startup script for nginx service.
    systemd[1]: Unit nginx.service entered failed state.
    systemd[1]: nginx.service failed.

  • plesk repair web fails with the following output:

    # plesk repair web
    ...
    ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [1]
    [FAILED]
    - httpdmng failed: ERR [util_exec]
    proc_close() failed
    ['/opt/psa/admin/bin/apache_control_adapter' '--restart'
    '--restart-interval' '0' '--http-port' '7080' '--https-port'
    '7081'] with exit code [255]
    ERR [panel] Apache config
    (15545535610.64398900) generation failed: Template_Exception:
    Can not restart web server:
    file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
    line: 109
    code: 0
    Can not restart web server

Cause

Unclear.

Resolution

  1. Connect to the server via SSH.

  2. Re-enable nginx in Plesk:

    # plesk sbin nginxmng -d

    # plesk sbin nginxmng -e

Was this article helpful?

Comments

1 comment
Date Votes
  • Suddenly, all my sites were not loading after a system reboot on my Linode VPS. Checking "Services Management" confirmed that Nginx wasn't starting, and nothing would get it started via CLI or Plesk panel. Even uninstalling/reinstalling via Plesk "System Updates" section gave me no joy. Finally, trying the above plesk sbin nginxmng -d & plesk sbin nginxmng -e commands generated the following error (IP addresses have been anonymized):

    root@vm1:~# plesk sbin nginxmng -e
    [2023-06-04 18:55:10.964] 34995:647d1640d3c8c ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
    [2023-06-04 18:55:11.550] 34995:647d1640d3c8c ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
    [2023-06-04 18:55:11.559] 34995:647d1640d3c8c ERR [panel] Apache config (16859193060.25066600) generation failed: Template_Exception: nginx: [emerg] bind() to [IP:IP::IP:IP:IP:IP]:443 failed (99: Cannot assign requested address)
    nginx: configuration file /etc/nginx/nginx.conf test failed
    file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
    line: 75
    code: 0
    nginx: [emerg] bind() to [IP:IP::IP:IP:IP:IP]:443 failed (99: Cannot assign requested address)
    nginx: configuration file /etc/nginx/nginx.conf test failed
    exit status 1

    This shows that after reboot, the secondary IP address assigned to the VPS somehow became corrupted in Plesk. I visited the "IP Addresses" section in Tools & Settings and clicked "Repair" on the affected IP address, clicked the "Reread IP" button, and then everything was back up & running. Hope this helps someone else!

    0

Please sign in to leave a comment.