• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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