<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi,All,</div><div>The&nbsp;<span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">&nbsp;</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">file descriptors are "netlink".</span></div><div>&nbsp;$sudo lsof -p $(pidof ovs-vswitchd)</div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">ovs-vswit&nbsp;2197&nbsp;root&nbsp;*297u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;42309398&nbsp;GENERIC</span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">ovs-vswit&nbsp;2197&nbsp;root&nbsp;*298u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;42309399&nbsp;GENERIC<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*299u&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sock&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0,7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;42309400&nbsp;protocol:&nbsp;NETLINK<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*300u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;42309401&nbsp;GENERIC<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*301u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;42309402&nbsp;GENERIC</span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">...More...<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*351u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;39326247&nbsp;GENERIC<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*352u&nbsp;&nbsp;netlink&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0t0&nbsp;&nbsp;&nbsp;39121841&nbsp;GENERIC<br>ovs-vswit&nbsp;2197&nbsp;root&nbsp;*354w&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;253,0&nbsp;10086253&nbsp;1342248977&nbsp;/var/log/openvswitch/ovs-vswitchd.log<br>$sudo reboot<br></span></div><div>When I restart the machine ,the file descriptor will increasing.Some time more then 12K record.</div><div><br></div><div>Recenty log about openvswitch.</div><div><b>ovsdb-server.log</b></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">2017-10-21T04:01:02.559Z|01308|jsonrpc|WARN|Dropped&nbsp;7&nbsp;log&nbsp;messages&nbsp;in&nbsp;last&nbsp;17&nbsp;seconds&nbsp;(most&nbsp;recently,&nbsp;10&nbsp;seconds&nbsp;ago)&nbsp;due&nbsp;to&nbsp;excessive&nbsp;rate<br>2017-10-21T04:01:02.559Z|01309|jsonrpc|WARN|unix:&nbsp;receive&nbsp;error:&nbsp;Connection&nbsp;reset&nbsp;by&nbsp;peer<br>2017-10-21T04:01:02.560Z|01310|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:03.282Z|01311|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:10.075Z|01312|jsonrpc|WARN|Dropped&nbsp;1&nbsp;log&nbsp;messages&nbsp;in&nbsp;last&nbsp;7&nbsp;seconds&nbsp;(most&nbsp;recently,&nbsp;7&nbsp;seconds&nbsp;ago)&nbsp;due&nbsp;to&nbsp;excessive&nbsp;rate<br>2017-10-21T04:01:10.075Z|01313|jsonrpc|WARN|unix:&nbsp;send&nbsp;error:&nbsp;Broken&nbsp;pipe<br>2017-10-21T04:01:10.076Z|01314|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Broken&nbsp;pipe)<br>2017-10-21T04:01:14.907Z|01315|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:20.134Z|01316|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Broken&nbsp;pipe)<br>2017-10-21T04:01:27.499Z|01317|jsonrpc|WARN|Dropped&nbsp;2&nbsp;log&nbsp;messages&nbsp;in&nbsp;last&nbsp;13&nbsp;seconds&nbsp;(most&nbsp;recently,&nbsp;8&nbsp;seconds&nbsp;ago)&nbsp;due&nbsp;to&nbsp;excessive&nbsp;rate<br>2017-10-21T04:01:27.499Z|01318|jsonrpc|WARN|unix:&nbsp;receive&nbsp;error:&nbsp;Connection&nbsp;reset&nbsp;by&nbsp;peer<br>2017-10-21T04:01:27.499Z|01319|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:33.758Z|01320|jsonrpc|WARN|unix:&nbsp;receive&nbsp;error:&nbsp;Connection&nbsp;reset&nbsp;by&nbsp;peer<br>2017-10-21T04:01:33.758Z|01321|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:34.489Z|01322|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:39.198Z|01323|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br>2017-10-21T04:01:41.569Z|01324|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Broken&nbsp;pipe)<br>2017-10-21T04:01:41.913Z|01325|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Broken&nbsp;pipe)<br>2017-10-21T04:01:42.365Z|01326|reconnect|WARN|unix:&nbsp;connection&nbsp;dropped&nbsp;(Connection&nbsp;reset&nbsp;by&nbsp;peer)<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div>
<div><b>ovs-vswitchd.log</b></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">2017-10-21T03:56:10.511Z|422666|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.513Z|422667|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.516Z|422668|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.518Z|422669|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.520Z|422670|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.523Z|422671|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br>2017-10-21T03:56:10.525Z|422672|netlink_socket|ERR|connect(0):&nbsp;Argument&nbsp;list&nbsp;too&nbsp;long<br></span></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div style="font-size: 15px;"><br></div><div style="font-size: 16px;"><span style="font-family: monospace; line-height: normal; white-space: pre-wrap; widows: 1; background-color: window;">  <b><a href="http://www.hetianlab.com" class="">合天网安实验室</a>-您身边的信息安全实验室</b>   | </span>quan_hping@heetian.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div>&nbsp;</div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b>&nbsp;<a href="mailto:blp@ovn.org">Ben Pfaff</a></div><div><b>Date:</b>&nbsp;2017-10-21&nbsp;01:41</div><div><b>To:</b>&nbsp;<a href="mailto:quan_hping@heetian.com">quan_hping@heetian.com</a></div><div><b>CC:</b>&nbsp;<a href="mailto:ovs-discuss@openvswitch.org">ovs-discuss</a></div><div><b>Subject:</b>&nbsp;Re: [ovs-discuss] ovs-vswitch Huge number of netlink file descriptors open</div></div></div><div><div>On Fri, Oct 20, 2017 at 06:56:26PM +0800, quan_hping@heetian.com wrote:</div>
<div>&gt; Hi All,</div>
<div>&gt; I searched a mail list like my problem.</div>
<div>&gt; https://mail.openvswitch.org/pipermail/ovs-discuss/2017-March/043817.html </div>
<div>&gt; </div>
<div>&gt; $sudo lsof -p $(pidof ovs-vswitchd) | wc -l</div>
<div>&gt; 115536</div>
<div>&gt; $cat /proc/$(cat /var/run/openvswitch/ovs-vswitchd.pid)/limits | grep open</div>
<div>&gt; Max open files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 999999&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 999999&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; files</div>
<div>&gt; $ovs-vsctl show | grep -c Port</div>
<div>&gt; 905</div>
<div>&gt; If anyone has any suggestions for how to solve it?Thanks.</div>
<div>&nbsp;</div>
<div>Can you find out what kinds of file descriptors are open?&nbsp; Are they</div>
<div>sockets (and what kind), etc.?</div>
<div>&nbsp;</div>
<div>This could be a file descriptor leak of some kind.&nbsp; If it is, then</div>
<div>restarting OVS would fix it; if it is not, then restarting OVS will not</div>
<div>help, or at least not for long.&nbsp; Can you figure out whether restarting</div>
<div>reduces the number of file descriptors, and by how much?</div>
</div></blockquote>
</body></html>