Pete

Well-Known Member
Dec 19, 2001
74
0
306
My system was running along just fine and then all of a sudden, while reading email, I start getting messages from my hosting machine that Apache failed...

I went in to WHM and tried starting the service from there but get the following error..

Looking up localhost Making HTTP connection to localhost Alert!: Unable to connect to remote host. lynx: Can\'t access startfile http://localhost/server-status
httpd has failed, please contact the sysadmin.

Have no idea why this would stop so suddently like this and then not be able to restart..

any Help appreciated...
 

feanor

Well-Known Member
Aug 13, 2001
835
0
316
What\'sup PETE?

Hey- to help, can you let us know what is in your /usr/local/apache/logs/error_log , when apache fails? What happens if you do a ::
/etc/rc.d/init.d/httpd startssl , from the command line as root?

If you don\'t have SSL compiled in, then
/etc/rc.d/init.d/httpd start ....

What errors do you get? And then, what is in main webserver error log at /usr/local/apache/logs/error_log ?

Peace.
 

Pete

Well-Known Member
Dec 19, 2001
74
0
306
What happens if you do a ::
/etc/rc.d/init.d/httpd startssl , from the command line as root?

I get the following error message:
[warn] NameVirtualHost xxx.xx.xx.xx:80 has no Virtual Hosts.

If you don\'t have SSL compiled in, then
/etc/rc.d/init.d/httpd start ....

NOTE: I just went back to WHM and under Account Functions clicked on Show Active/Inactive Accounts. Under Active Domains it shows hsta.darkorb.net (hsta is my machine name for the hosting machine under my domain) and the it shows ALL of the hosted accounts under Inactive Domains...

Don\'t know if this has anything to do with the problem or not - but doesn\'t sound logical to me that those domains would all become inactive all of a sudden..

I get the exact same message as above.. Naturally I substituted xxx\'s for IP address above.
 

indiboi

Well-Known Member
Aug 14, 2001
89
0
306
your /tmp parition is probably full... clear that out and then restart httpd.


run the command \"df -h\" and see if it shows your root parition as full, that\'s probably the problem.

edit to clarify:

your /tmp is probably under your root partition, mine is.

The errors you\'re describing are exactly the ones I received the other day when my /tmp was filled.
 

Pete

Well-Known Member
Dec 19, 2001
74
0
306
Sure wish it had turned out to be that simple. Cleaned out a bunch of cpaneltheme type files and tried to restart Apache but still the same errors when I try to restart at the command line..

I\'ve got three 80gig drives in that machine and highest usage is only up to 16% on / and 12% on /usr all others are at 2%..

Something NEW now though. The system just went through the Layer2 auto-update and after that I tried to restart Apache. From the command line I still get the same message, (no virtual host) but looking at the error logs now shows:
[error] (21) is a directory: could not open transfer log file /usr/local/apache/domlogs/.

Thanks right there is a . after the / above..

I think this error affects not only web server but other functions of domains as well. I tried sending mail to two addresses of different domains and it won\'t go through..

I am surprised that it appears this has not happened to anyone else before...
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
[quote:6c8448cf4c]Looking up localhost Making HTTP connection to localhost Alert!: Unable to connect to remote host. lynx: Can\'t access startfile http://localhost/ server-status[/quote:6c8448cf4c]You probably have the server-status commented in httpd.conf. Have you got these lines in it?
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from localhost
#</Location>
Simply uncomment those lines and try to restart the web server from WHM. It may give you some meaningful status (or error) messages. You could also type this from the command line while logged in to your server to get the latest status from httpd.[code:1:6c8448cf4c]lynx http://localhost/server-status[/code:1:6c8448cf4c]
[quote:6c8448cf4c]What happens if you do a ::
/etc/rc.d/init.d/httpd startssl , from the command line as root?

I get the following error message:
[warn] NameVirtualHost xxx.xx.xx.xx:80 has no Virtual Hosts. [/quote:6c8448cf4c]
Try to ensure there\'s just a single NameVirtualHost xxx.xx.xx.xx:80 in httpd.conf for the IP address in question. If you find any duplicates they can be safely deleted. This is only if you have name-based hosts under that IP address. If you have a single IP-based host for that IP address you won\'t need NameVirtualHost xxx.xx.xx.xx:80.

If any of the IP-based hosts on your server has tried to create a subdomain in Cpanel, a NameVirtualHost xxx.xx.xx.xx:80 may have been added on to httpd.conf for the subdomain which may cause the same error.
 

Pete

Well-Known Member
Dec 19, 2001
74
0
306
[quote:93f2ff0e8c]
If any of the IP-based hosts on your server has tried to create a subdomain in Cpanel, a NameVirtualHost xxx.xx.xx.xx:80 may have been added on to httpd.conf for the subdomain which may cause the same error.
[/quote:93f2ff0e8c]

Your clue here gave me an idea, so
I went thru httpd.conf line by line reading it backward line a proof-reader would. Sure enough in the listing for one of the virtual domains the domain name somehow was not indicated anywhere in the record. So what was there was:
<VirtualHost xxx.xx.xx.xx>
ServerAlias www.
ServerAdmin webmaster@
DocumentRoot /home/username/public_html
BytesLog domlogs/ -bytes_log
ServerName www.
CustomLog domlogs / combined
ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
<VirtualHost>

Once I put the domain name information back in this particular entry, Apache started and everything started working properly.

Sure hope nobody else has to go through this, but at least now they\'ll have a ton of useful information because of this thread.

I am still worried about what the cause of this was though and will have to watch the machine much closer now. I wrote up a support ticket through my distributor then called twice (from Tokyo folks) and have yet to receive a single email from them even indicating they were looking into the problem. So I thank you guys from the bottom of my heart for all your suggestions and willingness to help.
 

djstudio

Well-Known Member
Oct 23, 2002
65
0
156
for mine was,
it was the domlogs.. there wasnt a folder named domlogs so i just created it and thats okie.. but then the indexes get messed up:confused:
 
Last edited: