• 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

Unable to start Apache

A

anjanesh

Guest
Hi

I used domain.sh to create many domains in SSH.

Code:
usr/local/psa/bin/domain.sh --create "My-Domain.com" -clogin "clientlogin" -ip "x.x.x.x" -login "username" -passwd "password" -hosting true -webstat true
I had a file containing some 500+ of these lines.

Now Apache is not starting for some reason.
I didnt stop Apache but I guess it got stopped after this because Apache was not running anymore and service httpd start was failing.
Code:
[root@myserver www]# cat /var/log/httpd/error_log
Unable to open logs
Unable to open logs
Unable to open logs
[root@myserver www]#
I dont understand what logs it isnt able to open.
Code:
[root@myserver www]# ls -l /var/log/httpd
total 40
-rw-r--r--  1 root root    0 Nov 20 06:02 access_log
-rw-r--r--  1 root root 2454 Nov 18 23:16 access_log.1
-rw-r--r--  1 root root   60 Jan  3 03:39 error_log
-rw-r--r--  1 root root  160 Dec 30 17:18 error_log.1
-rw-r--r--  1 root root   20 Dec 30 14:19 error_log.2
-rw-r--r--  1 root root    0 Dec 30 14:49 error_log.3
-rw-r--r--  1 root root 2394 Nov 27 06:02 error_log.4
-rw-r--r--  1 root root    0 Nov 18 15:40 ssl_access_log
-rw-r--r--  1 root root    0 Dec 31 06:02 ssl_error_log
-rw-r--r--  1 root root  882 Dec 31 04:53 ssl_error_log.1
-rw-r--r--  1 root root  378 Nov 26 07:21 ssl_error_log.2
-rw-r--r--  1 root root 2268 Nov 20 03:50 ssl_error_log.3
-rw-r--r--  1 root root    0 Nov 18 15:40 ssl_request_log
[root@myserver www]#
Code:
[root@myserver /]# myserver -l /var/www/vhosts/My-Domain.com/statistics/logs
total 100
-rw-r--r--  1 root root     0 Jan  2 04:07 access_log
-rw-r--r--  1 root root 93663 Dec 31 06:07 access_log.processed
-rw-r--r--  1 root root     0 Jan  3 03:28 error_log
-rw-r--r--  1 root root     0 Jan  2 04:07 xferlog_regular
-rw-r--r--  1 root root   509 Dec 31 04:07 xferlog_regular.processed
[root@myserver /]#

Please help.
 
OS : Linux 2.6.10-1.771_FC2smp
Plesk : psa v7.5.4_build75050926.17 os_FedoraCore 2
Apache 2.0.51

Isnt the version of Apache latest enough ?
 
So this issue arises because of too many domain names added ?
 
Yep. It's not really a problem if you're comfortable rebuilding the few packages mentioned in the above article, or getting someone to do it for you.
 
BTW, I was removing domains - 100 at a time - using Plesk Web interface.
The 1st 100 got deleted but while I was deleting the second 100, my browser (FireFox 1.5) crashed. I had to restart FireFox and login to Plesk but when I tried deleting, I get the error msg :
Code:
Unable to create Domain object: Domain: unable to select: no such row in the table
0: /usr/local/psa/admin/htdocs/domains/removeDomains.php3:36 psaerror(string "Unable to create Domain object: Domain: unable to select: no such row in the table")
How do I finx this now ?

Thanks
 
When deleting so many I'd advise using shell, it won't crash as easy as your browser. Delete them in smaller batches until you find the problem domain.

Are you deleting every domain from the server, then adding some again? If so, it may be easier/quicker to uninstall plesk, drop psa database, then install again. Otherwise, we'll need to manually repair psa database by adding/removing rows where there are inconsistencies.
 
From 720 domains, I deleted 420 - remaining 300 - all of a sudden apache starts -and i never started it - just typed the url and it back.

Whats the current limit for the current config ?

And what do I got to tell my hosting provider so that these changes can be made ?
Recompile Apache, SSL, PHP, MySQL etc etc ?
 
I'd recommend PHP4 over PHP5 for plesk compatability as PHP5 isn't officially supported.
 
If you give your provider the URL to the FAQ they should be able to figure that out for you.

When apache runs it opens all logfiles and keeps them open. You're probably on 1024 open file limit, so divide 1024 by the number of logfiles. It's approx 500 domains.
 
Cranky - thanks for all your help - the kb article was the ultimate solution to all my problems.

I just dont understand how this is not mentioned in setup or elsewhere - otherwise how would others so easily setup 500+ domains using Plesk + Server default settings ?

Thanks again !
 
It's not a Plesk problem, it's caused by the way fedora project built the packages they release.
 
Back
Top