今天测试Docker下配置一个nginx模板的镜像,装好nginx后,使用nginx -t进行检查,报错如下:

1
2
3
4
[root@a381c4c04132 yum.repos.d]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed

检查配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
根据错误提示分析,监听的方式可能不支持ipv6,于是将其注释掉
    server {
        listen       80 default_server;
#        listen       [::]:80 default_server;
然后再次检查配置:
[root@a381c4c04132 yum.repos.d]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
没有报错了,问题解决

本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1971551,如需转载请自行联系原作者

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)相关推荐

  1. Nginx Error: socket() [::]:80 failed (97: Address family not supported by protocol)

    Server:Ubuntu 16.04.6 Nginx启动报错: socket() [::]:80 failed (97: Address family not supported by protoc ...

  2. 阿里云ECS在CentOS 6.9中使用Nginx提示:nginx: [emerg] socket() [::]:80 failed (97: Address family not supported

    转载自: https://www.cnblogs.com/EasonJim/p/8056944.html 说明: 1.[::]:80这个是IPv6的地址. 2.阿里云截至到今天还不支持IPv6. 解决 ...

  3. 阿里云机器上执行 locusts 命令出现 OSError: [Errno 97] Address family not supported by protocol...

    阿里云ECS 系统为 CentOS 6.8 64位 使用 yum install nginx 安装完成后,执行 nginx 启动服务,提示: nginx: [emerg] socket() [::]: ...

  4. error: <class ‘OSError‘>, [Errno 97] Address family not supported by protocol

    问题描述 使用 supervisor 托管进程,使用 supervisorctl 时报错: [~]$ supervisorctl status error: <class 'OSError'&g ...

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

    2019独角兽企业重金招聘Python工程师标准>>> 今天在ubuntu10.04上面安装nginx,安装完成之后尝试启动nginx,使用命令: sudo /etc/init.d/ ...

  6. 解决nginx emerg bind to 80 failed 98 Address alrea

    首选是安装nginx,在./configure出错的情况下,查看错误的报告,如果是缺少一些必要的库,安装这些库,可能的有ssl pcre(这个库我是使用源码安装的,在线安装没有成功,提示看不到这个库) ...

  7. nginx: [emerg] getpwnam(“nobody”) failed

    交叉编译Nginx,并移植到Hi3519上运行:https://blog.csdn.net/weixin_43793181/article/details/116494853?spm=1001.201 ...

  8. c++ connect函数Address family not supported by protocol

    问题: 在c++中执行网络的connect函数,出现报错 Address family not supported by protocol 函数原型: int connect(SOCKET s, co ...

  9. Android异常总结---1.Android java.net.SocketException: Address family not supported by protocol

    1.Android java.net.SocketException: Address family not supported by protocol 出错提示    这个异常是因为 package ...

最新文章

  1. [学习笔记]几个英语短句(1)
  2. java清除控制台_Java:清除控制台
  3. 一次给女朋友转账引发我对分布式事务的思考
  4. 牛人主页(主页有很多论文代码)【真的好强大】
  5. 自己动手实现一个malloc内存分配器 | 30图
  6. 数据3分钟丨Apache Doris谴责DorisDB违背开源精神;HC2021下周召开;openGauss训练营第二期圆满落幕
  7. 2-06 使用网络存储SAN和NAS
  8. Java爬虫入门教程 开篇
  9. 如何用SPSS或Excel做中介效应的Sobe检验?
  10. 绑定host:windows与模拟器之绑定host集结
  11. SWUSTOJ #67 学生成绩管理
  12. SAP LSMW 创建及使用过程
  13. ne_products 表
  14. python获取列表中某个元素个数_如何获取列表中的元素数?
  15. docker中容器与容器之间通讯
  16. scala sortBy and sortWith
  17. 最小生成树-python实现
  18. Matlab的插值与拟合
  19. bulk es 删除_ES bulk 批量操作
  20. 全国民用建筑工程设计技术措施给水排水

热门文章

  1. libpcap介绍(一)
  2. 定题信息服务是从什么角度_格木教育谢浩浩:事业单位综合应用概念分析题之角度界定技巧...
  3. windows xcopy
  4. P2689 东南西北
  5. cx_Oracle读写clob
  6. 页面中使用多个element-ui upload上传组件时绑定对应元素
  7. 开源大数据周刊-第34期
  8. call_user_func
  9. Spring和shiro整合 logout 配置方式
  10. .NET一个线程更新另一个线程的UI(两种实现方法及若干简化)