Symptoms

Cannot manage the subscription. The plesk agent exception are thrown when accessing subscription management options:

    1. When opening the ‘Files’ tab:
      Error message or description of the request: In response to the HTTP-request to the agent at 'https://203.0.113.2:8443/agent.cgi' An invalid HTTP-code '502 '
      File JsonRpc.php
      File    JsonRpc.php
      Line    273
      Type    Service_Agent_Exception
      

  1. When opening ‘FTP access’ menu or trying to submit hosting settings:
    ERROR: Service_Agent_Exception
    The unexpected HTTP code '502' was received on the HTTP request to the agent at 'https://203.0.113.2:8443/agent.cgi'.
    
  2. The /var/log/sw-cp-server/error_log on the service node where website hosts contains the output:
    [root@server ~]# tail -n2 /var/log/sw-cp-server/error_log
    2014/07/10 17:38:37 [error] 16290#0: *1 connect() to unix:/var/run/agent.sock failed (111: Connection refused) while connecting to upstream, client: 4.3.2.1, server: , request: "POST /agent.cgi?action=exec&transactionId=7c20e04585111c44a7f96bf6a36ec64d HTTP/1.1", upstream: "fastcgi://unix:/var/run/agent.sock:", host: "203.0.113.2:8443"
    2014/07/10 17:40:49 [error] 16290#0: *3 connect() to unix:/var/run/agent.sock failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /agent.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/agent.sock:", host: "localhost:8443"
    

Cause

Plesk agent is not running on the service node:

[root@server ~]# /etc/init.d/plesk-agent status
agent.cgi dead but pid file exists

Resolution

Remove agent PID file ‘/var/run/agent.sock’ and start the service:

[root@server ~]# /etc/init.d/plesk-agent start
Starting agent.cgi:                                        [  OK  ]

Leave a Reply

Your email address will not be published. Required fields are marked *