{"id":227,"date":"2016-12-30T09:53:34","date_gmt":"2016-12-30T01:53:34","guid":{"rendered":"http:\/\/www.lisq.net.cn\/?p=227"},"modified":"2017-01-04T08:13:13","modified_gmt":"2017-01-04T00:13:13","slug":"dcd%e5%92%8ctcp-keepalive-%e6%af%94%e8%be%83","status":"publish","type":"post","link":"https:\/\/www.lisq.net\/?p=227","title":{"rendered":"DCD\u548cTCP keepalive \u6bd4\u8f83"},"content":{"rendered":"<p>\u76f8\u540c\u70b9<\/p>\n<ol>\n<li>\u529f\u80fd\u57fa\u672c\u4e00\u6837\uff0c\u90fd\u662f\u9632\u6b62\u7a7a\u95f2\u4f1a\u8bdd\u88ab\u9632\u706b\u5899\u6740\u6b7b<\/li>\n<li>\u914d\u7f6e\u5b8c\u6210\u5747\u4e0d\u4f1a\u5bf9\u73b0\u6709\u4f1a\u8bdd\u4ea7\u751f\u5f71\u54cd\uff0c\u4f1a\u8bdd\u8981\u91cd\u65b0\u767b\u9646\u624d\u53ef\u4ee5<\/li>\n<li>\u90fd\u53ea\u80fd\u914d\u7f6e\u5728\u6570\u636e\u5e93\u670d\u52a1\u7aef<\/li>\n<\/ol>\n<p>\u4e0d\u540c\u70b9<\/p>\n<p>DCD\u914d\u7f6e<\/p>\n<p>sqlnet.expire_time<\/p>\n<p>lsnrctl reload\u00a0\u914d\u7f6e\u751f\u6548<\/p>\n<p>TCP keepalive<\/p>\n<p>\/etc\/sysctl.conf \u914d\u7f6e\uff1a<\/p>\n<p>net.ipv4.tcp_keepalive_time = 3600<br \/>\nnet.ipv4.tcp_keepalive_intvl = 30<br \/>\nnet.ipv4.tcp_keepalive_probes = 3<\/p>\n<p>sysctl -p \u914d\u7f6e\u751f\u6548<\/p>\n<p>TCPDUMP\u7ed3\u679c<\/p>\n<p>\/*<br \/>\ntcp_keepalive<br \/>\n*\/<br \/>\n17:06:48.692935 IP 192.168.8.49.40167 &gt; ptest.ncube-lm: Flags [.], ack 4934, win 295, options [nop,nop,TS val 2130653937 ecr 2243044224], length 0<br \/>\n17:06:49.692457 IP ptest.ncube-lm &gt; 192.168.8.49.40167: Flags [.], ack 4665, win 296, options [nop,nop,TS val 2243045264 ecr 2130653937], length 0<br \/>\n\/*<br \/>\nDCD<br \/>\n*\/<br \/>\n17:32:04.338851 IP ptest.ncube-lm &gt; 192.168.8.49.40443: Flags [P.], seq 4942:4952, ack 4665, win 296, options [nop,nop,TS val 2244559910 ecr 2132109599], length 10<br \/>\n17:32:04.339805 IP 192.168.8.49.40443 &gt; ptest.ncube-lm: Flags [.], ack 4952, win 294, options [nop,nop,TS val 2132169611 ecr 2244559910], length 0<\/p>\n<p><span style=\"color: #ff0000;\">\u540c\u65f6\u914d\u7f6e\u4e86DCD\u548cTCP keepalive\uff0c\u53ea\u6709DCD\u5728\u5de5\u4f5c\uff0c\u6d4b\u8bd5\u73af\u5883(\u00a0CentOS release 6.5\/Oracle 11.2.0.1)\u3002<\/span><\/p>\n<p><span style=\"color: #ff0000;\">RAC\u6a21\u5f0f\u4e0b\uff0cDCD\u53c2\u6570\u5fc5\u987b\u914d\u7f6e\u5728RDBMS_HOME\u4e0b\uff0c\u5426\u5219\u4e0d\u751f\u6548<\/span><\/p>\n<p>ALert \u62a5\u9519\u4fe1\u606f<\/p>\n<p>***********************************************************************<\/p>\n<p>Fatal NI connect error 12170.<\/p>\n<p>VERSION INFORMATION:<br \/>\nTNS for Linux: Version 11.2.0.1.0 &#8211; Production<br \/>\nOracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 &#8211; Production<br \/>\nTCP\/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 &#8211; Production<br \/>\nTime: 31-12\u6708-2015 23:05:47<br \/>\nTracing not turned on.<br \/>\nTns error struct:<br \/>\nns main err code: 12535<\/p>\n<p>TNS-12535: TNS: \u64cd\u4f5c\u8d85\u65f6<br \/>\nns secondary err code: 12560<br \/>\nnt main err code: 505<\/p>\n<p>TNS-00505: \u64cd\u4f5c\u8d85\u65f6<br \/>\nnt secondary err code: 110<br \/>\nnt OS err code: 0<br \/>\nClient address: (ADDRESS=(PROTOCOL=tcp)(HOST=XXX.XXX.XXX.XXX)(PORT=41745))<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76f8\u540c\u70b9 \u529f\u80fd\u57fa\u672c\u4e00\u6837\uff0c\u90fd\u662f\u9632\u6b62\u7a7a\u95f2\u4f1a\u8bdd\u88ab\u9632\u706b\u5899\u6740\u6b7b \u914d\u7f6e\u5b8c\u6210 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","hentry","category-oracle"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7zRbQ-3F","_links":{"self":[{"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lisq.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":5,"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/www.lisq.net\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/233"}],"wp:attachment":[{"href":"https:\/\/www.lisq.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lisq.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lisq.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}