SOLVED Unsuspend account gives error 404 temporarily

ruiz

Well-Known Member
Feb 13, 2008
50
4
58
Hello,

We have the weirdest behavior on our servers. When we unsuspend a account, the website start showing a 404 error page, and after around 15 minutes the website starts loading just fine.

Any idea of what it might be? Here's some information:
- Website files are currectly in /public_html.
- It's not the browsers cache. Servers logs also show the error 404
- This happens only on some accounts. Others are unsuspended without issue
- We are suspending/unsuspending accounts via API, but it all seems to work fine.
- We tried suspending and unsuspending again via WHM, but it still shows the 404 error
- Tried restarting apache, no change
- Currently we use mod security, php-fpm. Any of then might be the culprit?

Thanks for your help!
 

sparek-3

Well-Known Member
Aug 10, 2002
2,148
265
388
cPanel Access Level
Root Administrator
Have you verified that the file being listed in the domain's domlog (that is showing a 404 response code) actually exists in the domain's DocumentRoot?

Do you have any caching system installed on the server? Varnish? nginx?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
My assumption here is that there must be some kind of caching involved here as suggested by @sparek-3 I tested this on my own server with a domain running php-fpm and php v7.1:

Code:
# curl -vv https://mydomain.tld
* About to connect() to mydomain.tld port 443 (#0)
*   Trying <MyIP>...
* Connected to mydomain.tld (<MyIP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*     subject: CN=mydomain.tld
*     start date: Jul 18 00:00:00 2018 GMT
*     expire date: Oct 16 23:59:59 2018 GMT
*     common name: mydomain.tld
*     issuer: CN="cPanel, Inc. Certification Authority",O="cPanel, Inc.",L=Houston,ST=TX,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: mydomain.tld
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 06 Sep 2018 15:08:31 GMT
< Server: Apache
< Link: <https://mydomain.tld/index.php/wp-json/>; rel="https://api.w.org/", <https://mydomain.tld/>; rel=shortlink
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
Then suspended the account:
Code:
whmapi1 suspendacct user=myuser resason=test
---
metadata:
  command: suspendacct
  output:
    raw: "Changing Shell to /bin/false...Done\nLocking Password...Done\nSuspending webdav users\nSuspending email account logins for mydomain.tld .... Done\nSuspending email account logins for domain.us .... Done\nSuspending email account logins for testingstuff.com .... Done\nSuspending mysql users\nSuspending websites...\nSuspending FTP accounts...\nSuspending outgoing email....Done\nMyUser's account has been suspended\n"
  reason: OK
  result: 1
  version: 1
Confirmed it was suspended:

Code:
curl -vv https://mydomain.tld
* About to connect() to mydomain.tld port 443 (#0)
*   Trying <MyIP>...
* Connected to mydomain.tld (<MyIP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*     subject: CN=mydomain.tld
*     start date: Jul 18 00:00:00 2018 GMT
*     expire date: Oct 16 23:59:59 2018 GMT
*     common name: mydomain.tld
*     issuer: CN="cPanel, Inc. Certification Authority",O="cPanel, Inc.",L=Houston,ST=TX,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: mydomain.tld
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Thu, 06 Sep 2018 15:09:34 GMT
< Server: Apache
< Location: https://mydomain.tld/cgi-sys/suspendedpage.cgi
< Content-Length: 229
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://mydomain.tld/cgi-sys/suspendedpage.cgi">here</a>.</p>
</body></html>
* Connection #0 to host mydomain.tld left intact
Unsuspended the account:

Code:
whmapi1 unsuspendacct user=myuser
---
metadata:
  command: unsuspendacct
  output:
    raw: "Unsuspending outgoing email....Done\nUnsuspending webdav users\nUnsuspending email account logins for mydomain.tld .... Done\nUnsuspending email account logins for domain.us .... Done\nUnsuspending email account logins for testingstuff.com .... Done\nUnsuspending websites...\nUnsuspending FTP accounts...\nmyusern's account is now active\nUnsuspending mysql users\nmyusers's account has been unsuspended\n"
  reason: OK
  result: 1
  version: 1
checked again and no issues:

Code:
curl -vv https://mydomain.tld
* About to connect() to mydomain.tld port 443 (#0)
*   Trying <MyIP>...
* Connected to mydomain.tld (<MyIP>) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*     subject: CN=mydomain.tld
*     start date: Jul 18 00:00:00 2018 GMT
*     expire date: Oct 16 23:59:59 2018 GMT
*     common name: mydomain.tld
*     issuer: CN="cPanel, Inc. Certification Authority",O="cPanel, Inc.",L=Houston,ST=TX,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: mydomain.tld
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 06 Sep 2018 15:10:10 GMT
< Server: Apache
< Link: <https://mydomain.tld/index.php/wp-json/>; rel="https://api.w.org/", <https://mydomain.tld/>; rel=shortlink
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Can you please open a ticket using the link in my signature? I've been unable to replicate this, thus far and as such I'd like to see if having access to an affected system may shed some further light on the situation. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

bibleman

Member
Mar 30, 2008
7
1
51
Has there been any fix to this bug?

A Reseller account that was unsuspended about 3 hours ago is displaying a 404 error on all the domains.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
I was unable to replicate this behavior @bibleman per my last response. I had asked the OP to open a ticket and if you're experiencing the same issue please feel free to open a ticket using the link in my signature so that we might take a closer look. Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hi @bibleman


I'm glad to hear that the issue is resolved. Thanks for letting us know. If it should occur again please open a ticket as requested previously so we can take a closer look.


Thanks!