nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)解决方案
来源:互联网 发布:淘宝2016销售额是多少 编辑:程序博客网 时间:2024/05/25 05:34
在安装nginx的时候,启动nginx,即如果发现:
[root@master nginx]# /usr/local/nginx/sbin/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 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] still could not bind()
查看了一下端口尝试杀死这个进程:
[root@master nginx]#netstat -ntpl
(并非所有进程都能被检测到,所有非本用户的进程信息将不会显示,如果想看到所有信息,则必须切换到 root 用户)
激活Internet连接 (仅服务器)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
[root@master nginx]# killall -9 nginx
nginx:没有发现操作
遇到这种问题我先用中文搜索了一下答案,发现大家都在装逼地说要杀nginx重复的进程。我试了下发现是扯淡,于是看了谷歌搜到的第一个英文页面,老外说是nginx先监听了ipv4的80端口之后又监听了ipv6的80端口,于是就重复占用了。更加坑人的是你去看了端口占用它又把80端口释放了,是不是很囧。
解决方案是编辑nginx的配置文件
/etc/nginx/sites-available/default修改这段:
为
- listen 80;
- listen [::]:80 default_server;
然后再次启动,解决!(老美就是( ఠൠఠ )ノ)
- listen 80;
- listen [::]:80 ipv6only=on default_server;
- nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)解决方案
- 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 [::]: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]: 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] bind() to [::]: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] bind() to [::]: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] 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) 解决办法
- iOS蓝牙连接多台设备
- laravel中使用阿里云视频点播遇到的坑解决思路
- AIDL学习并应用
- safari调试iPhone app web页面
- 7. Reverse Integer
- nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)解决方案
- mybatis的sql标签使用
- 自然语言处理扫盲·第二天——白话机器翻译原理
- 剑指offer_从尾到头打印链表
- web前端性能优化(前端方向)总结
- openCV基础知识学习笔记-计算机视觉基础
- java队列实现(顺序队列、链式队列、循环队列)
- JDE 事务的用法
- Struts2 ActionContext