Weird error on modifyacct
Hi.
I'm having a weird error with some of my server accounts when I execute the modifyacct WHM API command. I use this simple query:
and only with some users, this error appears:
...where that strange decimal value is coming from?
/json-api/modifyacct?api.version=1"A=2048&MAX_DEFER_FAIL_PERCENTAGE=25&user=someuserand only with some users, this error appears:
"0.001953125" is not a valid nonnegative integer because it contains 1 invalid character....where that strange decimal value is coming from?
-
Can you show the full output you receive in response to the API function? Can you also show me the following for one of the accounts that are experiencing this error: cat /var/cpanel/users/$user0 -
Hi @cPanelLauren :) This is the raw HTTP response: HTTP/1.1 200 OK Connection: close Content-Type: text/plain; charset="utf-8" Date: Thu, 20 Aug 2020 22:51:54 GMT Cache-Control: no-cache, no-store, must-revalidate, private Pragma: no-cache Cache-Control: no-cache Content-Length: 204 {"metadata":{"result":0,"reason":""0.001953125" is not a valid nonnegative integer because it contains 1 invalid character.","version":1,"output":{"messages":[],"warnings":[]},"command":"modifyacct"}}
And this is the content of/var/cpanel/users/$user
, with user and domain replaced with 'someuser' and 'someuser.com':# cPanel -- If you edit this file directly you must run /usr/local/cpanel/scripts/updateuserdomains afterwards to rebuild the system caches. # If you edit MAX_EMAIL_PER_HOUR or MAX_EMAIL_PER_HOUR-[domain] you must run /usr/local/cpanel/scripts/updateuserdomains' BACKUP=0 BWLIMIT=10737418240 CONTACTEMAIL= CONTACTEMAIL2= DEMO=0 DISK_BLOCK_LIMIT=524288 DNS=someuser.com FEATURELIST=Reseller HASCGI=0 HASDKIM=1 HASSPF=1 IP=149.56.17.13 LANG=spanish-utf8 LEGACY_BACKUP=0 LOCALE=es MAILBOX_FORMAT=maildir MAXADDON=unlimited MAXFTP=unlimited MAXLST=unlimited MAXPARK=unlimited MAXPOP=unlimited MAXSQL=unlimited MAXSUB=unlimited MAX_DEFER_FAIL_PERCENTAGE=50 MAX_EMAILACCT_QUOTA=unlimited MAX_EMAIL_PER_HOUR=100 MTIME=1587649411 MXCHECK-someuser.com=0 OWNER=reseller PLAN=reseller_plan_0.5-10 PUSHBULLET_ACCESS_TOKEN= RS=paper_lantern STARTDATE=1430000745 SUSPENDTIME=1587380402 USER=someuser _PACKAGE_EXTENSIONS= notify_account_authn_link=1 notify_account_authn_link_notification_disabled=1 notify_account_login=0 notify_account_login_for_known_netblock=0 notify_account_login_notification_disabled=1 notify_autossl_expiry=1 notify_autossl_expiry_coverage=1 notify_autossl_renewal= notify_autossl_renewal_coverage=1 notify_autossl_renewal_coverage_reduced=1 notify_autossl_renewal_uncovered_domains=1 notify_bandwidth_limit= notify_contact_address_change=1 notify_contact_address_change_notification_disabled=1 notify_disk_limit=1 notify_email_quota_limit= notify_password_change=1 notify_password_change_notification_disabled=1 notify_ssl_expiry=10 -
I just realized that 0.001953125 == 2048 / 1048576
... So I found the problem, the documentation formodifyacct
specifies that the quota must be "An integer in multiples of 1,048,576 bytes" so2048
is a invalid quota value... I got carried away with thedisklimit
value from theaccountsummary
command, which is in mebibytes. Sorry to bother you. Rubber ducking debugging always works :-D Thanks!0 -
No worries, I'm just glad you found out what it was :) 0
Please sign in to leave a comment.
Comments
4 comments