nginx [emerg] socket() []80 failed (97 Address family not supported by protocol)

1、nginx报错信息

早上通过LNMP部署owncloud 10.0.2的云盘环境,修改nginx配置文件后,重启报错:
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

2、分析并解决报错

看到 socket() [::]:80 failed,第一反应就是好像与IPV6有关,Address family not supported by protocol也进一步印证了我的想法,如是想到查看nginx配置文件

修改nginx的配置文件:

vim /etc/nginx/nginx.conf

如果不知道nginx的配置文件在哪,可以通过find命令或者rpm -ql nginx(rpm形式安装的话)进行查找nginx.conf

# rpm -ql nginx|grep nginx.conf
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf.default

重新启动nginx,告警消失

时间: 2024-11-14 18:05:22

nginx [emerg] socket() []80 failed (97 Address family not supported by protocol)的相关文章

阿里云ECS在CentOS 6.9中使用Nginx提示:nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)的解决方法

说明: 1.[::]:80这个是IPv6的地址. 2.阿里云截至到今天还不支持IPv6. 解决方式: 1.普通解决方式:开启IPv6的支持,不过这个方法在阿里云行不通. vim /etc/nginx/conf.d/default.conf #找到并替换为以下: listen 80; listen [::]:80 ipv6only=on default_server; 2.极端方式:直接屏蔽IPv6,全部服务器都适用. vim /etc/nginx/conf.d/default.conf #找到并

97: Address family not supported by protocol,nginx服务启动失败

1.启动nginx服务报错 环境:centos 6.9,yum安装的nginx,启动报错 [[email protected] ~]# nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)nginx: configuration file

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 报错信息 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol) 1 2 定位方法 1.先使用p

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)解决

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 报错信息 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)定位方法 1.先使用ps -e |

修改nignx报错Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) 这个错误是修改了nginx的配置时出现,表名80端口被程序占用 列出所有端口: netstat –ntlp 发现端口是被nginx本身占用了,于是关闭占用80端口的程序 sudo fuser -k 80/tcp 之后开启nginx无异常 使用linux一键安装包安装的环境 http://lnmp.org/

Linux教程之:Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) 使用命令关闭占用80端口的程序 sudo fuser -k 80/tcp 互联网+时代,时刻要保持学习,携手千锋PHP-PHP培训的实力派,Dream It Possible.

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 错误解决

今天在做LNMP的时候,启动nginx服务,无法开启,导致网页打不开.把服务从起一下发现提示错误如下: Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)nginx: [emerg] bind() to 0.0.0.0:80 fai

[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)错误原因

nginx重启报错:[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) 原因:这个是nginx重启时经常遇到的,这个是nginx重复重启导致自己占用了端口.(一般可能是因为自己设置了开机自动启动,或者重复启动) 解决方法 : killall -9 nginx 杀掉nginx 的进程  然后重启(service nginx restart 或 sudo /usr/local/nginx/sbin/nginx) 版权声明

nginx安装 nginx: [emerg] getpwnam(“www”) failed 错误

inux 64系统中安装nginx1.3时如果出现错误:nginx: [emerg] getpwnam(“www”) failed解决方法1:      在nginx.conf中 把user nobody的注释去掉既可解决方法2:      错误的原因是没有创建www这个用户,应该在服务器系统中添加www用户组和用户www,如下命令: 1 2 #/usr/sbin/groupadd -f www #/usr/sbin/useradd -g www www