• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Plesk API: 502 Bad Gateway, Subscription

Status
Not open for further replies.

Stuart1

New Pleskian
When ever I create a new subscription the page returns:
502 Bad Gateway

I found this article but it did not resolve the issue. http://kb.odin.com/en/118671

This error only occurs when I create a new subscription.

I use the following XML:
HTML:
<webspace>
    <add>
        <gen_setup>
            <owner-login>$user_name</owner-login>
            <name>$domain</name>
            <ip_address>$ipaddress</ip_address>
            <status>0</status>
        </gen_setup>
        <hosting>
            <vrt_hst>
                <property>
                    <name>ftp_login</name>
                    <value>$user_name</value>
                </property>
                <property>
                    <name>ftp_password</name>
                    <value>$password</value>
                </property>
                <ip_address>$ipaddress</ip_address>
            </vrt_hst>
        </hosting>
        <plan-name>$plan_name</plan-name>
    </add>
</webspace>

The user is successfully created, but I get the 502 error.

Can anyone please help me solve this issue, Thanks.
 
I have a plain php file that has the CURL script that connects with the Plesk server to grab the customer information. I can retrieve info, add new customers, but when I add a customer to a subscription I get the 502 error.

I wish I could show you a log, but I don't know where I could look for them.

My api to connect to plesk server is an official plesk api

https://github.com/plesk/api-examples/blob/master/php/PleskApiClient.php
 
Last edited:
This is driving me nuts, why would I get an error when creating a new subscription but not when im adding a new domain?

Proxy log:
Code:
2014/12/04 13:27:20 [error] 7658#0: *3 upstream prematurely closed connection while reading response header from upstream,
client: xxx.xxx.xxx.xxx, server: domain.com,
request: "GET /page.php HTTP/1.1",
upstream: "https://xxx.xxx.xxx.xxx:7081/page.php",
host: "domain.com"

I ran
/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair
and there was an error described in the following article http://kb.odin.com/en/120426 but after doing this I still get 502 error.
 
Last edited:
Problem Resolved the issue was the Plesk Application Firewall or Watch Dog. Unfortunately I removed Watch Dog and disabled the firewall at the same time in my desperation so im not sure which fixed it but it resolved the 502 error.
 
Status
Not open for further replies.
Back
Top