Node.js application is not accessible

Created:

2017-02-20 23:15:50 UTC

Modified:

2017-08-08 13:42:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Node.js application is not accessible

Applicable to:

  • Plesk for Linux

Symptoms

  • Node.js application is not accessible

  • All websites are not accessible as well

  • Front-end webserver (Apache or nginx) listens not to 80 port, but to another one, e.g. 8015

  • The following values in psa database:

    mysql> select * from ServiceNodeConfiguration where name = "httpPort" OR name = "frontendPort";
    
    +---------------+-----------+--------------+-------+
    | serviceNodeId | section | name | value |
    +---------------+-----------+--------------+-------+
    | 1 | webProxy | frontendPort | 8015 |
    | 1 | webServer | httpPort | 8015 |
    +---------------+-----------+--------------+-------+

Cause

Database inconsistency causes incorrect web configuration files

Resolution

  1. Update psa database with correct values, previously create its backup:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa`date +%F_%H.%M`.sql
    

    if nginx support disabled

    mysql> update ServiceNodeConfiguration set value=80 where section="webProxy" and name="frontendPort";
    mysql> update ServiceNodeConfiguration set value=80 where section="webServer" and name="httpPort";
    

    if nginx support enabled

    mysql> update ServiceNodeConfiguration set value=80 where section="webProxy" and name="frontendPort";
    mysql> update ServiceNodeConfiguration set value=7080 where section="webServer" and name="httpPort";
    
  2. Rebuild web configuration files:

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-all
    
Have more questions? Submit a request
Please sign in to leave a comment.