English 中文(简体)
Nginx daemon end正在失败
原标题:Nginx daemon stop is failing
最佳回答

它很可能使这一进程丧生。

打开位于/etc/init.d/(或/etc/rc.d/)的原始 s,发现原.。 id。 它是“/var/run/nginx.pid”一类的。

如果该笔假卷是 t,则开端。 召集并寻找假环境。 如果是不相干的——将文字价值确定在什么地方,例如,

# pid of nginx process
pid /var/run/nginx.pid;
问题回答

sudo service nginx restart will give you something like this:

Stopping nginx:                                            [FAILED]
Starting 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()

之后,他们的港口人工杀死了这一过程:

sudo fuser -k 80/tcp (或使用你使用的任何港口)

或者,通过他们的身份证杀死这些过程:

ps -ef |grep nginx
kill <pid>

审判这一指挥:

sudo fuser -k 80/tcp

Cause of this issue

基本上,你在A站点写了笔记本,试图从B地点读到。 这种不一致似乎是这一明显共同问题的根源。

Solution

Proper fix:

We need to ensure that both the read and write locations are same.

How?: The pid file defined in nginx.conf and nginx.service should be the same.

Hotfix:

  1. lsof -i | grep nginx

这将使你得到补助。 在我的案件中,有两人。

  1. kill -9 pid1
  2. kill -9 pid2 (may not be required)

I had faced similar issues.

Generally I use apache/apache2.

下面可以帮助您:

sudo nginx -s stop | ps -ef | grep nginx | awk { print $2 } | xargs sudo kill -9 | sudo service apache2 start

请参看

这里是我修改的正文(根据官方文字),我使文字变形。

lockfile=$pidfile 

和变量

pidfile="/var/run/nginx.pid"

然后,我修改了《汇辑》(nginx.conf),我改动了《汇辑》。

pid="/var/run/nginx.pid" 

too.

最后,我可以使用所有原始指挥系统。





相关问题
Add a changing icon to Ubuntu Panel

What would be the most simple way of adding and changing an icon in the Ubuntu (Gnome) Panel? I m looking for something as simple as shell scripting, but I m not restricted to that. Will write a ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

save Exceptions to file in python

I want to save all following Exceptions in a file. The reason why I need this is because the IDLE for python 3.1.1 in Ubuntu raises an Exception at calltipps, but close to fast, that it isn t readble. ...

How can i monitor system statistics in kubuntu using Java?

i am doing a project related to configuration and memory analyzer for kubuntu. i want to display the system statistics information like CPU usage, RAM usage and proceses etc. graphically using an ...

How to pass "--external-locking" for mysqld in Ubuntu

I would like to start my mysql server with the --external-locking option. As mysqld is run by the /etc/init.d/mysql script ubuntu (karmic), I guess that s where I should set this "--external-locking" ...

"g++" and "c++" compiler

I just found on my Ubuntu, there are two different C++ compilers: /usr/bin/g++ and /usr/bin/c++. I am not familiar with the latter, but man c++ just jumps to the manpage of gcc. I wonder what is their ...

热门标签