Skip to main content

cURL: TCP Connection reset by Peer

Comments

5 comments

  • kodeslogic
    Can you paste the output for the below commands from another machine and from the server hosting this domain ifself: #curl -vvv http://whatever.com #curl -vvv https://whatever.com
    0
  • ankeshanand
    Can you paste the output for the below commands from another machine and from the server hosting this domain ifself: #curl -vvv http://whatever.com #curl -vvv https://whatever.com

    [root@server ~]# curl whatever.com curl: (56) Recv failure: Connection reset by peer [root@server ~]# curl whatever.com:443 curl: (56) Recv failure: Connection reset by peer [root@server ~]# curl http://whatever.com curl: (56) Recv failure: Connection reset by peer [root@server ~]# curl https://whatever.com curl: (56) Recv failure: Connection reset by peer [root@server1 ~]# curl -vvv whatever.com * About to connect() to aback.in port 80 (#0) * Trying x.x.x.x... * Connected to whatever.com (x.x.x.x) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: whatever.com > Accept: */* > * Recv failure: Connection reset by peer * Closing connection 0 curl: (56) Recv failure: Connection reset by peer
    Tried everything but this seems to be the issue with Litespeed in cPanel Only. Litespeed is also working!
    • LiteSpeed is running (PID = 3303271, Apache_Port_Offset = 0). Apache is not running.
    Normal HTTP and HTTPS requests work correctly and cURL from Remote Machines also do work but only Internally, cURL is having problems in Hosted Websites on the server.
    0
  • ankeshanand
    Problem Solved. The Anti-DDOS Blocked IP in Litespeed WebServer was blocking 127.0.0.1 and Server's Public IP Address. Checked it from Real-Time Stats in Webadmin Console. The Problem is in Litespeed Server. Their Default Configuration in Access Control List(Trusted IP) is as follows: 127.0.0.1, ALL, (My Server IP)
    The Configuration should be: 127.0.0.1T,ALL, (My Server IP)T
    The Trailing T stands for Trusted which created all the difference.
    0
  • kodeslogic
    Glad to know you were able to fix it.
    0
  • cPRex Jurassic Moderator
    Great work!
    0

Please sign in to leave a comment.