(10-26-2016, 09:05 PM)Rynoxx Wrote:(10-25-2016, 11:24 AM)pomtom44 Wrote:@[pomtom44] Ok, to check if something is wrong with the WHMCS module or if the problem lies in the default domain module for sentora, try running this in your cli: (Replacing all the capitalized values with what would be appropriate)(10-23-2016, 02:06 AM)Rynoxx Wrote: @[pomtom44] Awesome, thanks for doing some digging on your own
After some more thorough testing on my side, it seems like the error only occurs when the user id isn't sent from WHMCS (even an invalid user id or previously existing user id works).
Although judging by the screenshot of the module log you sent earlier this shouldn't be an issue in this case.
Can you confirm that when running whmcs234 the "domains.createdomain" action has 'uid' => 'XX' in the request? (In the WHMCS module log)
Rynoxx
Yes the ID is being sent
Heres the full debug logs just for reference
whmcs234.createclient
Code:Request
Array
(
[resellerid] => 1
[packageid] => Olly
[groupid] => 3
[username] => ollyconz
[fullname] => Oliver
[email] => XXXXXXXX
[address] => XXXXXXX
[postcode] => XXXX
[password] => XXXX
[phone] => XXXX
[sendmail] => 0
[emailsubject] => 0
[emailbody] => 0
)
Response
success
whmcs234.getuserid
Code:Request
Array
(
[username] => ollyconz
)
Response
Array
(
[uid] => 48
)
whmcs234.createdomain
Code:Request
Array
(
[uid] => 48
[domain] => olly.co.nz
[destination] =>
[autohome] => 1
)
Response
Caught exception: Server error response [url] https://52.37.245.73/api/domains [status code] 500 [reason phrase] Internal Server Error
/var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
Forum Add-ons and Usage /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(109): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
MySupport Addon /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
Test of MySupport MOD /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#4 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/react/promise/src/FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#5 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
Forum theme /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
Install Docs-ISPconfig /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
Advertising forum? /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(233): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#9 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(218): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
Addon Store Development /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Handlers/XmwsRequest.php(91): GuzzleHttp\Client->post('domains', Array)
Going live in two weeks time! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Senitor.php(130): Ballen\Senitor\Handlers\XmwsRequest->send()
Important and Useful Links and Sites /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(239): Ballen\Senitor\Senitor->send()
Premium support subscription /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(381): sendSenitorRequest(Array, 'domains', 'CreateDomain', Array)
#14 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): sentora_CreateAccount(Array)
#15 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call()
#16 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): WHMCS\Module\Server->call()
More progress updates and 'trojan spike' joins the team! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): ModuleCallFunction()
#18 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/orderfunctions.php(0): ServerCreateAccount()
A few questions /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/admin/orders.php(0): acceptOrder()
Request: FTP username@domain.tls {main}
Debug string from Senitor:
1
This is what I used when double checking on my server, uid would work fine if it's 1 (for zadmin) or the id of any other user you know currently exists on your installationCode:curl -XPOST -d '<xmws>
<apikey>YOUR-API-KEY-HERE</apikey
<request>CreateDomain</request>
<content>
<uid>USER-ID-HERE</uid>
<domain>ANY-DOMAIN-TO-TEST.TLD</domain>
<destination> </destination>
<autohome>1</autohome>
</content>
</xmws>' 'http://YOUR.SENTORA.IP.HERE/api/domains'
(10-27-2016, 04:55 AM)TGates Wrote: That is probably because you are trying to use https on the IP:
instead of IP you should be using your panel's login URL (ex: http(s)://panel.domain.com). I'm not sure if this is specific to the WHMCS module or your personal setup (</xmws>' 'http://YOUR.SENTORA.IP.HERE/api/domains')Code:Caught exception: Server error response [url] https://52.37.245.73/api/domains [status code] 500 [reason phrase] Internal Server Error
, but you should always only use your panel login url for anything related to the panel (api connections, login, etc.) as explained in our docs.
Rynoxx
Your CLI code works fine, and creates a test domain under the Zadmin user with no issues
However I have setup my server so the default IP directs to a blank page, rather than the panel, which means the url at the end (http://YOUR.SENTORA.IP.HERE/api/domains) ends up being
https://panel.host4.cheap/api/domains (Which is what ends up working under the CLI)
TGates
I have changed the IP to the same url as above, and getting the same issues
Code:
Caught exception: Server error response [url] https://panel.host4.cheap/api/domains [status code] 500 [reason phrase] Internal Server Error
The user gets created properly, the domain gets added to that user account,
Then WHMCS throws the
1101 success 1101 47 expression
error, and the pending order doesnt get processed in WHMCS
Im not the expert here, but it seems to me that Sentora is crashing somewhere, and not returning the correct information to WHMCS to process, or it is returning it but WHMCS isnt processing it properly
Could the fact I have changed the default IP domain mess anything up in the code?
Where its looking for the IP rather than the host and because the panel isnt at the IP its not finding the API?
Just a thought