Jump to content
  • 0

Cpanel Problem


Moby2000

Question

Hi Guys

 

Been working on my Blesta install and thought i'd got everything sorted, but i've just started to import my customers manually and have come across this error whilst trying to confirm the order,

"No host defined on line 237 in /home/wnlocalc/public_html/client-area/components/modules/cpanel/apis/cpanel_api.php".

I re-installed the cPanel module and it gives a tick when i input the settings for my WHM account so it seems to be connecting to the server Ok.

I even tried to create an account on the client side and it's giving me the same error?

I know this is something i've done or not done because i've had it working before. but i got my new licence and now i'm having great fun setting up Blesta.

 

Any ideas would be appreciated.

 

Steve

Link to comment
Share on other sites

Recommended Posts

  • 0

Hi Cubic  Good to see you again

 

Blimey i've got that many windows open i lost it for a minute lol

It has this Stack trace attatched

 

#0 /home/wnlocalc/public_html/client-area/components/modules/cpanel/cpanel.php(1412): CpanelApi->__construct(NULL)
#1 /home/wnlocalc/public_html/client-area/components/modules/cpanel/cpanel.php(775): Cpanel->getApi(NULL, NULL, NULL, NULL)
#2 /home/wnlocalc/public_html/client-area/app/models/services.php(748): Cpanel->addService(Object(stdClass), Array, NULL, NULL, 'pending')
#3 /home/wnlocalc/public_html/client-area/plugins/order/models/order_orders.php(371): Services->add(Array, Array, false)
#4 /home/wnlocalc/public_html/client-area/plugins/order/models/order_orders.php(235): OrderOrders->addService(Array, Array, Array, NULL)
#5 /home/wnlocalc/public_html/client-area/plugins/order/controllers/main.php(503): OrderOrders->add(Array, Array)
#6 /home/wnlocalc/public_html/client-area/lib/dispatcher.php(111): Main->checkout()
#7 /home/wnlocalc/public_html/client-area/index.php(21): Dispatcher::dispatch('/client-area/pl...')
#8 {main}

 

Steve

Link to comment
Share on other sites

  • 0

I'm on a reseller account  using Blesta 3.0.2.

I just had a thought also...

It was working before I did the upgrade from 3.0 to 3.0.2 ?

Maybe a settings changed somehow, i had to upgrade the modules and plugins when i did the upgrade.

 

I've also tried to create a client package without the cPanel module and it's still giving the error.

Link to comment
Share on other sites

  • 0

Well i'm stumped ?

I've tried everything I can think of still the same problem.

Double checked the settings against my WHMCS settings and they are the same.

 

I don't understand how it's saying "No host defined " when it's actually showing the number of accounts in my WHM so it must be connecting to the server.

 

Steve

Link to comment
Share on other sites

  • 0

Ok...

After being up half  the night re-installing Blesta and still getting the same error, And launching my laptop through the window! (Not really but I felt like it) lol

 

I found the problem.... It's the server group.

I don't know if this is a bug or what but I had my WHM server in a Server group called "shared-hosting" which i was under the impression was the right thing to do.

I finally deleted the server group and reset my packages to use "Any" instead of the server group  and it works?? Everything passes through the API correctly.

So if anyone else is or finds they have the same problem leave your server out of a group and see if that works.

------> Going back to bed to reset my brain to idiot mode.

 

Steve

Link to comment
Share on other sites

  • 0

It has this Stack trace attatched

 

#0 /home/wnlocalc/public_html/client-area/components/modules/cpanel/cpanel.php(1412): CpanelApi->__construct(NULL)

#1 /home/wnlocalc/public_html/client-area/components/modules/cpanel/cpanel.php(775): Cpanel->getApi(NULL, NULL, NULL, NULL)

 

These null values led to you receiving the "No host defined" error, which stems from the module row meta data being used. If your servers are apart of a group, check that each server has been saved with valid meta data information (i.e. host name, username, remote key, etc.).

 

Do you experience the same error when you use a server group that contains only 1 server? If so, does the error occur when setting the package to specifically use that server?

Link to comment
Share on other sites

  • 0

Hi Tyson

 

Sorry for the late reply i have just arrived back off holiday.

The error happens when you only have one server group defined with one named server, I haven't tried it with multiple servers only having the one.

Yes the error occurs when you specify the actual named server.

 

Steve

Link to comment
Share on other sites

  • 0

Did you ever happen to uninstall the cPanel module? I wonder if packages that were using it are no longer referencing the same module row. Have you tried to re-save the module settings, and the package(s) you're using for that module to see if that resolves the issue?

Link to comment
Share on other sites

  • 0

Hi Again Tyson

 

Just added a server group called Hosting, added the server again, then tried to creat a client package through the admin panel and still getting the same error as above.

Deleted the server group and changed the package to "Any" again and the service was created.

 

To be quite honest Tyson when you think about it, it makes sense when you only have one server or a reseller account, does it need to be in a group?

Logically the system is acting correctly by not detecting any other servers or IP addresses.... does that make sense?

 

 

Steve

Link to comment
Share on other sites

  • 0

I don't see anything since beta that may have affected this. Very little has changed, and I'm not able to duplicate the issue on our servers. If you can provide very detailed steps on setting up the module row settings, creating the package, package group, and how you attempted to create the service using that package which leads to the 'No host defined' error, then we may find something that is being overlooked.

 

And if anyone else experiencing this issue can do the same, that would be helpful.

Link to comment
Share on other sites

  • 0

Hi,

 

I can confirm this error also.

 

Steps taken which gave the same error as OP.

 

--> Installed cPanel Module

--> Added server

--> Added Server Group

--> Created a package + Group

--> Created an order form and added the group to the order form + payment (paypal)

--> logged out of Blesta (copied the order form link)

--> Followed the steps to placing an order. including the creation of a new user.

--> At checkout the OP error appears.

 

How did it work was by skipping the 3 step.

--> Installed cPanel Module

--> Added server

--> Added Server Group

--> Created a package + Group

--> Created an order form and added the group to the order form + payment (paypal)

--> logged out of Blesta (copied the order form link)

--> Followed the steps to placing an order. including the creation of a new user.

--> At checkout successfully

-->made payment using the sandbox for Paypal.

Link to comment
Share on other sites

  • 0

Hi All !

 

Sorry for not getting back sooner busy at work (Run up to Christmas)

 

Exactly the same as Hostlumina.

But now i have just upgraded to 3.0.5 and tried it again... same results.

So tried resetting back to where i was before and now it's not letting me delete the server group  message: 

"The group can not be deleted because it belongs to one or more packages."

 

Tried to delete my Basic Package  (which i used for the trial) and cannot delete the package, got this error message: 

"The package could not be deleted because a service is currently using it."

Upgraded the clients on the basic package to a higher one to free the service and still cannot delete the package or the server group.

So i'm goint to re-install again using the full 3.0.5 download and start again.

I'm a great believer in if you bugger it up the best way to learn is start afresh lol..

 

Steve

Link to comment
Share on other sites

  • 0

I was able to duplicate this issue, and it looks like a couple minor issues worked together to cause it.

 

  1. When you assign a server to a server group with the cPanel module, you need to assign it from right to left. If you don't assign a server, the server group uses none, and would be unusable with packages.
     
  2. However, when you create a package, the "Server Group" field is initally "Any", which loads your cPanel server, and sets a valid value for the "cPanel Package" field. When you change to a specific "Server Group", the module options should reload using a server from that specific server group. But due to #1, if you do not have a server assigned to the group, a separate error occurs, preventing the AJAX request from completing. This, then, does not update the module option fields as it should, and so you are allowed to save your package with a "cPanel Package" unavailable to the server group. Because no module is actually being used (none are assigned to the group), you get a "No host defined" error when trying to create a service.

 

This is now fixed in CORE-789 for v3.0.8.

Link to comment
Share on other sites

  • 0

I was able to duplicate this issue, and it looks like a couple minor issues worked together to cause it.

  • When you assign a server to a server group with the cPanel module, you need to assign it from right to left. If you don't assign a server, the server group uses none, and would be unusable with packages.

  • However, when you create a package, the "Server Group" field is initally "Any", which loads your cPanel server, and sets a valid value for the "cPanel Package" field. When you change to a specific "Server Group", the module options should reload using a server from that specific server group. But due to #1, if you do not have a server assigned to the group, a separate error occurs, preventing the AJAX request from completing. This, then, does not update the module option fields as it should, and so you are allowed to save your package with a "cPanel Package" unavailable to the server group. Because no module is actually being used (none are assigned to the group), you get a "No host defined" error when trying to create a service.

This is now fixed in CORE-789 for v3.0.8.

Will this fix carry over to 3.1.0 b2 as well?

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...