解決Nginx的13: Permission denied) while connecting to upstream
一、問題
做Nginx負載的時候,經常遇到這樣的情況:
2018/12/04 11:05:08 [crit] 2717#2717: *10 connect() to 127.0.0.1:5601 failed (13: Permission denied) while connecting to upstream, client: 172.16.4.33, server: 172.16.4.141, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "172.16.4.141"
客戶端訪問時提示502錯誤,防火牆、負載均衡配置,都是正常的。該機器訪問127.0.0.1:5601也是正常的,遠端訪問也正常,就是Nginx做轉發後就是不行。
二、原因
是因為SeLinux的限制。
三、解決
1.關閉SeLinux
1.臨時關閉(不用重啟機器):
setenforce 0 ##設定SELinux 成為permissive模式
##setenforce 1 設定SELinux 成為enforcing模式
2.修改配置檔案需要重啟機器:
修改/etc/selinux/config 檔案
將SELINUX=enforcing改為SELINUX=disabled
重啟機器即可
2.執行下面的命令
setsebool -P httpd_can_network_connect 1
相關推薦
解決Nginx的13: Permission denied) while connecting to upstream
一、問題 做Nginx負載的時候,經常遇到這樣的情況: 2018/12/04 11:05:08 [crit] 2717#2717: *10 connect() to 127.0.0.1:5601 failed (13: Permission denied) while connecting to u
django uwsgi nginx 部署出現 'Permission denied while connecting to upstream' (socket)
參考https://stackoverflow.com/questions/35400393/nginxuwsgidjango-permission-denied-while-connecting-to-upstream-socket 將專案檔案轉移到了/home/下,解決了問題  
解決 ERROR:Docker Got permission denied while trying to connect to the Docker daemon socket at unix://
報錯資訊: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fv
記一次nginx負載均衡轉發錯誤 “no live upstreams while connecting to upstream ”
先描述一下環境,前段的負載均衡轉發給nginx,nginx再轉發給後端的應用伺服器。 nginx配置檔案如下: upstream ads { server ap1:8888 max_fails=1 fail_timeout=60s;
connect() failed (111: Connection refused) while connecting to upstream, client: 111.199.84.121, s
配置好lnmp後,在瀏覽器中執行程式後,出現上面的錯誤。 轉自:http://www.xuejiehome.com/blread-1828.html I'm experiencing 502 gateway errors when accessing a PHP file in a dire
Solving Docker permission denied while trying to connect to the Docker daemon socket
The error message tells you that your current user can’t access the docker engine, because you’re lacking permissions to access the unix socket to communic
connect() failed (111: Connection refused) while connecting to upstream, cli
oca bash tcp netstat pre 修改 cli www grep php-fpm沒有運行 執行如下命令查看是否啟動了php-fpm,如果沒有則啟動你的php-fpm即可 netstat -ant | grep 9000 沒有運行為空,有運行顯示 t
”Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker
轉載地址:Docker啟動Get Permission Denied 以下問題及解決方法都在Ubuntu16.04下,其他環境類似 問題描述 安裝完docker後,執行docker相關命令,出現 ”Got permission denied while trying to conne
nginx 報錯 502 error日誌connect() failed (111: Connection refused) while connecting to upstream
公司網站搬遷到新伺服器後,發現站點訪問不了,network裡面提示502,檢視相關的server配置,感覺沒有什麼問題,經過測試發現txt、html、等非php檔案能夠直接訪問,也就是php訪問不了,初步斷定有可能是php-fpm沒有安裝或者沒有啟動導致。 首先判斷php-fpm是否已經
錯誤:Got permission denied while trying to connect to the Docker daemon socket at....
用JSch實現遠端執行docker命令報錯: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: P
nginx php-fpm 110: Connection timed out) while connecting to upstream 錯誤
2012/07/04 21:50:27 [error] 19075#0: *4 connect() failed (110: Connection timed out) while connecting to upstream, client: 58.252.89.95,
docker執行命令報錯:Got permission denied while trying to connect to the Docker daemon socket at unix:///va
環境:ubuntu16.04執行命令:docker run -it centos報錯:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/do
nginx 報錯 connect() failed (111: Connection refused) while connecting to upstream
連接不上 安裝 tst 端口 修改 rip 網站頁面 導致 file 公司網站搬遷到新服務器後,發現站點訪問不了,network裏面提示502,查看相關的server配置,感覺沒有什麽問題,經過測試發現txt、html、等非php文件能夠直接訪問,也就是php訪問不了,初步
Got permission denied while trying to connect to the Docker daemon socket at
出現 mon ket get 由於 use 添加 con arp 添加新用戶後執行docker命令由於沒權限出現以下報錯: ”Got permission denied while trying to connect to the Docker daemo
linux 下apche無法監聽端口解決辦法(Permission denied: make_sock: could not bind to address)
gas his sys linux. ngs eui ner 一是 fix 想建立一個測試用的虛擬主機,遇到了這個問題:[root@localhost html]# service httpd startStarting httpd: httpd: Could not re
spark 卡在spark context,運行出現spark Exception encountered while connecting to the server : javax.security.sasl.SaslException
stand exc val user red class 運行 password spa 原因: 使用root用戶運行spark代碼 解決方法:使用非管理員賬戶運行spark即可 [[email protected] bin]$ ./add-user.sh
mpich2 error while connecting to host 由於目標計算機積極拒絕,無法連線。 (10061)
你是在win7中弄得吧?你需要管理員許可權安裝smpd //win7預設提不了權,xp則直接最高許可權 win7中管理員執行cmd.exe 在dos中進入安裝路徑下執行smpd -install -phrase
zabbix監控snmp問題error:Timeout while connecting to
碰到這個問題是在新增H3C交換機之後設定SNMP 出現Timeout while connecting to 在H3C交換機的超級終端上 是由於community(團體)不是public導致的 將團體設定一個只讀的public 然後通過snmpwalk去獲取值 使
解決Mac nginx問題 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
denied 解決 pos == min 鏈接 home 裏的 services brew services restart nginx Stopping nginx... (might take a while) ==> Successfully stopped n
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied問題解決方法
在搭建TensorFlow環境中,pip install xxx 時遇到了如下問題,查閱了很多資料,寫的很亂很雜,現在我獨闢一畝田,寫下自己的解決方案 問題描述如下 Could not install packages due to an Environme