Nginx启动时出现Address already in use 解决方案
来源:互联网 发布:java中命令行是什么 编辑:程序博客网 时间:2024/06/02 06:37
启动Ngnix的时候提示错误,异常信息如下。
[root@centos-512mb-sfo2-01 nginx-1.10.3]# /opt/nginx-1.10.3/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()
问题描述:端口已被使用,导致端口占用,出现此错误。
解决方案:
1. 查看当前端口的使用情况
原因: 端口 80 端口被占用,用 “lsof -i:80” 命令查看一下是什么程序占用了80端口,我的结果显示是 80 端口被 Apache 占用
[root@centos-512mb-sfo2-01 nginx-1.10.3]# lsof -i:80COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEhttpd 5304 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 13021 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 13022 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 13023 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 13025 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 16084 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 16085 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 16086 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 19021 root 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 21515 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)httpd 21517 apache 4u IPv6 4955869 0t0 TCP *:http (LISTEN)
既然被占用,就将占用的进程关闭即可.像上面的问题我们可以采用:
service httpd stop
关闭Apache进程即可.
同理,要是在安装了nginx的服务器要想启动Apache,关闭nginx进程即可.
阅读全文
0 0
- Nginx启动时出现Address already in use 解决方案
- nginx Address already in use 解决方案
- Tomcat启动时出现 Address already in use: JVM_Bind
- 启动Tomcat出现Address already in use:JVM_Bind错误的解决方案
- 关于MyEclipse中启动jsp项目是出现"Address already in use: JVM_Bind"异常的解决方案
- java中启动tomcat时出现错误:Address already in use: JVM_Bind:8080
- Address already in use: JVM_Bind:80 解决方案
- Address already in use: JVM_Bind:8080解决方案
- dubbo Address already in use: bind 解决方案
- bind出现Address already in use解决方法
- bind出现Address already in use解决方法
- bind出现Address already in use解决方法
- bind出现Address already in use解决方法
- bind出现Address already in use解决方法
- Linux启动服务时提示错误:Address already in use
- 启动nginx服务时出错,提示nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
- Address already in use
- Address already in use
- 1045. 快速排序(25)
- 2D/3D文档查看器ABViewer发布v12,大大提高PDF转DWG的速度丨附下载
- 92. Reverse Linked List II
- Vector (对象要向下转型)
- 深度学习在 iOS 上的实践 —— 通过 YOLO 在 iOS 上实现实时物体检测
- Nginx启动时出现Address already in use 解决方案
- 如何打开osip/eXosip库的trace log 调试信息
- 深入了解php中的ini配置
- mysql之触发器trigger
- SpringMVC 实现(Post增 Delete删 Put改 get查)
- Ajax动态数据加载+video遮挡div问题解决
- Hadoop2.8.0<Mapreduce实现多表关联>
- ElasticSearch初级开发(1)之ElasticSearch及head插件离线安装
- List集合的特有功能概述