ModernBill - Duplicate Users?

BWS

Active Member
Nov 20, 2003
42
0
156
Hi,

I've quite happily been using ModernBill for sometime, however recently I started putting accounts onto /home2/ on one of my servers - I also upgraded ModernBill at the same time.

If I go into WHM and create accounts normally it is created fine and I get all the usual debug information during the creation.

BUT, if I use the ModernBill API to create the account, it ALWAYS says that the account name is a duplicate and to check /etc/passwd - To make matters worse, it does actually create the account correctly!!! Thus resulting in the Welcome E-mail that ModernBill sends out containing some of the wrong information (just ... instead of the IP which it tries to parse I assume from the debug information).

cPanel/WHM is:
WHM 10.6.0 cPanel 10.6.0-R158
RedHat Enterprise 3 i686 - WHM X v3.1.0

Any ideas anyone?!?!?
 

kris1351

Well-Known Member
Apr 18, 2003
961
0
166
Lewisville, Tx
That is a MB error, not a Cpanel error. It is seeing it as a duplicate due to the reason you are putting the same username on the same IP address which is what MB looks at when it creates and account. Since Cpanel doesn't reject it once it is started that is why the account gets created.
 

BWS

Active Member
Nov 20, 2003
42
0
156
Hi,

Certainly have...

I'ts not a Modernbill error. Modernbill sends the correct information to cPanel and cPanel goes away and creates the account - however once it's created the account it then displays the following in the API window:
Module: mod_cpanel2, Host: <hostname>

Ouch, sorry that username (<a unique username!>) is taken. Check /etc/passwd

Account Creation Complete!!!
Modernbill sees the "Account Creation Complete!!!" (which it is) and sets the package to active and sends out the Welcome e-mail.

However, as the normal debug information hasn't been displayed. Modernbill can't parse it for the IP address that the user has been placed on and sends out welcome emails with ... instead of an IP address?

From Modernbill:
The parameters that cpanel provides does not support duplicate username checking -- This is not MB issue as API shows status Completed, package status is set On and account is created on the server just fine.

For this you need to contact cpanel support team as cpanel is giving an incorrect error for successfull account so you can ignore it.
Suggestions?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
Throw it back at ModernBill. It's their responsibility that their software works with cPanel. It's also their responsibility to communicate any issues that affects their software directly with cPanel.

Nothing much you can do, except find a product that works ;)
 

BWS

Active Member
Nov 20, 2003
42
0
156
Are you sure, my current interpretation is it's not Modernbill...

Modernbill have done the right thing in going away and creating the account as instructed (which isn't a duplicate) then WHM decides to report it as a duplicate, yet it's already created the account. Because it reports it as a duplicate and doesn't show the correct account creation information Modernbill can't parse them and complete it's job correctly??

(Just my interpretation)..... I can certainly see where it from that point of view....
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,535
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
See in this case it is MB's issue, as they are not handling incorrect information passed back to them and are not verifying for themselves that the information retrieved is correct.

If you create a normal account in WHM without issues, then it is definitly MB's issue to get dealt with because obviously they are not using the API appropriatly.
 

BWS

Active Member
Nov 20, 2003
42
0
156
Still having this problem.

Modernbill must be sending the username over correctly, but cPanel is reporting back that it's already taken (a duplicate) in the API output - when it most definitely isn't.

Modernbill's problem
Fair enough ModernBill should be sensible enough to not send the Welcome E-mail when the accounts setup info isn't there (even if the API does report back "Account Creation Complete").

cPanel's Problem
cPanel is being passed information from the API, it creates the account correctly in WHM, but reports back that the user is a duplicate in the API window, even though it isn't and it has been created. If it reported back the correct information here ModernBill would parse it and send out the Welcome E-mail correctly.

Is there any easy way to test the API? (I wrote something years ago for it, but I'm sure the API has probably changed since then!). To check that if I send the correct info then the API doesn't report a duplicate user (basically to rule out whether ModernBill is sending the correct data to the API).

The more I think about it the more I think it's a comedy of errors with problems on both sides, but if cPanel reported what it had done back correctly then ModernBill wouldn't have a problem?

Thoughts? Ideas for testing the API?

Thanks!
Keiron
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
If there is a bug in the API with cPanel's respone, it's still up to the developers of Modernbill to sort it out with cPanel, which they can easily do. You, as a customer of their scripts, should not have to be involved at all.

I've done it myself frequently with cPanel over MailScanner, as have other developers of third-party products.
 

myBox

Active Member
Jan 6, 2004
40
0
156
same problem

I am having the same problem here since 4.1 and now upgraded to 4.3 and its still there.

what is really weird about it is that it does not happen everytime. sometimes it works and other it does not.

I do not care much about the the IP info that is returned by the API queue as long as the account is created correctly. on the other hand, I realy would like things to work perfectly.

I did not investigate the issue and do not intend to until it is a major issue. no time to waste on this.

my thinking is cPanel is not the problem, instead something is happening which is wrong. myabe, double submit? or sending the creation command twice? I am not sure how to prove this.

regards.