nginx啟動報錯:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo
一、背景
這個錯誤在重啟nginx或者啟動nginx的時候,經常會出現。我之前也一直認為出現這個錯誤是因為有程序占用了nginx的進程。但是知其然不知其所以然。每次報錯都有點懵逼,所以這邊一步步排查錯誤,做個記錄。
二、排錯過程
1、按照提示
//按照提示,執行此命令,查看錯誤原因
systemctl status nginx.service
由報錯信息可知,nginx綁定80端口失敗。詳細錯誤請輸入 -l 繼續查看
2、繼續跟蹤錯誤
//查看錯誤的詳情
systemctl status nginx.service -l
這裏輸入 -l 之後,說實話,差距並不大。原因還是綁定端口失敗。
三、解決方案
1、查看此時占用80端口的程序
netstat -ntlp | grep 80
這裏可以看到,80端口是被占用的 。我們再詳細看看占用80的是什麽
ps -ef | grep 80
然後找到pid,殺掉這些程序
//-s 9 代表的是快速強制的殺掉pid程序
kill -s 9 pid
2、殺到沒有程序可殺為止,然後啟動nginx
此時啟動成功。
轉載自:https://blog.csdn.net/LJFPHP/article/details/79102840
nginx啟動報錯:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo
相關推薦
nginx啟動報錯:Job for nginx.service failed. See 39;systemctl status nginx.service39; and 39;journalctl -xn39; fo
class lasso clas blog 80端口 led emc tar 強制 一、背景 這個錯誤在重啟nginx或者啟動nginx的時候,經常會出現。我之前也一直認為出現這個錯誤是因為有程序占用了nginx的進程。但是知其然不知其所以然。每次報錯都有點懵逼
nginx啟動報錯:nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 的解決辦法
問題: 重啟虛擬機器後,再次重啟nginx會報錯: nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 問題原因: 提示資訊說明在 /var/
Nginx啟動報錯:10013: An attempt was made to access a socket in a way forbidden
Nginx在win7,win2008下啟動報錯:bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permi
EurekaClient啟動報錯:Invocation of destroy method failed on bean with name 39;scopedTarget.eurekaClient39;
異常 EurekaClient啟動報錯 Invocation of destroy method failed on bean with name 'scopedTarget.eurekaClient': org.springframework.beans.factory.Bea
springMvc啟動報錯:org.apache.catalina.LifecycleException: Failed to start component
複製了一個專案,然後啟動專案是報錯一堆錯誤,如下 … org.apache.catalina.LifecycleException: Failed to start component
解決mysql報錯:- Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 39;information_schema.PROFILING.SEQ39;
_for tran contains column schema mysql eat table express mysql執行報錯: - Expression #1 of ORDER BY clause is not in GROUP BY clause and cont
nginx端口占用,啟動報錯:bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a ........)
今天在自學Nginx的時候,啟動Windows版本的Nginx時候發現了[emerg] 4276#4280: bind() to 0.0.0.0:80 failed(10013: An attempt was made to access a socket in a way forbidd
nginx啟動報錯(1113: No mapping for the Unicode character exists in the target multi-byte code page)
使用windows版本的nginx啟動時遇到(1113: No mapping for the Unicode character exists in the target multi-byte code page)這個錯誤 把nginx的版本升高了,依舊報錯 後來查閱發現是因為解壓的路徑裡面包含有中文的緣
spriing boot 啟動報錯:Cannot determine embedded database driver class for database type NONE
.class sre 5.0 sin via cor pan cep can 最近在學習使用spring boot。使用maven創建好工程,只引用需要用到的spring boot相關的jar包,除此之外沒有任何的配置。 寫了一個最簡單的例子,如下所示: 1 pa
spring boot 啟動報錯:Cannot determine embedded database driver class for database type NONE
info for bubuko 報錯 spring free 增加 .com control 錯誤原因:spring boot默認會加載org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfigurati
Win7下,nginx默認80端口被System占用,造成nginx啟動報錯
運行 eight ros start () ims ping -s 窗口 在win7 32位旗艦版下,啟動1.0.8版本nginx,顯示如下錯誤:2012/04/02 13:55:59 [emerg] 7864#2376: bind() to 0.0.0.0:80 fai
nginx 啟動報錯“var/run/nginx/nginx.pid" no such file or directory解決方法
今天剛搭建的nginx伺服器啟動時,報錯“var/run/nginx/nginx.pid" no such file or directory,按照他的意思我在var/run/新建了一個資料夾nginx,重新啟動,啟動成功。 但是當我虛擬機
SpringMVC+myBatis啟動報錯:Access denied for user 39;##.##39;@39;localhost39; (using password: YES) SpringMVC+myBatis啟動報錯:Access denied for user
SpringMVC+myBatis啟動報錯:Access denied for user '##.##'@'localhost' (using password: YES) 2016年04月14日 15:00:28 閱讀數:3782
idea啟動報錯:Access denied for user 39;root 39;@39;192.168.100.20639; (using password: YES)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysUserMapper' defined in file [D:\workspace\b2
nginx 啟動報錯“var/run/nginx/nginx.pid" no such file or directory解決方法
今天剛搭建的nginx伺服器啟動時,報錯“var/run/nginx/nginx.pid" no such file or directory,按照他的意思我在var/run/新建了一個資料夾nginx,重新啟動,啟動成功。 但是當我虛擬機器重啟後依然報錯“
tomcat啟動報錯:Could not publish server configuration for Tomcat v7.0 Server at localhost。
我用的是tomcat7.0.82. tomcat報錯,無法啟動。 **報錯資訊:**Could not publish server configuration for Tomcat v7.0 server at localhost. 和 Server Tomcat v7.0 Ser
Mybatis啟動報錯: No typehandler found for property xxxx 的另一種可能(由CLOB型別導致的問題)
背景:搭了一個demo專案啟動的時候Mybatis報錯錯誤資訊:Caused by: java.lang.IllegalStateException: No typehandler found for
Win7下,nginx預設80埠被System佔用,造成nginx啟動報錯
在win7 32位旗艦版下,啟動1.0.8版本nginx,顯示如下錯誤: 2012/04/02 13:55:59 [emerg] 7864#2376: bind() to 0.0.0.0:80 failed (10013: An attempt w
mycat啟動報錯:could not reserve enough space for 2097152KB object heap 解決辦法
mycat啟動報錯:解決辦法:1、修改wrapper.xml中記憶體引數wrapper.java.additional.10=-Xmx4G wrapper.java.additional.11=-Xms1G 根據實際情況設定例如修改成wrapper.java.addit
tomcat啟動報錯:Unable to complete the scan for annotations for web application
tomcat啟動報錯,具體報錯資訊如下: Unable to complete the scan for annotations for web application [/Ftrans] due to a StackOverflowError. Possible root