三三世界-百宝箱

文章 分类 标签
130 9 247

公告

暂无站点公告

错误nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)解决方法

三三 2022-04-01 1893 0条评论 网络配置Linux使用 Nginx无法启动端口冲突

首页 / 正文

问题:

服务器上网站无法访问,试图重启nginx,提示错误如下:

[root@local ~]# /etc/init.d/nginx start
Starting nginx... nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:6379 failed (98: Address already in use)
nginx: [emerg] still could not bind()
 failed
[root@local ~]# /etc/init.d/nginx status
nginx is stopped

解决方法:

这个情况是服务器上安装的redis端口6379与nginx的80端口冲突导致的。这个情况,的解决思路是先找出6379的进程,然后杀死以后,先开启nginx,然后到nginx配置文件中找到配置6379端口的网站,删掉后重启redis。

方法一、使用:

fuser -k 6379/tcp

输入后,会提示出该进程的pid,在后面的一串数字。直接禁止掉即可。

将进程杀死后再试着启动nginx。

方法二、

ps -A | grep nginx 

kill -9 pid1

kill -9 pid2  

杀死对应的两个进程之后,启动nginx

评论(0)

当前没有评论,还不快来留下第一个脚印吧


Copyright 2021 三三世界-百宝箱. All Rights Reserved.

最新评论

  • 三三

    @Doug Shume it's ok for me , you can post here.

  • refugiaguenther

    Saved as a favorite, I like your website!

  • josefa

    If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.

  • Penzu

    Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!

  • Yupoo Fendi

    Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.

  • Doug Shume

    Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.

  • SuperWind

    zh.us.to 有效
    kms.03k.org 有效
    kms.chinancce.com
    kms.shuax.com 有效
    kms.dwhd.org 有效
    kms.luody.info 有效
    kms.digiboy.ir 有效
    kms.lotro.cc 有效
    www.zgbs.cc 有效
    cy2617.jios.org 有效

  • 三三

    @         权限问题,试试sudo 再加命令。

  •         

    你好提示Permission denied 怎么办啊

日历

2024年05月

   1234
567891011
12131415161718
19202122232425
262728293031 

文章目录

上一张 下一张