Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
10-27-2016, 08:37 AM
(10-26-2016, 09:05 PM)Rynoxx Wrote: (10-25-2016, 11:24 AM)pomtom44 Wrote: (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 @[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)
Code: 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'
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 installation
(10-27-2016, 04:55 AM)TGates Wrote: That is probably because you are trying to use https on the IP:
Code: Caught exception: Server error response [url] https://52.37.245.73/api/domains [status code] 500 [reason phrase] Internal Server Error
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')
, 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
Posts: 114
Threads: 1
Joined: Apr 2015
Reputation:
11
Sex: Male
Thanks: 19
Given 31 thank(s) in 24 post(s)
RE: [MODULE] WHMCS
10-27-2016, 05:40 PM
(10-27-2016, 08:37 AM)pomtom44 Wrote: (10-26-2016, 09:05 PM)Rynoxx 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)
Code: 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'
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 installation
(10-27-2016, 04:55 AM)TGates Wrote: That is probably because you are trying to use https on the IP:
Code: Caught exception: Server error response [url] https://52.37.245.73/api/domains [status code] 500 [reason phrase] Internal Server Error
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')
, 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
pomtom44 The fact that it works when you run the thing in the CLI which I sent indicates that the error is caused by the WHMCS part of the module calling the Sentora API in a way which makes it error.
I'll further investigate the problem and see if I can find a way to reproduce it on my installation and try fixing it from there.
Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
10-27-2016, 07:33 PM
(10-27-2016, 05:40 PM)Rynoxx Wrote: @[pomtom44] The fact that it works when you run the thing in the CLI which I sent indicates that the error is caused by the WHMCS part of the module calling the Sentora API in a way which makes it error.
I'll further investigate the problem and see if I can find a way to reproduce it on my installation and try fixing it from there.
Rynoxx
Let me know if you need any more logs or testing my end
and ill keep poking around myself see if I can find anything which could help
Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
11-15-2016, 03:49 PM
(10-27-2016, 07:33 PM)pomtom44 Wrote: (10-27-2016, 05:40 PM)Rynoxx Wrote: @[pomtom44] The fact that it works when you run the thing in the CLI which I sent indicates that the error is caused by the WHMCS part of the module calling the Sentora API in a way which makes it error.
I'll further investigate the problem and see if I can find a way to reproduce it on my installation and try fixing it from there.
Rynoxx
Let me know if you need any more logs or testing my end
and ill keep poking around myself see if I can find anything which could help
Sorry to bother you again Rynoxx
Just wondering if you have made any progress in this?
Thanks
Posts: 114
Threads: 1
Joined: Apr 2015
Reputation:
11
Sex: Male
Thanks: 19
Given 31 thank(s) in 24 post(s)
RE: [MODULE] WHMCS
11-15-2016, 06:34 PM
(11-15-2016, 03:49 PM)pomtom44 Wrote: (10-27-2016, 07:33 PM)pomtom44 Wrote: (10-27-2016, 05:40 PM)Rynoxx Wrote: pomtom44 The fact that it works when you run the thing in the CLI which I sent indicates that the error is caused by the WHMCS part of the module calling the Sentora API in a way which makes it error.
I'll further investigate the problem and see if I can find a way to reproduce it on my installation and try fixing it from there.
@[Rynoxx]
Let me know if you need any more logs or testing my end
and ill keep poking around myself see if I can find anything which could help
Sorry to bother you again @[Rynoxx]
Just wondering if you have made any progress in this?
Thanks
pomtom44 Hey, sorry for the lack of updates, been meaning to post for a while but I've been quite busy :p
So far I've got no progress, would you mind trying with the latest version of the module again or trying to reinstall either your whole OS or WHMCS and Sentora. As I can't seem to be able to reproduce the problem on my server :p
Also, what are the settings you have set for the product in WHMCS?
Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
11-16-2016, 12:40 PM
(11-15-2016, 06:34 PM)Rynoxx Wrote: (11-15-2016, 03:49 PM)pomtom44 Wrote: (10-27-2016, 07:33 PM)pomtom44 Wrote: (10-27-2016, 05:40 PM)Rynoxx Wrote: @[pomtom44] The fact that it works when you run the thing in the CLI which I sent indicates that the error is caused by the WHMCS part of the module calling the Sentora API in a way which makes it error.
I'll further investigate the problem and see if I can find a way to reproduce it on my installation and try fixing it from there.
Rynoxx
Let me know if you need any more logs or testing my end
and ill keep poking around myself see if I can find anything which could help
Sorry to bother you again Rynoxx
Just wondering if you have made any progress in this?
Thanks
@[pomtom44] Hey, sorry for the lack of updates, been meaning to post for a while but I've been quite busy :p
So far I've got no progress, would you mind trying with the latest version of the module again or trying to reinstall either your whole OS or WHMCS and Sentora. As I can't seem to be able to reproduce the problem on my server :p
Also, what are the settings you have set for the product in WHMCS?
Rynoxx
I shall try a complete fresh re-install over the weekend and see if that fixes anything
Will keep you updated
Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
11-19-2016, 08:43 PM
Rynoxx
Ok heres a question you may not be able to answer, but TGates Might
I was re-installing sentora, and was comparing the fresh download files to the exsisting ones,
Just to see if anything jumped out as broken or missing, and to find little bits of custom code I have added myself
(And before you say anything about this breaking it, it was small things like LetsEncrypt auto scripting)
While comparing files I found a few with slight changes in the code, fair enough as it gets updated and small things change,
But then I found sections of code like below which are just completely different or missing
I assume this is ok as it is a fresh install, but thought it would be safer to check why the large block on the right (The original code) is missing from the fresh install?
Thanks
Posts: 3 ,663
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: [MODULE] WHMCS
11-20-2016, 06:17 AM
Me.B may remember what happened. I couldn't find anything on GitHub. I reviewed it against my working copy and it differs from both of those copies. This is usual with my install as I have manually added new code direct from GitHub to test on my machine instead of re-installing everything.
-TGates - Project Council
SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE
Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: [MODULE] WHMCS
11-20-2016, 07:17 AM
did you get the files from master? Or from the tag.
When we do a release we tag the branch to freeze it and freeze the installer too so there would be no change if you pick http://sentora.org/install
M B
Posts: 38
Threads: 3
Joined: May 2016
Reputation:
0
Sex: Undisclosed
Thanks: 0
Given 1 thank(s) in 1 post(s)
RE: [MODULE] WHMCS
11-20-2016, 10:26 AM
(11-20-2016, 07:17 AM)Me.B Wrote: did you get the files from master? Or from the tag.
When we do a release we tag the branch to freeze it and freeze the installer too so there would be no change if you pick http://sentora.org/install
M B
I just followed the instructions here
http://docs.sentora.org/?node=22
Primarily this line
bash <(curl -L -Ss http://sentora.org/install)
|