How to fix a fault with apache in SUN server


 
Thread Tools Search this Thread
Operating Systems Solaris How to fix a fault with apache in SUN server
# 22  
Old 05-15-2008
You first said when you try to surf to yur url you get 404 error.

I told you to telnet localhost 80 GET / but you told me no error in the ascii output. And you also said socket cannot bind to port 80. So I really assumed that another webprocess started up before apache did. Because when you telnet to port 80 and GET / if you dun see an ascii output of the error page that means port 80 is really in use and a webserver is running. But you never pasted the output here so I assumed you don't want to reveal too much info abt your site, fair enuf, thats why I told you to go into /etc/init.d directories to do a quick check to see if there is a startup script for another possible http webserver application.

I'm assuming here that your apache installation is 100% perfect and that you previously able to bring up and use your webserver but now couldn't probably due to some network related or config issue which causing your problem. if my assumption is wrong you better say so because from what I gather you dun seem to know very much abt the server you are managing even when I told you to grep you use a non-root account to do it which strikes me as quite odd.

anyway I'm thinking 2 more possibilities here.

Go to your webserver, open up the web browser on the server and type http://localhost

and see what you get? Do you see your webpage or do you see another webpage?

The other one is quite remote but sometimes can be affected. Clear your browser cache delete all the cookies or go to another PC and try to surf to the website.
# 23  
Old 05-16-2008
Does hawk.htm exist in the right place in the file system?
# 24  
Old 05-16-2008
hawk.htm is placed in following path:

/usr/local/apache/htdocs/hawk.htm

in this (found in httpd.conf)

ServerRoot "/usr/local/apache"

Port 80

DocumentRoot "/usr/local/apache/htdocs"
# 25  
Old 05-16-2008
So can we conclude that the Apache you currently have running is using a different httpd.conf? Can you figure out where it's being started from and where it's getting its configuration? If you are root and don't know why it's running, is simply killing it an option?
# 26  
Old 05-16-2008
I dont know whether the apache is running currently or not. i am giving the results of httpd&apache processes, can u figure out whether the apache and httpd running or not.

ps -ef|grep httpd
root 421 1 0 08:57:11 ? 0:00 //usr/lib/httpd -i admin -a
root 414 1 0 08:57:11 ? 0:00 //usr/lib/httpd -i sws_server
nrmsa 7642 7619 0 08:04:58 pts/17 0:00 grep httpd

ps -ef|grep apache
nrmsa 7644 7619 0 08:05:17 pts/17 0:00 grep apache

yesterday i tried to start the apache(in root) by the following command.

/usr/local/apache/bin/apachectl start

But this given the following error

[Thu May 15 14:43:20 2008] [crit] (125)Address already in use: make_sock: could not bind to port 80
# 27  
Old 05-16-2008
one more thing i observed in error log and access log is that when i accessed the webpage on 29 april, it has given following details in....

access_log:

10.240.7.118 - - [29/Apr/2008:00:00:20 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:02:21:36 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:03:51:41 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:05:19:03 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:06:12:50 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:07:24:16 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
172.21.67.130 - - [29/Apr/2008:08:46:44 +0100] "GET / HTTP/1.1" 200 1623 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.67.130 - - [29/Apr/2008:08:46:44 +0100] "GET /Dispatcher.js HTTP/1.1" 200 16788 "http://172.20.10.57/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.67.130 - - [29/Apr/2008:08:46:46 +0100] "GET /mshaw/index.htm HTTP/1.1" 404 290 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
10.240.7.118 - - [29/Apr/2008:09:35:18 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:11:58:01 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:13:35:01 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
172.21.65.9 - - [29/Apr/2008:14:43:19 +0100] "GET /cgi-bin/nrmsalog-cgi HTTP/1.1" 200 2726 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
10.240.7.118 - - [29/Apr/2008:14:54:30 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
172.21.65.9 - - [29/Apr/2008:14:55:57 +0100] "GET /hawk.htm HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.65.9 - - [29/Apr/2008:14:55:57 +0100] "GET /npeweb/MAINBKGD.GIF HTTP/1.1" 304 - "http://172.20.10.57/hawk.htm" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.65.9 - - [29/Apr/2008:14:55:58 +0100] "GET /npeweb/neon.gif HTTP/1.1" 304 - "http://172.20.10.57/hawk.htm" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.65.9 - - [29/Apr/2008:14:55:58 +0100] "GET /npeweb/BTLOGO.GIF HTTP/1.1" 304 - "http://172.20.10.57/hawk.htm" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
172.21.65.9 - - [29/Apr/2008:14:56:03 +0100] "POST /cgi-bin/nrmsalog-cgi HTTP/1.1" 200 2771 "http://172.20.10.57/hawk.htm" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
10.240.7.118 - - [29/Apr/2008:17:12:38 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:17:53:49 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:20:38:05 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:21:53:33 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"
10.240.7.118 - - [29/Apr/2008:23:18:15 +0100] "GET / HTTP/1.0" 200 1623 "-" "-"

from error_log on same day:

[Tue Apr 29 08:46:46 2008] [error] [client 172.21.67.130] File does not exist: /usr/local/apache/htdocs/mshaw/index.htm

But index.htm is placed in

/usr/local/apache/htdocs/index.htm

But we had accessed the web page fine there.
# 28  
Old 05-16-2008
Somebody tried to fetch /mshaw/ (or /mshaw/index.html), that's all it means.

Your ps output shows that you have two httpds running, the question is which one is bound to port 80, and whether you can safely kill that one and start the one you want on that port. It's refusing to start because the port is already in use because you already have one httpd (aka apache) running. You can't have two server processes on the same single port.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

2. UNIX for Dummies Questions & Answers

Info Needed in Seting up An apache Web Server on A Sun Sparc with Solaris 8

I need help in the form of the complete procedures necessary in setting up an Apache web server on a Sun Sparc running Solaris 8 David Johnston P.S New to the Unix arena (1 Reply)
Discussion started by: David Johnston
1 Replies
Login or Register to Ask a Question