WHMCS suspending accounts/services using the virtualmin API calls

When accounts get suspended then reactivated the mysql users passwords remain LK and we have to manually reset them so the site comes back online. I think this should all be automatic.

Status: 
Active

Comments

Does this happen even if you do the disable / enable from within Virtualmin itself?

Yes. I get the nightly email from WHMCS telling what was processed, suspended, updated. I see an account was suspended. I view the client in WHMCS it shows suspended. Using WHMCS I click on module commands unsuspend and get an error saying the client is not suspended. If I view the clients site in a web browser it says account suspended/disabled. Using WHMCS I then have to suspend the client and then unsuspend it. Then I go find the sites database on the server it's hosted on and manually set the mysql password.

To answer your question. I'm not sure. How do I unsuspend an account using virtualmin?

To unsuspend an account in Virtualmin, first into Virtualmin, then choose the domain from the dropdown on the top-left. From there, click Disable and Delete -> Enable Virtual Server.

Using Virtualmin to enable the account resets the mysql password correctly.

This feels like a WHMCS bug then ..

Is WHMCS running on the same system as Virtualmin? I wonder if perhaps the Apache restart as part of the domain disable is killing WHMCS part-way through the process.

No WHMCS is on a different box. I had originally filed a trouble ticket with the WHMCS guys (Joe) said it's a VM bug cause they are just making API calls. Should I tell them we've diagnosed this down to their software? I just don't want to get stuck between vendors and not have this issue resolved.

It would be useful for me to know what API calls they are making exactly..

Can you find the entries in /var/webmin/miniserv.log made by WHMCS at the time of the disable? They should be for URLs like /virtual-server/remote.cgi?program=...

I'm having trouble finding that info in the miniserv.log for the days of suspending.

Cron Job Report for 06-05-2010 00:00:02

1 Services Suspended - Suspended Service: User Name - domainname.org (Service ID: 36 - User ID: 31)

0 Cancellation Requests Automatically Processed

Disk & Bandwidth Usage Statistics Updated

I have large gaps in that log. Here is a snip from that log.

71.237.169.90 - travisb [01/May/2010:12:47:00 -0700] "GET /virtual-server/showpass.cgi?dom=127005352221716 HTTP/1.1" 200 859 71.237.169.90 - travisb [01/May/2010:12:47:21 -0700] "GET /virtual-server/list_databases.cgi?dom=127005352221716& HTTP/1.1" 200 15432 203.71.2.73 - - [03/May/2010:06:25:52 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 203.71.2.73 - - [03/May/2010:06:25:53 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 58.215.75.62 - - [03/May/2010:15:14:45 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 58.215.75.62 - - [03/May/2010:15:14:46 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 58.215.75.62 - - [06/May/2010:18:56:59 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 58.215.75.62 - - [06/May/2010:18:57:00 -0700] "POST /unauthenticated//..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shells HTTP/1.1" 404 32 71.237.169.90 - - [10/May/2010:15:08:25 -0700] "GET / HTTP/1.1" 401 2559 71.237.169.90 - - [10/May/2010:15:08:25 -0700] "GET /unauthenticated/reset-fonts-grids-base.css HTTP/1.1" 200 6125 71.237.169.90 - - [10/May/2010:15:08:25 -0700] "GET /unauthenticated/virtual-server-style.css HTTP/1.1" 200 3775 71.237.169.90 - - [10/May/2010:15:08:25 -0700] "GET /unauthenticated/sorttable.js HTTP/1.1" 200 8556

Can you see any entries from your whmcs system, at any time?

Looking on the wrong server. Here is what I see

1274166019.6141.0 [18/May/2010 00:00:19] root - 127.0.0.1 virtual-server remote.cgi "remote" "remote.cgi" "userdomain.com" argv='%252D%252Ddomain%2520userdomain%252Ecom' domain='userdomain.com'

Matt from WHMCS said it should be looking something like this:

SUSPEND /virtual-server/remote.cgi?program=modify-reseller&name=xxxxxxxxx&pass=yyyyyyyyy&lock=1

UNSUSPEND /virtual-server/remote.cgi?program=modify-reseller&name=xxxxxxxxx&pass=yyyyyyyyy&lock=0

I can't find anything with lock=1

So it looks from those lines like it is just disabling a reseller, which prevents him from logging in .. but doesn't effect any of his domains. They have to be disabled separately.