今天在测试Nginx功能的时候,出现问题如下:

nginx: [emerg] bind() to 0.0.0.0:443 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:8083 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:7091 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:7092 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8081 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)

原因是:

在测试过程中,关闭过rtmp的端口号,./kill -9 pid(rtmp:1935)

结果在启动 Nginx时,./nginx -c /usr/local/nginx/conf/nginx.conf

出现上述错误

结果过程如下:

首先用lsof -i:80看下80端口被什么程序占用。lsof返回结果如下:

[root@localhost sbin]# lsof -i:80
COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
nginx   63170 root    9u  IPv4 14243472      0t0  TCP *:http (LISTEN)

关闭进程:kill -9  63170

重新启动Nginx:[root@localhost sbin]# ./nginx -c /usr/local/nginx/conf/nginx.conf

问题解决

nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)相关推荐

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

    查看进程 查看日志 root@ubuntu:/usr/local/nginx/sbin# find / -name error.log /var/log/apache2/error.log /usr/ ...

  2. nginx启动失败nginx: [emerg] bind() to 0.0.0.0:7001 failed (98: Address already in use)

    ./nginx 启动nginx,在启动时报错端口被占用 [root@localhost sbin]# ./nginx nginx: [emerg] bind() to 0.0.0.0:7001 fai ...

  3. Nginx重启时提示nginx: [emerg] bind() to 0.0.0.0解决方法 老蒋 发布于 2019-06-03 分类:运维笔记 评论(0) 2000+站长交流QQ群: 59

    c 老蒋 发布于 2019-06-03 分类:运维笔记 评论(0) 2000+站长交流QQ群: 594467847(资源和技术交流) 昨天下午老蒋在一台服务器中折腾迁移数据问题的时候,重启Nginx的 ...

  4. nginx: [emerg] bind() to 0.0.0.0:8082 failed (10013: An attempt was made to acce ss a socket in a wa

    nginx.exe 启动报错 nginx: [emerg] bind() to 0.0.0.0:8082 failed (10013: An attempt was made to acce ss a ...

  5. nginx: [emerg] bind() to 0.0.0.0:443 failed (10013: An attempt was made to access a socket in a way

    启动nginx 报如下错误: nginx: [emerg] bind() to 0.0.0.0:443 failed (10013: An attempt was made to access a s ...

  6. nginx: [emerg] CreateFile() “D:\soft\nginx-1.18.0/logs/nginx.pid“ failed (5: Access is denied)

    win10启动nginx报错 nginx: [emerg] CreateFile() "D:\soft\nginx-1.18.0/logs/nginx.pid" failed (5 ...

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

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

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

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

  9. nginx[21944]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Ad...se)

    2019独角兽企业重金招聘Python工程师标准>>> 错误概述 这个错误真的很坑人,第一次安装然后可能是启动了多起,出现这个错误,80端口被占用 解决方法 当然是 把占用80 端口 ...

最新文章

  1. 图像风格迁移也有框架了
  2. Word文档如何自动生成文献摘要?
  3. hdu4932 小贪心
  4. spring框架中JDK和CGLIB动态代理区别
  5. dede在首页调用留言本
  6. SparkSQL Catalog的作用和访问Hive元数据信息
  7. 模糊pid控制算法matlab程序解读,基于Matlab的模糊PID控制研究
  8. 《AutoCAD 2013中文版从入门到精通》—— 导读
  9. CAN BusOff相关知识点
  10. Excel功能逻辑结构图
  11. UA MATH523A 实分析3 积分理论17 Fubini-Tonelli定理
  12. 批量发短信的平台浏览总结
  13. 基本技能 100316
  14. 云南网络文化经营许可证办理,云南办理网络文化经营许可证多少钱?文网文是什么?怎么办理文网文?办理文网文需要什么材料?
  15. 如何将livp文件转换为jpeg图片格式
  16. 华为服务器修改管理网口,怎么设置华为服务器管理口
  17. mtk平台android编译命令,MTK 常见的编译命令
  18. php验证码实现的代码怎么写,php验证码实现代码
  19. Windows系统CMD命令测试
  20. 怎么把英文文献转译为中文?

热门文章

  1. OD使用教程3(中) - 调试篇03|解密系列
  2. 几个支持生成Python代码的UML工具
  3. 疼恨皇明热水器的无耻!
  4. CodeForces - 1526D Kill Anton(模拟)
  5. 牛客 - 数位操作2(数位dp)
  6. POJ - 3080 Blue Jeans(暴力+KMP)
  7. linux删除百万个文件夹,linux下如何删除一百万个文件
  8. java第五章 多线程_java多线程编程核心技术——第五章总结
  9. 长连接和Keepalive
  10. VC网络通信API概览