ispCP - Board - Support
Error adding new user - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Error adding new user (/thread-7241.html)



Error adding new user - amartin - 07-16-2009 07:56 PM

Hi,

I ran into some trouble after trying to add a new user to a freshly new installed ispCP 1.0.0 on RHEL 5. I used the CentOS guide as reference.

When I finish the last step to add the user I get an HTML page only showing the following string:
00000

Checking the domain table in the database shows that its state is "toadd". ispCP backend daemon is running.

When I log in using this user the GUI shows this message:
domain_name_here's account status is not ok!

I searched the forum and found this same problem in Freebsd.

I built PHP 5.2.10 from sources with this options:
--enable-bcmath --enable-dba --with-gd --with-ldap --enable-mbstring --with-mcrypt=/usr/local/lib --with-mysql --with-unixODBC=/usr --with-pear --with-snmp --enable-zip --with-openssl --with-pdo-mysql --with-mhash --enable-soap --enable-ftp --enable-fastcgi

I installed this perl libraries from CPAN:
BerkeleyDB-0.39
Convert-TNEF-0.17
Crypt-CBC-2.30
Crypt-DH-0.06
Net-CIDR-0.13
File-Temp-0.22
Test-Pod-1.40
IO-stringy-2.110
MailTools-2.04
MIME-Base64-3.08
MIME-tools-5.427
Convert-UUlib-1.12
Crypt-Blowfish-2.10
Net-LibIDN-0.12
Crypt-PasswdMD5-1.3
TimeDate-1.16
Net-Server-0.97
Net-CIDR-Lite-0.20
Net-Netmask-1.9015
Pod-Escapes-1.04
Pod-Simple-3.07
TermReadKey-2.30
Unix-Syslog-1.1
IO-Compress-2.020
Compress-Raw-Bzip2-2.020
Compress-Raw-Zlib-2.020
Term-ReadPassword-0.11


proftpd and awstats were installed from sources and I fixed paths in /etc/ispcp/ispcp.conf.

This is because in our environment we aren't allowed to install RPMs from unofficial sources and have to fetch software from upstream Sad

Any tip on how to trace this will be greatly appreciated.
Thanks in advance.


RE: Error adding new user - kilburn - 07-16-2009 08:02 PM

What happens if you manually call the deamon through (admin login)->tools->ispcp debugger->execute query? If this is not working, your daemon may not be running properly.

If it works, we would have to trace what happened in the add domain php page...


RE: Error adding new user - amartin - 07-16-2009 08:09 PM

(07-16-2009 08:02 PM)kilburn Wrote:  What happens if you manually call the deamon through (admin login)->tools->ispcp debugger->execute query? If this is not working, your daemon may not be running properly.

If it works, we would have to trace what happened in the add domain php page...

I get a blank page. Symptoms described above are the same.

I attached strace to ispcp_daemon PID and its output is:

accept(0,

No matter how many times I try executing the requests through the GUI, the output of strace doesn't change.
I enabled debug mode and run /var/www/ispcp/engine/ispcp-rqst-mngr manually.

...
DEBUG: push_el() sub_name: mngr_start_up(), msg: Starting...
DEBUG: push_el() sub_name: mngr_start_up(), msg: Ending...
DEBUG: push_el() sub_name: mngr_engine(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: mngr_engine(), msg: processing 1, trial.hosting.net, toadd.
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/var/www/ispcp/engine/ispcp-dmn-mngr 1 1>/var/log/ispcp/ispcp-dmn-mngr.stdout 2>/var/log/ispcp/ispcp-dmn-mngr.stderr'), msg: Ending...
DEBUG: push_el() sub_name: mngr_engine(), msg: processing 2, foobar.hosting.net, toadd.
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/var/www/ispcp/engine/ispcp-dmn-mngr 2 1>/var/log/ispcp/ispcp-dmn-mngr.stdout 2>/var/log/ispcp/ispcp-dmn-mngr.stderr'), msg: Ending...
...

Domains got added and apache domain config files were created under /etc/httpd/conf/ispcp and virtual host entries are displayed now inside /etc/httpd/vhosts/ispcp.conf.

Confused... How did running ispcp-rqst-mngr solve the problem?
Thanks.


RE: Error adding new user - kilburn - 07-17-2009 04:51 AM

The only task of the daemon is to run ispcp-rqst-mngr, so manually running it you've performed the daemon's task. Thus, everything went right and your domains got configured correctly.

This division allows the frontend (gui) to run as an unprivileged user (vu2000), but with the ability to fire the backend (ispcp-rqst-mngr) which needs root privileges. This "fire" step is done through a tcp connection to the daemon that runs as root, and asking it to launch the backend.

Now, as the daemon isn't getting any connection attempt, this probably means that your php lacks socket support, and thus the gui cannot connect to the daemon. Check your phpinfo() to confirm if this is the case...


RE: Error adding new user - amartin - 07-17-2009 05:36 PM

(07-17-2009 04:51 AM)kilburn Wrote:  The only task of the daemon is to run ispcp-rqst-mngr, so manually running it you've performed the daemon's task. Thus, everything went right and your domains got configured correctly.

This division allows the frontend (gui) to run as an unprivileged user (vu2000), but with the ability to fire the backend (ispcp-rqst-mngr) which needs root privileges. This "fire" step is done through a tcp connection to the daemon that runs as root, and asking it to launch the backend.

Now, as the daemon isn't getting any connection attempt, this probably means that your php lacks socket support, and thus the gui cannot connect to the daemon. Check your phpinfo() to confirm if this is the case...

You really hit the spot! I enabled socket support in PHP and everything works like a charm. When I finish my setup and have time I'll write an article in your wiki. It might be useful to BSD people since I'm building many components from sources.

Thanks so much!


RE: Error adding new user - kilburn - 07-17-2009 07:47 PM

You're welcome! It would be REALLY GREAT if you can document the procedure! Smile