Web Hosting Talk







View Full Version : Newbie - Got apache error on fresh server


l0ck_up
08-25-2004, 01:46 PM
I got error on WHM like this :"Unable to obtain apache version information. Your apache server at xxx.xxx.xxx.xxxx may be down, or unreachable."
I have submit tickets but the answers didn't solve the problem.
This error exist since the first time i got this server, is this usual, or just me?
What should I do? Rebuild the apache?

It can't be restarted from WHM or SSH

Could you help me out guys?

FYI I use CentOS with Cpanel/WHM

Thanks

Angelo
08-25-2004, 05:16 PM
What error it is giving when tried to restart it from SSH, and what is the error log saying?

Ramprage
08-25-2004, 05:17 PM
If it's a new box you should do /scripts/easyapache regardless to make sure you have the latest version and to customize it to your needs.

gate2vn
08-25-2004, 08:05 PM
Originally posted by l0ck_up
[B]I got error on WHM like this :"Unable to obtain apache version information. Your apache server at xxx.xxx.xxx.xxxx may be down, or unreachable."


I see this error in WHM sometimes. But you still can access your site, is that right? Try to rebuild apache and update your WHM first. let us know if it's solved

l0ck_up
08-26-2004, 02:51 AM
fcarsenal:
This is what I had when I tried to restart Apache :" root@ns1 [~]# service httpd start
/etc/init.d/httpd: line 89: /usr/local/apache/bin/httpd: No such file or directory
/etc/init.d/httpd start: httpd could not be started
"
==================
Ramprage:
I've done /scripts/easyapache, and I got this :"root@ns1 [~]# /scripts/easyapache
--01:48:06-- http://layer1.cpanel.net/buildapache.sea
=> `buildapache.sea'
Resolving layer1.cpanel.net... failed: Host not found.
buildapache.sea: buildapache.sea: No such file or directory
Waiting for httpd to restart..............finished.


httpd has failed, please contact the sysadmin.
"
============

gate2vn:
I can't access the site, I have tried to update the WHM as well and nothing happened.

So guys what should I do?

Thanks before

l0ck_up
08-26-2004, 02:56 AM
Also FYI, the WHM runs very slow, and now I got this :"Unable to fetch Web Host Manager Security News. The News server may be down or unreachable"
the apache error not previewed, but the error still there. I knew because in the service status it's still "failed"
and now I can't ping to my server but I can access the WHM, my IP is 67.18.146.194 if you wanna try.

Thanks

Steven
08-26-2004, 03:00 AM
Sounds like there is a bunch of errors here.

/scripts/upcp --force
/scripts/fixnamed
/scripts/fixndc
/scripts/fixndc
/sbin/service named restart

edit /etc/resolv.conf and make the nameserver 127.0.0.1 after you make sure named is running.

run easyapache again selecting option 1

l0ck_up
08-26-2004, 03:11 AM
Originally posted by thelinuxguy
Sounds like there is a bunch of errors here.

/scripts/upcp --force
/scripts/fixnamed
/scripts/fixndc
/scripts/fixndc
/sbin/service named restart
edit /etc/resolv.conf and make the nameserver 127.0.0.1 after you make sure named is running.

run easyapache again selecting option 1

sbin/service named restart-->> this command not completely succeed, returned:
root@ns1 [~]# /sbin/service named restart
Stopping named: rndc: connect failed: connection refused
[FAILED]
Starting named: [ OK ]

Should I go with next step?

Steven
08-26-2004, 03:12 AM
ok

open two ssh windows in one window issue this command:

tail -f /var/log/messages

in the second window issue:

/sbin/service named restart

paste the output from tail -f /var/log/messages here.

l0ck_up
08-26-2004, 03:22 AM
this is the output:

Aug 26 02:21:52 ns1 named: named shutdown failed
Aug 26 02:21:54 ns1 named[23129]: starting BIND 9.2.2 -u named
Aug 26 02:21:54 ns1 named: named startup succeeded
Aug 26 02:21:54 ns1 named[23129]: using 1 CPU
Aug 26 02:21:54 ns1 named[23129]: loading configuration from '/etc/named.conf'
Aug 26 02:21:54 ns1 named[23129]: no IPv6 interfaces found
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface eth0, 67.18.146.194#53
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface eth0:1, 67.18.146.195#53
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface eth0:2, 67.18.146.196#53
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface eth0:3, 67.18.146.197#53
Aug 26 02:21:54 ns1 named[23129]: listening on IPv4 interface eth0:4, 67.18.146.198#53
Aug 26 02:21:54 ns1 named[23129]: command channel listening on 127.0.0.1#953
Aug 26 02:21:54 ns1 named[23129]: zone ns1.digitalvisi.com/IN: loaded serial 2004082501
Aug 26 02:21:55 ns1 named[23129]: zone ns2.digitalvisi.com/IN: loaded serial 2004082501
Aug 26 02:21:55 ns1 named[23129]: zone fantastico.do.not.del/IN: loaded serial 2004082501
Aug 26 02:21:55 ns1 named[23129]: running
Aug 26 02:21:56 ns1 named[23129]: zone fantastico.do.not.del/IN: sending notifies (serial 2004082501)

Steven
08-26-2004, 03:25 AM
/me scratches head


ps aux | grep named

l0ck_up
08-26-2004, 03:39 AM
root 23315 0.0 0.0 3680 652 pts/0 S 02:38 0:00 grep named

Steven
08-26-2004, 03:50 AM
cat /etc/named.conf | grep rndc

and

cat /etc/rndc.conf | grep rndc

l0ck_up
08-26-2004, 04:01 AM
root@ns1 [~]# cat /etc/named.conf | grep rndc
key "rndc-key" {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
root@ns1 [~]# cat /etc/rndc.conf | grep rndc
# Start of rndc.conf
key "rndc-key" {
default-key "rndc-key";
# End of rndc.conf
# key "rndc-key" {
# allow { 127.0.0.1; } keys { "rndc-key"; };

Steven
08-26-2004, 04:06 AM
Did you run

/scripts/fixnamed
/scripts/fixndc

l0ck_up
08-26-2004, 04:13 AM
yup...I did...
it returned like this :

root@ns1 [~]# /scripts/fixnamed
root@ns1 [~]# /scripts/fixndc
Fixndc using rh9/rhes3/fedora support
Found key in named.conf ..
Found controls in named.conf ..
named.conf has already been fixed!

l0ck_up
08-26-2004, 01:35 PM
I get this now, when I tried to start apache:

[Thu Aug 26 12:32:54 2004] [error] VirtualHost 67.18.146.194:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Aug 26 12:32:54 2004] [error] VirtualHost 67.18.146.194:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
/etc/init.d/httpd start: httpd started

Any suggestions?

Thanks

gate2vn
08-26-2004, 07:43 PM
edit your httpd.conf at that line

l0ck_up
08-27-2004, 12:14 AM
now I get this:

root@ns1 [~]# service httpd stop
/etc/init.d/httpd stop: httpd (no pid file) not running
root@ns1 [~]# service httpd start
/etc/init.d/httpd start: httpd started

l0ck_up
08-27-2004, 12:16 AM
FYI, the site still not up :(

Any suggestions?

VapoRub
08-27-2004, 02:32 AM
root@ns1 [~]# cat /etc/named.conf | grep rndc
key "rndc-key" {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
root@ns1 [~]# cat /etc/rndc.conf | grep rndc
# Start of rndc.conf
key "rndc-key" {
default-key "rndc-key";
# End of rndc.conf
# key "rndc-key" {
# allow { 127.0.0.1; } keys { "rndc-key"; };
--------------------------------------------------

In named.conf,
change rndc-key to rndckey

and in rndc.conf
change
key "rndc-key" {
default-key "rndc-key";

to

key "rndckey" {
default-key "rndckey";

restart named and that should fix your problem for ndc:connection refused

--------------------------------------------------------
root@ns1 [~]# service httpd stop
/etc/init.d/httpd stop: httpd (no pid file) not running
root@ns1 [~]# service httpd start
/etc/init.d/httpd start: httpd started
--------------------------------------------------------

shutdown -r now or if you can get into whm, do a graceful restart.

l0ck_up
08-27-2004, 02:55 AM
I have done the last command from SSH and WHM..but nothing happen, still get the same messages...(no pid file) :(

VapoRub
08-27-2004, 02:59 AM
so whats running and whats not?

l0ck_up
08-27-2004, 03:07 AM
The apache still not up, on WHM I'm still get apache error and failed on service status

gate2vn
08-27-2004, 08:16 AM
have you tried to rebuild apache with the first option? /scripts/easyapache

Ramprage
08-27-2004, 08:38 AM
Yes he already tried the easyapache but it failed to find the files and connect. What you can do is this:

apachectl configtest

It should output any errors in your httpd.conf configuration.

l0ck_up
08-27-2004, 08:38 AM
Originally posted by gate2vn
have you tried to rebuild apache with the first option? /scripts/easyapache

Yes, 3 times and didn't give me solution :(

l0ck_up
08-27-2004, 08:48 AM
hmm..the provider promise me to reimage my server but with different OS, it was CentOS and now they'll use Fedora, hope everything's gonna be ok.

pizzaboy_au
08-27-2004, 12:39 PM
The problem with apache was that the httpd.conf file had only 20 lines of code in it. It did not have the most important instructions for apache to run.

I was guessing that when i tried recompiling apache for l0ck_up it failed building it due to the above problem.

l0ck_up
08-27-2004, 01:22 PM
Yes, you're right diBellaweb, but I didn't realize that until when I was trying to find KeepAlive from httpd.conf and couldn't find it.
So i guessed something missing here, but still I was not sure coz I thought CentOs has different setting or files ( /me so stupid)

they tried to reimage the server, seems server is up now but they don't contact me or give me the password, coz the old password don't work. Still can't be sure if the problem solved or not.

Ramprage
08-28-2004, 02:49 AM
Send them a ticket asking for your passwords. Have you tried the apachectl configtest command I suggested?

Also try to download the Apache.sea file from:
http://layer1.cpanel.net

l0ck_up
08-28-2004, 03:17 AM
they reset the password, I can login to SSH, another problem comes up :
service named start/stop/restart didn't work at all, no error, nothing happened when I typed that.
I checked /scripts/fixnamed, then I realize that directory /scripts doesn't exist.
WHM doesn't work as well, I put tickets and no one answer me :(

FYI seems I use Fedora now, and apache works fine now.