socket() failed (13: Permission denied) while connecting to upstream
/***************************************************************************
* socket() failed (13: Permission denied) while connecting to upstream
* 说明:
* 这个错误隐藏的挺深的,观察了许久,才从ps aux中的执行用户中找出来。
*
* 2016-9-26 深圳 南山平山村 曾剑锋
**************************************************************************/ 一、错误现象:
// :: [alert] #: * socket() failed (: Permission denied) while connecting to upstream, client: 192.168.1.144, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.203" 二、原因:
. # ps aux
......
root /sbin/klogd -n
root udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0
root nginx: master process /usr/sbin/nginx
www-data nginx: worker process
root /usr/sbin/sshd
root /usr/sbin/telnetd -F
root php-cgi -b 127.0.0.1: -c /etc/php.ini
root {mysqld_safe} /bin/sh /usr/bin/mysqld_safe --pid-file=/run/mysql
root /usr/libexec/mysqld --basedir=/usr --datadir=/var/mysql --user=r
root -sh
root ps
. 如上所示,1468进程执行用户是www-data无法访问到1485进程的php-cgi,因为这个root权限。 三、解决办法:
cat /etc/nginx/nginx.conf
user root;
......
socket() failed (13: Permission denied) while connecting to upstream的更多相关文章
- 解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,
问题:搭建好项目之后,用nginx进行代理,进行日常配置之后,发现前端正常访问,但是后端访问出现错误,报502错误,查找nginx日志,发现connect() to 127.0.0.1:8080 fa ...
- 解决nginx下connect() to 127.0.0.1:3000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: 错误信息
尝试搭建nginx负载均衡,做域名转发时报如上错误,困扰了好长时间还好没放弃,还好百度找到解决办法: 是SeLinux导致: 1.执行下面的命令 setsebool -P httpd_can_netw ...
- Nginx: 解决connect() to xxxx failed (13: Permission denied) while connecting to upstream的问题
一句话:setsebool httpd_can_network_connect true
- Centos 7 上使用nginx为Node.js配置反向代理时错误:(13: Permission denied) while connecting to upstream
错误来源:Centos 7 上使用nginx为Node.js配置反向代理时产生(13: Permission denied) while connecting to upstream的错误 nginx ...
- 解决Nginx的13: Permission denied) while connecting to upstream
一.问题 做Nginx负载的时候,经常遇到这样的情况: // :: [crit] #: * connect() to failed (: Permission denied) while connec ...
- php fpm安装curl后,nginx出现connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied)的错误
这里选择直接apt-get安装,因为比起自己编译简单多了,不需要自己配置什么 #sudo apt-get install curl libcurl3 libcurl3-dev php5-curl 安装 ...
- 解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
在进行Nginx+Tomcat 负载均衡的时候遇到了这个权限问题,在error.log日志中.我们能够看到例如以下: connect() to 127.0.0.1:8080 failed (13: P ...
- nginx 502错 failed (13: Permission denied)
安装nginx和php-fpm之后出现502错误 找了个理由说php-fpm不启动 ,但在我的实践中,该过程开始 找了半天没找到病因.视图nginx记录后 我发现下面的错误 [crit] 2686#0 ...
- Ubuntu nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
在Ubuntu 12中启动刚安装好的Nginx,报错: nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) 原因如下: ...
随机推荐
- mongodb的监控与性能优化
一.mongodb的监控 mongodb可以通过profile来监控数据,进行优化. 查看当前是否开启profile功能用命令 db.getProfilingLevel() 返回level等级,值为 ...
- Hadoop Hello World
Hadoop单机环境配置OK后,需要找个例子测试一下Mapreduce功能.因此从Hadoop源代码中找到一个例子:WordCount.java,来验证. 编译过程如下: cd hadoop-exam ...
- NSDateFormatter 根据时间戳求出时间
NSDateFormatter 根据时间戳求出时间 - (void)detailWithStyle:(NSString*)style time:(NSInteger)time { // NSStrin ...
- mac下安装apache+php+mysql
运行“sudo apachectl start”,再输入帐号密码,这样Apache就运行了. 运行“sudo apachectl -v”,你会看到Mac OS X 10.6.3中的Apache版本号: ...
- highcharts的.net本地导出环境安装记录
由于项目中highcharts需要内网使用,需要本地搭建导出的环境.下面简述下步骤: 1.下载开源的.net导出文件:https://github.com/imclem/Highcharts-expo ...
- Cisco IOS basic system management command reference
absolute : to specify an absolute time for a time-range (in time-range configuration mode) no absolu ...
- jQuery 1.7_20120209 学习笔记
html([val|fn]) parameters: function(index,html) 此函数返回一个html字符串,接受两个参数,index为元素在集合中的索引位置,html为原先的html ...
- SharePoint 2013 配置我的网站 图文引导
博客地址:http://blog.csdn.net/FoxDave 本篇我们来讲述一下关于SharePoint中我的网站(My Sites)相关的东西. 我的网站是SharePoint 2013中面向 ...
- Windows Azure 实操 —— 迁移本地SharePoint服务器到Azure
博客地址 http://blog.csdn.net/foxdave 注意:如果你是第二代虚拟机,那就别看这个了,老老实实在Azure上重新创建吧,Azure不支持第二代虚拟机. 写在之前,对Azure ...
- C++ primer的第三章的主要内容
第三章主要介绍了C++中标准库类型.主要讲到string和vector类型.在string类型中,能够很方便的操作字符串,应该要注意的地方就是它的字符串中元素的位置的类型是:size_type类型的数 ...