• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Domain add hangup at cmdline

P

Paul Trost

Guest
I'm seeing a problem added domains at the commandline. This is not a Plesk 9.5.1 specific problem as I saw it on 9.3.0 and 9.2.2 before upgrading those 2 servers as well. If I run the following command (which I've sanitized) it never returns any output and never completes. However, I can add domains through the Plesk CP gui just fine. The problem script is /usr/local/psa/bin/domain. Anything that depends on this script hangs running at the shell:


/usr/local/psa/bin/domain -c domain.com -hosting true -hst_type phys -ip 216.39.xxx.xxx -login domain -passwd 123456 -hard_quota 3G -fp false -fp_ssl false -fpauth false -fplogin webmaster -fppasswd 123456 -cgi true -php true -perl true -python true -webstat true -err_docs true -log_rotate true -log_bytime monthly -clogin hostingpro -ssi true -asp true -fastcgi true -miva true -webstat-protdir-access true -template Pro

or

/usr/local/psa/bin/domain --off domain.com


The domain create command gets as far as the create and it puts the domain in the proper client (-clogin hostingpro), but never configures the hosting. if you pull it up in the CP you have to go to web hosting settings and finish the hosting config.

This used to work fine on both servers but I'm not sure at what point they stopped working. Has anyone seen this before and been able to diagnose?
 
I did some minor modifications of your sample and it works fine for me:

# /usr/local/psa/bin/domain -c domain34r.com -hosting true -hst_type phys -ip 10.55.62.14 -login domain -passwd 123456 -hard_quota 3G -fp false -fp_ssl false -fpauth false -fplogin webmaster -fppasswd 123456 -cgi true -php true -perl true -python true -webstat true -err_docs true -log_rotate true -log_bytime monthly -clogin ib19638 -ssi true -asp true -fastcgi true -miva true -webstat-protdir-access true
WARNING: Option "-hard_quota" is ignored: hard disk quota is not supported
WARNING: The component Miva support was not installed
usermng: PAM Error: BAD PASSWORD: it is too simplistic/systematic
PAM Error End
SUCCESS: Creation of domain 'domain34r.com' complete.

As you can see only template was not defined. And really - why you have defined all these settings if they are already defined in Pro template?
 
I tried taking the template off as in your example, but it still sits there indefinitely when run.

/usr/local/psa/bin/domain -c domain34r.com -hosting true -hst_type phys -ip 216.39.xxx.xxx -login domain -passwd 123456 -hard_quota 3G -fp false -fp_ssl false -fpauth false -fplogin webmaster -fppasswd 123456 -cgi true -php true -perl true -python true -webstat true -err_docs true -log_rotate true -log_bytime monthly -clogin hostingpro -ssi true -asp true -fastcgi true -miva true -webstat-protdir-access true


I then tried the following, taking off the specified parameters as you suggested and the behavior was the same, the domain for created but the cmd sits there and Plesk never gets past putting in the hosting parameters, just like iin the original line

/usr/local/psa/bin/domain -c domain34r.com -hosting true -hst_type phys -ip 216.39.xxx.xxx -login domain -passwd 123456 -clogin hostingpro -template Pro


But regardless of the domain creation issue, even when just turning a domain off, the domain script gets as far as marking the domain active or suspended in the CP interface but not changing the config to disallow serving of the site. It sits there indefinitely until killed:

/usr/local/psa/bin/domain --off domain.com

Interestingly though, on the 2nd server, domain --off or --on fully completes, just not on the 1st server. But domain creation still sits indefinitely on both servers.

Igor is there anyway to get more output to see why it's not completing or do I need to have Support access the servers and look at them?
 
Seems it is require a much more deep investigation with reading logs, stracing, etc. Therefore I suggest you contact support team. It would be much more faster and effective I think.
 
Solved

Just so everyone knows what the answer was. I had multiple commands defined in an event handler. Eg. in a handler for domain suspension I had defined:

"/etc/init.d/httpd reload && /etc/init.d/qmail reload"

The second command in the event handler wouldn't even run, so the commands just hung at the command line. Separating this out into two event handlers, one for httpd reload and another for qmail reload did the trick!
 
Back
Top