首页 > 其他分享 >Apache, service httpd stop, Address already in use:

Apache, service httpd stop, Address already in use:

时间:2023-11-06 15:34:03浏览次数:24  
标签:httpd use already service 0.0 tcp 80 LISTEN

service httpd stop
Stopping httpd:                                            [FAILED]
[root@testtest apache_logs]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
=========================

Cause:
This problem is caused by another service listening to TCP/IP port 80.

Solution:
1. OK $ sudo fuser -k -n tcp 80
     OK $ sudo /etc/init.d/httpd  start
2.  Change the listen port in the httpd config file to 81, by doing this we want to see which service is using port 80.
     just do the following command as root :
#netstat -tlp
after running the command.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1546/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1429/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1592/postmaster
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2360/sendmail: acce
tcp 0 0 0.0.0.0:8554 0.0.0.0:* LISTEN 3207/gnome-dvb-daem
tcp 0 0 0.0.0.0:54858 0.0.0.0:* LISTEN 1369/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1310/rpcbind
tcp 0 0 :::59092 :::* LISTEN 1369/rpc.statd
tcp 0 0 :::22 :::* LISTEN 1546/sshd
tcp 0 0 ::1:631 :::* LISTEN 1429/cupsd
tcp 0 0 :::443 :::* LISTEN 2593/httpd
tcp 0 0 :::6881 :::* LISTEN 2757/ktorrent
tcp 0 0 :::111 :::* LISTEN 1310/rpcbind
tcp 0 0 :::80 :::* LISTEN 2593/httpd
tcp 0 0 :::81 :::* LISTEN 2593/httpd

now we know that port 80 is utilised by another service, so locate and change system-config-httpd.conf: system-config-httpd.conf system-config-httpd.conf. all of this, restart httpd:
/etc/init.d/httpd start

3.  Third solution is to change binging address in your httpd.conf  like this:
Listen 127.0.0.1:80 ( that means:  instead of  Listen 0.0.0.0:80)



标签:httpd,use,already,service,0.0,tcp,80,LISTEN
From: https://blog.51cto.com/emanlee/8212693

相关文章

  • How To Use Coordinates To Extract Sequences In Fasta File
    [1]bedtools(https://github.com/arq5x/bedtools2)hereisalsobedtools(https://github.com/arq5x/bedtools2)getfasta.ItusesErik'scodeunderthehood.$cattest.fa>chr1AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG$cattest.bedchr1510$......
  • Apache Paimon 实时数据湖 Streaming Lakehouse 的存储底座
    摘要:本文整理自阿里云开源大数据表存储团队负责人,阿里巴巴高级技术专家李劲松(之信),在StreamingLakehouseMeetup的分享。内容主要分为四个部分:流计算邂逅数据湖PaimonCDC实时入湖Paimon不止CDC入湖总结与生态一、流计算邂逅数据湖流计算1.0实时预处理流计算1.0架构截止......
  • 【Git 教程系列第 27 篇】ssh: connect to host github.com port 22: Connection refu
    https://blog.csdn.net/qq_42351033/article/details/131612279ssh:connecttohostgithub.comport22:Connectiontimedoutfatal:Couldnotreadfromremoterepo......
  • Pset_BuildingUseAdjacent
    Pset_BuildingUseAdjacent相邻建筑用途:提供有关相邻建筑及其用途的信息,以确定其对感兴趣建筑的影响。请注意,对于所使用的属性集的每个实例,如果存在风险,则将存在属性集Pset_risk(q.v)的一个实例。  NameTypeDescriptionMarketCategoryP_SINGLEVALUE / IfcLabelMar......
  • Musescore常用操作备忘
    最近开始写歌,记录下经常用的一些操作目录添加文本折叠休止符添加小节删除小节添加乐器编辑双音、和弦钢琴键盘升高/降低音三连音多声部延音线连音线添加文本选中音符,按cmd+T折叠休止符折叠休止符,按下键盘上的M添加小节选择小节,右键->插入小节插入换行小节也可以插入水......
  • 【zabbix】configure: error: Unable to use libevent (libevent check failed)解决方
    安装zabbix,在zabbix目录下执行编译命令时报错configure:error:Unabletouselibevent(libeventcheckfailed),如图:说明:新服务器,一般依赖不足,需要视情况安装依赖,问题解决。解决方案:yuminstalllibevent-devel-y......
  • React面试题: useCallBack()与React.memo的区别与使用常见场景
    React.usecallback与React.memo的区别:React.useCallback和React.memo是两种不同的优化方式:主要功能:它们都可以避免不必要的渲染,提高React应用的性能。React.useCallback是Hoc(高阶组件)的解决方案,可以用于优化函数组件和Class组件,注意这里适用于React高阶组件的渲染解......
  • 简单使用C语言通过Microhttpd库采集淘宝
    前段时间给大家分享过不少采集淘宝相关内容的方法,昨天有个朋友让我来帮他用C语言编写一个采集淘宝的爬虫程序,并且还要通过Microhttpd库来实现。这一点都难不倒我,下面我就将我的代码示例给大家分享一下,有需要的朋友赶紧来取。```c#include#include#include#include#defineHTTP......
  • Hive / ClickHouse 行转列函数 collect_set() / groupUniqArray() 入门
    Hive/ClickHouse行转列函数collect_set()/groupUniqArray()入门在数据处理和分析中,我们经常会遇到需要将一行数据转换为多列的情况。在Hive和ClickHouse中,可以使用collect_set()和groupUniqArray()函数来实现行转列操作。collect_set()1.功能说明collect_set()函......
  • Your shell has not been properly configured to use 'conda activate'.
     #./condaactivatepy38CommandNotFoundError:Yourshellhasnotbeenproperlyconfiguredtouse'condaactivate'.Toinitializeyourshell,run   $condainit<SHELL_NAME>Currentlysupportedshellsare: -bash -fish -tcsh -xonsh -......