if u see this type of problem in apache webserve build in linux rh 7,9, 2.1 as, and other newer version

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443

or

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80


do the following :

vi /etc/httpd/conf/httpd.conf

and replace the port 80 and port 443 with
port 80--->88
port 443 --> 448 for the timebeing.

to do quick find vi the file and than presh escap key and than put the ? question mark and than type 80 or 443 . to fine other 88 entry press n on the same time. anyhow let me kick ur ass now bcoz not suppose to teach all these things now..

well when u replaced them than u simply run the command

service htttpd restart
again to confirm service httpd restart

than see if it has started

service httpd status...
than u will see that ur webserver is started on port 88 and 448 for ssl. hummmmm

now try to browse http://ipaddressof ur linuxbox:88
http://ipadr:443

u will see that ur page is cameup...hummmmmmm but problem is not solved yet.
this teaches us that the prblem is with the port conflict..how can u track it..

put the command

lsif :80

u will see the several process are already running on port 80 so apachea can't start on the same port. so u have to kill all these apachea process using kill -9 <processid>

my logs:
=======
[root@ns root]# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
xfs 19085 apache 18u IPv4 127053 TCP *:http (LISTEN)
sh 19086 apache 18u IPv4 127053 TCP *:http (LISTEN)
sh 19087 root 18u IPv4 127053 TCP *:http (LISTEN)
su 19088 root 18u IPv4 127053 TCP *:http (LISTEN)
bash 19089 root 18u IPv4 127053 TCP *:http (LISTEN)
[root@ns root]# kil -9 19085 19086
bash: kil: command not found
[root@ns root]# kill -9 19085 19086
[root@ns root]# lsof -i :80
[root@ns root]# lsof -i :443
[root@ns root]# lsof -i :443
[root@ns root]#
[root@ns root]#
[root@ns root]#
[root@ns root]#
[root@ns root]#
[root@ns root]# apachectl sto
usage: /usr/sbin/apachectl (start|stop|restart|fullstatus|status|graceful|configtest|help)

start - start httpd
stop - stop httpd
restart - restart httpd if running by sending a SIGHUP or start if
not running
fullstatus - dump a full status screen; requires lynx and mod_status enabled
status - dump a short status screen; requires lynx and mod_status enabled
graceful - do a graceful restart by sending a SIGUSR1 or start if not running
configtest - do a configuration syntax test
help - this screen

[root@ns root]# apachectl stop
/usr/sbin/apachectl stop: httpd (no pid file) not running
[root@ns root]# apachectl start
/usr/sbin/apachectl start: httpd started
[root@ns root]# lsof -i :443
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd 24957 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24958 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24959 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24960 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24961 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24962 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24963 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24964 root 19u IPv4 479222 TCP *:https (LISTEN)
httpd 24965 root 19u IPv4 479222 TCP *:https (LISTEN)
[root@ns root]# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd 24957 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24958 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24959 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24960 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24961 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24962 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24963 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24964 root 18u IPv4 479221 TCP *:http (LISTEN)
httpd 24965 root 18u IPv4 479221 TCP *:http (LISTEN)
[root@ns root]# service httpd status
httpd (pid 24965 24964 24963 24962 24961 24960 24959 24958 24957) is running...
[root@ns root]# ls
anaconda-ks.cfg dead.letter Linux_Backup mail Mail nsmail
[root@ns root]# cd /etc/httpd/config
bash: cd: /etc/httpd/config: No such file or directory
[root@ns root]# ls
anaconda-ks.cfg dead.letter Linux_Backup mail Mail nsmail
[root@ns root]# cd /etc/httpd
[root@ns httpd]# cd conf
[root@ns conf]# ls


Why this problem comes:
-------------------------------
this problem is comes only if u started the weberver and than made some modification or tried to load the jsp or asp support than u will find http locked when u tried to restart it .

so don't be confussed. just kill th process and than put ur configuration (original file) which has port 80 or 443.

it will work fine......

else mail me on my personal mail ilel
pushkar_bhatkoti@rediffmail.com
yahooo: pushkarbhatkoti@yahoo.com

My mobile is : 9810774912
I lives in New Delhi India.
cheers!!


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 hmc0316 的頭像
    hmc0316

    hmc0316的部落格

    hmc0316 發表在 痞客邦 留言(0) 人氣()