• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue cURL error 7: Failed to connect to localhost port 443: Connection refused

USY

Basic Pleskian
Server operating system version
Ubuntu 20.04 x86_64
Plesk version and microupdate number
Plesk Obsidian 18.0.47.5
Hi,

I am running XenForo Forum on my Plesk which running behind Cloudflare.
I get following erro log, which is showing me that the curl connection to localhost on port 443 is refused.

1674674886396.png

All curl's to localhost, 127.0.0.1 and 0.0.0.0 are refused:
Bash:
root@srv:~# curl -vv localhost:443
*   Trying ::1:443...
* TCP_NODELAY set
* connect to ::1 port 443 failed: Connection refused
*   Trying 127.0.0.1:443...
* TCP_NODELAY set
* connect to 127.0.0.1 port 443 failed: Connection refused
* Failed to connect to localhost port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to localhost port 443: Connection refused

Bash:
root@srv:~# curl -vv 127.0.0.1:443
*   Trying 127.0.0.1:443...
* TCP_NODELAY set
* connect to 127.0.0.1 port 443 failed: Connection refused
* Failed to connect to 127.0.0.1 port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 443: Connection refused

Bash:
root@srv:~# curl -vv 0.0.0.0:443
*   Trying 0.0.0.0:443...
* TCP_NODELAY set
* connect to 0.0.0.0 port 443 failed: Connection refused
* Failed to connect to 0.0.0.0 port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 0.0.0.0 port 443: Connection refused


UFW Firewall is disabled:
Bash:
root@srv:~# sudo ufw status
Status: inactive

netstat show me that port 443 is active and listen
1674675894074.png


To be sure I also have turn OFF the "Security Level" on CF Firewall.
1674676078457.png

No matter what I've tried, so far unfortunately without success.

I would therefore be very grateful for any tip or solution to solve this issue.

Regards.
 
Code:
ss -lntp|grep 443
shows that nginx is only listening on the IP not localhost or 0.0.0.0

so use
Code:
curl -vv <yourIP>:443
 
Thanks for the reply,

curl to the serverip on port 443 is fine.

As you can see some XenForo Addons require curl to localhost on port 433
1674674886396-png.22470


I read this article:

But the loopback already exists.
1674815654793.png

So unfortunatelly this still doesn't solve the issue I got.
 
This is not a Cloudflare Issue since the cURL is clearly trying to get data from the localhost itself (127.0.0.1). Even if it wasn't to the localhost, Cloudflare is only doing things from traffic coming into the server, not out so Cloudflare has no relevance in this case.

I see you've already posted on Xenforo's support forum and someone from their staff already responded back about a general outage that's causing that issue.
 
Back
Top