<?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; TNS-12535</title>
	<atom:link href="http://www.ochef.net/tag/tns-12535/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ochef.net</link>
	<description>RDBMS and My Life</description>
	<lastBuildDate>Tue, 10 Aug 2010 14:25:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>VIP Failover Take Long Time After Network Cable Pulled</title>
		<link>http://www.ochef.net/2010/01/vip-failover-take-long-time-after-network-cable-pulled/</link>
		<comments>http://www.ochef.net/2010/01/vip-failover-take-long-time-after-network-cable-pulled/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:13:25 +0000</pubDate>
		<dc:creator>ochef</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[TNS-12535]]></category>
		<category><![CDATA[TNS-12560]]></category>
		<category><![CDATA[TNS-505]]></category>

		<guid isPermaLink="false">http://www.ochef.net/?p=751</guid>
		<description><![CDATA[在一个10g RAC环境中测试拔掉网线，vip的切换花了很长时间，在oracle support上搜索如下： [ID 403743.1] Applies to: Oracle Server &#8211; Enterprise Edition &#8211; Version: 10.2.0.1 to 11.1.0.7 This problem can occur on any platform. Symptoms This example is based on SUN Solaris platform, with IPMP configured for the public network. In this case, VIP failover takes almost 4 minutes to complete when both network cables [...]]]></description>
			<content:encoded><![CDATA[<p>在一个10g RAC环境中测试拔掉网线，vip的切换花了很长时间，在<a href="http://support.oracle.com" target="_blank">oracle support</a>上搜索如下：</p>
<p><span style="font-family: helvetica;"><strong>[ID 403743.1]</strong></span></p>
<p>Applies to:</p>
<p>Oracle Server &#8211; Enterprise Edition &#8211; Version: 10.2.0.1 to 11.1.0.7</p>
<p>This problem can occur on any platform.</p>
<p>Symptoms</p>
<p>This example is based on SUN Solaris platform, with IPMP configured for the public network. In this case, VIP failover takes almost 4 minutes to complete when both network cables of the public network are pulled from one node.</p>
<p>crsd.log shows:</p>
<p>2006-12-07 13:14:05.401: [ CRSAPP][4588] CheckResource error for ora.node1.vip error code = 1</p>
<p>2006-12-07 13:14:05.408: [ CRSRES][4588] In stateChanged, ora.node1.vip target is ONLINE</p>
<p>2006-12-07 13:14:05.409: [ CRSRES][4588] ora.node1.vip on node1 went OFFLINE unexpectedly</p>
<p>&lt;&lt;&lt; detect network cable failure and VIP OFFLINE immediately</p>
<p>2006-12-07 13:14:05.410: [ CRSRES][4588] StopResource: setting CLI values</p>
<p>2006-12-07 13:14:05.420: [ CRSRES][4588] Attempting to stop `ora.node1.vip` on member `node1`</p>
<p>2006-12-07 13:14:06.651: [ CRSRES][4588] Stop of `ora.node1.vip` on member `node1` succeeded.</p>
<p>2006-12-07 13:14:06.652: [ CRSRES][4588] ora.node1.vip RESTART_COUNT=0 RESTART_ATTEMPTS=0</p>
<p>2006-12-07 13:14:06.667: [ CRSRES][4588] ora.node1.vip failed on node1 relocating.</p>
<p>2006-12-07 13:14:06.758: [ CRSRES][4588] StopResource: setting CLI values</p>
<p>2006-12-07 13:14:06.766: [ CRSRES][4588] Attempting to stop `ora.node1.LISTENER_NODE1.lsnr` on member `node1`</p>
<p>2006-12-07 13:17:41.399: [ CRSRES][4588] Stop of `ora.node1.LISTENER_NODE1.lsnr` on member `node1` succeeded.</p>
<p>&lt;&lt;&lt; takes 3.5 minutes to stop listener</p>
<p>2006-12-07 13:17:41.402: Attempting to stop `ora.node1.ASM1.asm` on member `node1`</p>
<p>&lt;&lt;&lt; stop dependant inst and ASM</p>
<p>2006-12-07 13:17:55.610: [ CRSRES][4588] Stop of `ora.node1.ASM1.asm` on member `node1` succeeded.</p>
<p>2006-12-07 13:17:55.661: [ CRSRES][4588] Attempting to start `ora.node1.vip` on member `node2`</p>
<p>2006-12-07 13:18:00.260: [ CRSRES][4588] Start of `ora.node1.vip` on member `node2` succeeded.</p>
<p>&lt;&lt;&lt; now VIP failover complete after almost 4 mins</p>
<p>ora.node1.LISTENER_NODE1.lsnr.log shows:</p>
<p>Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1vip)(PORT=1521)(IP=FIRST)))</p>
<p>TNS-12535: TNS:operation timed</p>
<p>2006-12-07 13:17:41.329: [ RACG][1] [23916][1][ora.node1.LISTENER_NODE1.lsnr]: out</p>
<p>TNS-12560: TNS:protocol adapter error</p>
<p>TNS-00505: Operation timed out</p>
<p>Solaris Error: 145: Connection timed out</p>
<p>Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.10.100)(PORT=1521)(IP=FIRST)))</p>
<p>The command completed successfully</p>
<p>Client connection hang during this failover time.</p>
<p>Changes</p>
<p><strong>This may be a new setup, or a setup that was migrated from an earlier release.</strong></p>
<p>Cause</p>
<p>This problem is caused by the first address in the listener.ora configuration being an address that uses the TCP protocol.</p>
<p>In this circumstance, when a network cable is pulled, &#8220;lsnrctl stop&#8221; listener has to wait for TCP timeout before it can check next address. On the Solaris platform, TCP timeout is defined by tcp_ip_abort_cinterval with a default value of 180000 (3 minutes).   That is why shutting down listener almost took 3.5 minutes. (TCP timeout on other platforms may vary).  The error message &#8220;Solaris Error: 145: Connection timed out&#8221; in ora.node1.LISTENER_NODE1.lsnr.log also indicates it is waiting for tcp timeout.</p>
<p>The listener.ora in this scenario is defined as:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">LISTENER_NODE1 <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>DESCRIPTION_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> node1vip<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1521</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>IP <span style="color: #66cc66;">=</span> FIRST<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> 10<span style="color: #66cc66;">.</span>1<span style="color: #66cc66;">.</span>10<span style="color: #66cc66;">.</span>100<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1521</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>IP <span style="color: #66cc66;">=</span> FIRST<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> IPC<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">=</span> EXTPROC<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Solution</p>
<p><span style="color: #ff0000;">To prevent this, move the IPC address to be the first address for the listener in the listener.ora</span>, eg:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">LISTENER_NODE1 <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>DESCRIPTION_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>DESCRIPTION <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> IPC<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">=</span> EXTPROC<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> node1vip<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1521</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>IP <span style="color: #66cc66;">=</span> FIRST<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS_LIST <span style="color: #66cc66;">=</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>ADDRESS <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#40;</span>PROTOCOL <span style="color: #66cc66;">=</span> TCP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>HOST <span style="color: #66cc66;">=</span> 10<span style="color: #66cc66;">.</span>1<span style="color: #66cc66;">.</span>10<span style="color: #66cc66;">.</span>100<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>PORT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1521</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>IP <span style="color: #66cc66;">=</span> FIRST<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>When lsnrctl tries to stop the listener, it will now connect to the IPC address first, which is available during that time. It will not have to wait for tcp timeout.</p>
<p>After the above change, the VIP failover only takes 48 to 50 seconds to complete regardless of the tcp_ip_abort_cinterval setting.</p>
<p>Please note, listener.ora files newly created from 10.2.0.3 to 11.1.0.7 should have the IPC protocol as the first address in listener.ora in most cases.  However, if you have upgraded from a previous release, or manually modified/copied over a listener.ora from a previous install, you may not have the IPC protocol as the first address, regardless of your version. Manual modification is required to move IPC protocol to be the first address to avoid the problem described in this note.</p>
<p>BTW：<a href="http://www.oralife.cn/html/2010/597_vip-ipc.html" target="_blank">梦想有多远</a>的blog也有说明。</p>
<p>-The End-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ochef.net/2010/01/vip-failover-take-long-time-after-network-cable-pulled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
