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的配置文件:

1
vim  /etc/nginx/nginx .conf

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

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

重新启动nginx,告警消失











本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1942907,如需转载请自行联系原作者
目录
相关文章
|
应用服务中间件 网络安全 nginx
Nginx配置SSL证书时——nginx:[emerg]unknowndirectivessl错误
Nginx配置SSL证书时——nginx:[emerg]unknowndirectivessl错误
2005 0
|
Shell 数据库
【YashanDB知识库】YAS-00402 failed to connect socket, errno 111, error message "Connection refused"
【YashanDB知识库】YAS-00402 failed to connect socket, errno 111, error message "Connection refused"
【YashanDB知识库】YAS-00402 failed to connect socket, errno 111, error message "Connection refused"
|
Shell 数据库
【YashanDB知识库】YAS-00402 failed to connect socket, errno 111
【YashanDB知识库】YAS-00402 failed to connect socket, errno 111
|
存储 应用服务中间件 nginx
成功解决:nginx: [emerg] unexpected “}“ in /etc/nginx/conf.d/gulimall.conf:10
这篇文章详细介绍了Linux虚拟机磁盘空间不足时的扩容流程,从外部配置到具体扩容操作,再到验证扩容效果的步骤。同时,也探讨了Docker容器磁盘空间耗尽的问题,并提供了解决方案,包括删除无用镜像和容器,以及如何重新配置Docker的存储位置。文章还涵盖了一些意外情况的处理方法,比如误删容器后的恢复策略,并最终展示了使用Docker安装nginx并成功访问的详细过程。
成功解决:nginx: [emerg] unexpected “}“ in /etc/nginx/conf.d/gulimall.conf:10
|
Android开发
SocketException: Failed to create server socket(OS Error: Permission denied, errno = 13)
SocketException: Failed to create server socket(OS Error: Permission denied, errno = 13)
434 3
|
应用服务中间件 nginx Windows
[emerg] 15060#200: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket ......
[emerg] 15060#200: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket ......
726 0
|
应用服务中间件 nginx Windows
【报错】Windows下启动nginx报:bind() to 0.0.0.0:80 failed...
【报错】Windows下启动nginx报:bind() to 0.0.0.0:80 failed...
1327 0
|
消息中间件 Kafka
org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
org.apache.kafka.common.KafkaException: Socket server failed to bind to 114.115.20.100:9092: Cannot
304 0
|
应用服务中间件 网络安全 nginx
解决nginx:[emerg]unknown directive ssl错误
解决nginx:[emerg]unknown directive ssl错误
2930 0
|
存储 应用服务中间件 nginx
【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
【1月更文挑战第13天】【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)