<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[php-fpm 配置不当 导致 nginx 502 错误一例]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Tue, 30 Sep 2014 16:07:21 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：开php-fpm的9000端口，有时配置出错会出现502，特别转载。<br/>不要总看nginx 的日志文件。<br/>对于开端口这种事情，listen.allowed_clients 里逗号分割不能有空格！<br/>[www]<br/>listen = 10.11.80.49:9000<br/>listen.allowed_clients = 10.11.80.47,10.11.80.48, 10.11.80.49<br/><br/> <br/>cat /home/php/logs/php-fpm.log 部分内容如下<br/> <br/>&quot;Error: Wrong IP address &#039; 10.11.80.49&#039; in listen.allowed_clients&quot;<br/>&quot;Error: Connection disallowed: IP address &#039;10.11.80.49&#039; has been dropped.&quot;<br/> <br/>ERROR: Connection disallowed: IP address &quot;10.11.80.49&quot; has been dropped<br/> <br/>回头且看php-fpm 配置文件<br/>cat /home/php/etc/php-fpm.conf <br/> <br/>[global]<br/>pid = /home/php/logs/php-fpm.pid<br/>error_log = /home/php/logs/php-fpm.log<br/>log_level = notice<br/> <br/>[www]<br/>listen = 10.11.80.49:9000<br/>listen.allowed_clients = 10.11.80.47,10.11.80.48, 10.11.80.49<br/>user = nobody<br/>group = nobody<br/> <br/>slowlog = /home/php/logs/slow.log<br/>catch_workers_output = yes<br/>request_terminate_timeout = 30s<br/>request_slowlog_timeout = 5s<br/> <br/>pm = dynamic<br/>pm.max_children = 100<br/>pm.start_servers = 50<br/>pm.min_spare_servers = 5<br/>pm.max_spare_servers = 100<br/> <br/>就是这里<br/> <br/>[www]<br/>listen = 10.11.80.49:9000<br/>listen.allowed_clients = 10.11.80.47,10.11.80.48, 10.11.80.49<br/>user = nobody<br/>group = nobody<br/> <br/>netstat 看到的端口是listen 状态，启动php-fpm 无报错。<br/>其它两台机器 47 48 也没有问题，我就奇怪了，telnet 一下测试<br/> <br/>#telnet 10.11.80.49 9000<br/>Tring 10.11.80.49 ...<br/>Connected to 10.11.80.49<br/>Esape character is &#039;^]&#039;.<br/> <br/>我分别在47 和48 上测试， 发现不一样的就是 49 是被直接close 掉的。<br/>后面再看配置文件，48 后面多了一个空格。去掉重启，测试，我勒个去。<br/><br/>来自：http://adslroot.blogspot.com/2014/02/php-fpm-nginx-502.html
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] php-fpm 配置不当 导致 nginx 502 错误一例]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>