<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; Linux Error: 32: Broken pipe</title>
	<atom:link href="https://www.xifenfei.com/tag/linux-error-32-broken-pipe/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Thu, 29 Oct 2026 15:31:46 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>TNS-12518: TNS:listener could not hand off client connection</title>
		<link>https://www.xifenfei.com/2024/03/tns-12518.html</link>
		<comments>https://www.xifenfei.com/2024/03/tns-12518.html#comments</comments>
		<pubDate>Tue, 12 Mar 2024 13:17:40 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[Oracle 监听]]></category>
		<category><![CDATA[Linux Error: 32: Broken pipe]]></category>
		<category><![CDATA[TNS-12518]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=10655</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2024/03/tns-12518.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2024/03/tns-12518.html" target="_blank">TNS-12518: TNS:listener could not hand off client connection</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>客户反馈业务经常性出现数据库连接异常,通过工具访问ORACLE进程报ORA-12170<br />
<a href="files://www.xifenfei.com/wp-content/uploads/2024/03/ORA-12170.png"><img src="https://www.xifenfei.com/wp-content/uploads/2024/03/ORA-12170.png" alt="ORA-12170" width="803" height="421" class="alignnone size-full wp-image-10656" /></a><br />
<hr />
通过分析发现lsnrctl status几乎hang住，tnsping延迟特别大<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2024/03/tnsping-slow.png"><img src="https://www.xifenfei.com/wp-content/uploads/2024/03/tnsping-slow.png" alt="tnsping-slow" width="1171" height="245" class="alignnone size-full wp-image-10657" /></a><br />
<hr />
进一步分析监听日志发现TNS-12518: TNS:listener could not hand off client connection错误</p>
<pre class="brush: bash; title: ; notranslate">
12-MAR-2024 15:34:50 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)
(HOST=__jdbc__)(USER=Administrator))(SERVICE_NAME=ilas)) * (ADDRESS=(PROTOCOL=tcp)
(HOST=ip)(PORT=52854)) * establish * ilas * 12518
TNS-12518: TNS:listener could not hand off client connection
 TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
    Linux Error: 32: Broken pipe
</pre>
<p>根据经验和Troubleshooting Guide for TNS-12518 TNS listener could not hand off client connection描述,检查监听文件配置</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xff admin]$ cat listener.ora
# listener.ora Network Configuration File:/home/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = /home/u01/app/oracle/product/11.2.0/dbhome_1)
      (PROGRAM = extproc)
      (ENVS = &quot;EXTPROC_DLLS=ONLY:/home/u01/app/oracle/product/11.2.0/dbhome_1/bin/oraclr11.dll&quot;)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /home/u01/app/oracle
</pre>
<p>根据经验和客户的业务进行分析,确认他们不会使用 external procedures方式访问数据库,直接修改监听配置</p>
<pre class="brush: bash; title: ; notranslate">
[oracle@xff admin]$ cat listener.ora
# listener.ora Network Configuration File:/home/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = xff)
      (ORACLE_HOME = /home/u01/app/oracle/product/11.2.0/dbhome_1)
      (GLOBAL_DBNAME = xff)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /home/u01/app/oracle
</pre>
<p>然后reload配置,再使用lsnrctl status查看结果秒出,tnsping也非常快<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2024/03/20240312205940.png"><img src="https://www.xifenfei.com/wp-content/uploads/2024/03/20240312205940.png" alt="20240312205940" width="1891" height="563" class="alignnone size-full wp-image-10658" /></a><br />
<hr />
让客户测试应用也恢复正常,一切ok,问题在最小修改的情况下解决,和最初供应商建议的重装系统,双机,数据库等解决方案大大简化</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/12/hostname%e9%85%8d%e7%bd%ae%e4%b8%8d%e5%88%87%e5%bd%93%e5%af%bc%e8%87%b4tns-12542%e9%94%99%e8%af%af.html" rel="bookmark" class="crp_title">hostname配置不切当导致TNS-12542错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/01/oracle-to-sql-gateway.html" rel="bookmark" class="crp_title">oracle to sql 透明网络配置</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2024/09/tns-12541-tns-12560-tns-00511.html" rel="bookmark" class="crp_title">监听报TNS-12541 TNS-12560 TNS-00511错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/connect-pdb-sid-use_sid_as_service_listener.html" rel="bookmark" class="crp_title">使用sid方式直接访问pdb(USE_SID_AS_SERVICE_LISTENER)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/04/oracle%e9%9d%99%e6%80%81%e7%9b%91%e5%90%ac%e5%92%8c%e5%8a%a8%e6%80%81%e7%9b%91%e5%90%ac.html" rel="bookmark" class="crp_title">Oracle静态监听和动态监听</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/06/%e5%9b%a0ipc%e5%af%bc%e8%87%b4%e5%a4%9a%e4%b8%aa%e7%9b%91%e5%90%ac%e4%b8%8d%e8%83%bd%e6%ad%a3%e5%b8%b8%e5%90%af%e5%8a%a8.html" rel="bookmark" class="crp_title">因IPC导致多个监听不能正常启动</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/11/%e5%90%8c%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%a4%9a%e7%89%88%e6%9c%ac%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9b%91%e5%90%ac%e9%85%8d%e7%bd%ae.html" rel="bookmark" class="crp_title">同台服务器多版本数据库监听配置</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/11/subscription-for-node-down-event-still-pending.html" rel="bookmark" class="crp_title">WARNING: Subscription for node down event still pending</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/10/ora-01034-ora-27101.html" rel="bookmark" class="crp_title">ORA-01034 ORA-27101故障分析</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2011/06/oracle%e7%9b%91%e5%90%ac%e8%ae%be%e7%bd%ae%e5%af%86%e7%a0%81.html" rel="bookmark" class="crp_title">Oracle监听设置密码</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/12/enterprise-manager-database-express-12c-%e6%ac%a3%e8%b5%8f.html" rel="bookmark" class="crp_title">Enterprise Manager Database Express 12c 欣赏</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2012/02/%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%aeasm.html" rel="bookmark" class="crp_title">远程访问ASM</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2024/03/tns-12518.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
