<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[nxagentd на ubuntu - 24 Too many open files]]></title><description><![CDATA[<p dir="auto">День добрый!<br />
После продолжительного времени работы <strong>netxms agent</strong> на <strong>ubuntu linux</strong>, агент перестаёт работать. Он не собирает статистику. Все значения замирают, при этом timestamp всех dci обновляется. Графики превращаются в линии, соединение не рвётся, агент никак не сообщает в Management console что он мёртв.  В логе агента сыпятся ошибки</p>
<pre><code> *E* [                   ] Unable to accept incoming connection (24 Too many open files)
</code></pre>
<p dir="auto">Временное лечение это перезагрузить сервис агента. Хватит примерно на неделю в моём случае<br />
Я использую <strong>logparser</strong> , мониторю всего-то 4 лог файла, на них настроен <strong>logrotate</strong> по умолчанию.<br />
при запуске сервиса <strong>nxagentd</strong> по умолчанию стоит ограничение <strong>ulimit soft limit 1024</strong>. При повышении данного параметра до 2048 проблема повторится не через неделю, а через 2 недели.</p>
<p dir="auto">При запуске агента, его процесс открывает 16 дескрипторов файлов в моём случае. Вывод делал командой:</p>
<pre><code>ls /proc/&lt;nxagentd_pid&gt;/fd/ | wc -l
</code></pre>
<p dir="auto">На следующее утро цифра увеличивается уже до 82<br />
Когда замечаю что агент не работает, и валятся ошибки <strong>Too many open files</strong> вывод команды показывает число <strong>soft limit</strong><br />
Очень похоже на <strong>open files descriptor leak</strong>. На всех серверах где стоит ubuntu и netxms agent последней версии есть проблема. К сожаление точно не могу сказать с какой версии это началось, но точно в 2020 году. То ли в версии  3.1 то ли в 3.2 этого ещё не было. Сейчас стоит 3.8.193-1</p>
]]></description><link>https://forum.netxms.org/topic/6998/nxagentd-на-ubuntu-24-too-many-open-files</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:16:05 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6998.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Mar 2021 08:25:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Wed, 14 Apr 2021 11:57:03 GMT]]></title><description><![CDATA[<p dir="auto">Изменилось ли что-нибудь после обновления на 3.8.262?</p>
]]></description><link>https://forum.netxms.org/post/29869</link><guid isPermaLink="true">https://forum.netxms.org/post/29869</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 14 Apr 2021 11:57:03 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Mon, 12 Apr 2021 09:36:33 GMT]]></title><description><![CDATA[<p dir="auto">Похоже, что это та самая ошибка, которая починена в 3.8.262, пробуйте эту версию.</p>
]]></description><link>https://forum.netxms.org/post/29838</link><guid isPermaLink="true">https://forum.netxms.org/post/29838</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 12 Apr 2021 09:36:33 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Mon, 12 Apr 2021 06:51:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/29793">nxagentd на ubuntu - 24 Too many open files</a>:</p>
<blockquote>
<p dir="auto">Там где агент падает - поставьте пожалуйста еще -dbg пакеты (netxms-agent-dbg, netxms-dbdrv-sqlite-dbg, и т.д.) - тогда дамп будет сильно более полезным.</p>
</blockquote>
<p dir="auto">Наконец рухнул агент опять, собрал дамп (ещё старой версии 3.8.250)</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005460-gdb.txt">gdb.txt</a></p>
]]></description><link>https://forum.netxms.org/post/29836</link><guid isPermaLink="true">https://forum.netxms.org/post/29836</guid><dc:creator><![CDATA[headcraft]]></dc:creator><pubDate>Mon, 12 Apr 2021 06:51:13 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Thu, 08 Apr 2021 07:40:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/29823">nxagentd на ubuntu - 24 Too many open files</a>:</p>
<blockquote>
<p dir="auto">В списке файлов очень много раз встречается /var/log/auth.log.1, /var/log/mail.log.1, и /var/log/apcupsd.events. На агенте не настроен мониторинг этих файлов через logwatch?</p>
</blockquote>
<p dir="auto">Настроен</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/headcraft" aria-label="Profile: headcraft">@<bdi>headcraft</bdi></a> said in <a href="/post/29748">nxagentd на ubuntu - 24 Too many open files</a>:</p>
<blockquote>
<p dir="auto">Я использую <strong>logparser</strong> , мониторю всего-то 4 лог файла, на них настроен <strong>logrotate</strong> по умолчанию.</p>
</blockquote>
<p dir="auto">Logparser настроен через Policy template, вот часть xml (без rules):</p>
<pre><code>&lt;parser trace="0" name="LogParser Linux"&gt;
   &lt;macros/&gt;
   &lt;file&gt;/var/log/auth.log&lt;/file&gt;
   &lt;file&gt;/var/log/apcupsd.events&lt;/file&gt;
   &lt;file&gt;/var/log/mail.log&lt;/file&gt;
   &lt;file&gt;/var/log/proftpd/proftpd.log&lt;/file&gt;
   &lt;rules&gt;
   &lt;/rule&gt;
       .....
   &lt;/rules&gt;
&lt;/parser&gt;
</code></pre>
]]></description><link>https://forum.netxms.org/post/29826</link><guid isPermaLink="true">https://forum.netxms.org/post/29826</guid><dc:creator><![CDATA[headcraft]]></dc:creator><pubDate>Thu, 08 Apr 2021 07:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Wed, 07 Apr 2021 14:52:42 GMT]]></title><description><![CDATA[<p dir="auto">В списке файлов очень много раз встречается /var/log/auth.log.1, /var/log/mail.log.1, и /var/log/apcupsd.events. На агенте не настроен мониторинг этих файлов через logwatch?</p>
]]></description><link>https://forum.netxms.org/post/29823</link><guid isPermaLink="true">https://forum.netxms.org/post/29823</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 07 Apr 2021 14:52:42 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Wed, 07 Apr 2021 07:33:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/29793">nxagentd на ubuntu - 24 Too many open files</a>:</p>
<blockquote>
<p dir="auto">Там где агент падает - поставьте пожалуйста еще -dbg пакеты (netxms-agent-dbg, netxms-dbdrv-sqlite-dbg, и т.д.) - тогда дамп будет сильно более полезным.</p>
<p dir="auto">По поводу дескрипторов - пришлите пожалуйста вывод lsof -p для процесса агента.</p>
</blockquote>
<p dir="auto">Как поставил пакет <strong>netxms-base-dbg</strong>, всё не могу дождаться падения...</p>
<p dir="auto">Вывод <strong>lsof -p</strong> команды в приложении.</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005457-lsof.txt">lsof.txt</a></p>
]]></description><link>https://forum.netxms.org/post/29819</link><guid isPermaLink="true">https://forum.netxms.org/post/29819</guid><dc:creator><![CDATA[headcraft]]></dc:creator><pubDate>Wed, 07 Apr 2021 07:33:24 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Thu, 01 Apr 2021 08:21:41 GMT]]></title><description><![CDATA[<p dir="auto">Там где агент падает - поставьте пожалуйста еще -dbg пакеты (netxms-agent-dbg, netxms-dbdrv-sqlite-dbg, и т.д.) - тогда дамп будет сильно более полезным.</p>
<p dir="auto">По поводу дескрипторов - пришлите пожалуйста вывод lsof -p для процесса агента.</p>
]]></description><link>https://forum.netxms.org/post/29793</link><guid isPermaLink="true">https://forum.netxms.org/post/29793</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 01 Apr 2021 08:21:41 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Wed, 31 Mar 2021 07:39:13 GMT]]></title><description><![CDATA[<p dir="auto">С одного стянул coredump:</p>
<pre><code>[New LWP 15239]
[New LWP 7395]
[New LWP 7391]
[New LWP 7392]
[New LWP 7415]
[New LWP 7413]
[New LWP 7423]
[New LWP 7419]
[New LWP 15236]
[New LWP 7411]
[New LWP 7416]
[New LWP 7408]
[New LWP 7409]
[New LWP 7417]
[New LWP 7400]
[New LWP 7390]
[New LWP 7398]
[New LWP 15237]
[New LWP 15238]
[New LWP 7402]
[New LWP 7399]
[New LWP 7414]
[New LWP 7410]
[New LWP 7396]
[New LWP 7394]
[New LWP 7393]
[New LWP 7421]
[New LWP 7425]
[New LWP 7412]
[New LWP 7401]
[New LWP 7397]
[New LWP 7418]
[New LWP 7420]
[New LWP 7424]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/nxagentd -d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __wcscasecmp (s1=0x7f83ff7e3384 L"gent.Restart", s2=0x0) at wcscasecmp.c:57
57      wcscasecmp.c: No such file or directory.
</code></pre>
<p dir="auto">Вывод команды <strong>thread apply all bt full</strong> в приложении.</p>
<p dir="auto">На остальных серверах процесс nxagentd уже открыл 470 дескрипторов</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005456-coredump.txt">coredump.txt</a></p>
]]></description><link>https://forum.netxms.org/post/29782</link><guid isPermaLink="true">https://forum.netxms.org/post/29782</guid><dc:creator><![CDATA[headcraft]]></dc:creator><pubDate>Wed, 31 Mar 2021 07:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Fri, 26 Mar 2021 09:35:04 GMT]]></title><description><![CDATA[<p dir="auto">Ага, ну нет, это не тот способ бороться с утечкой дескрипторов. Агент поставлен из пакетов, так? Попробуйте core dump файл собрать при креше.</p>
]]></description><link>https://forum.netxms.org/post/29760</link><guid isPermaLink="true">https://forum.netxms.org/post/29760</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 26 Mar 2021 09:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Thu, 25 Mar 2021 15:06:58 GMT]]></title><description><![CDATA[<p dir="auto">Обновил до версии 3.8.226-1. Есть вероятность, что теперь не дождусь того дня когда дескрипторы кончатся.. На двух разных серверах под управлением убунты 16.04 и 18.04 segmentaion fault уже 2 раза за день. Вся надежда на убунту 20.04 теперь.</p>
<pre><code>Description:    Ubuntu 18.04.5 LTS
Release:        18.04
4.15.0-135-generic

Mar 25 09:09:01 SRV-HeadCraft kernel: [4471532.229875] nxagentd[31637]: segfault at 0 ip 00007f8465d989de sp 00007f845c0b9cb0 error 4 in libc-2.27.so[7f8465ccd000+1e7000]
Mar 25 09:09:03 SRV-HeadCraft systemd[1]: nxagentd.service: Main process exited, code=killed, status=11/SEGV
Mar 25 09:09:03 SRV-HeadCraft systemd[1]: nxagentd.service: Failed with result 'signal'.

Mar 25 13:00:34 SRV-HeadCraft kernel: [4485424.685005] nxagentd[19452]: segfault at 0 ip 00007f24fb5829de sp 00007f24f1da5cb0 error 4 in libc-2.27.so[7f24fb4b7000+1e7000]
Mar 25 13:00:34 SRV-HeadCraft systemd[1]: nxagentd.service: Main process exited, code=killed, status=11/SEGV
Mar 25 13:00:34 SRV-HeadCraft systemd[1]: nxagentd.service: Failed with result 'signal'.
</code></pre>
<pre><code>Description:    Ubuntu 16.04.7 LTS
Release:        16.04
4.4.0-200-generic

Mar 25 12:04:23 mail kernel: [134243.963129] nxagentd[13092]: segfault at 0 ip 00007fae5a1f8e8e sp 00007fae517cfc00 error 4 in libc-2.23.so[7fae5a13f000+1c0000]
Mar 25 12:04:23 mail systemd[1]: nxagentd.service: Main process exited, code=killed, status=11/SEGV
Mar 25 12:04:23 mail systemd[1]: nxagentd.service: Unit entered failed state.
Mar 25 12:04:23 mail systemd[1]: nxagentd.service: Failed with result 'signal'.

Mar 25 15:36:11 mail kernel: [146951.767623] nxagentd[10509]: segfault at 0 ip 00007f28f8e18e8e sp 00007f28f1795c00 error 4 in libc-2.23.so[7f28f8d5f000+1c0000]
Mar 25 15:36:11 mail systemd[1]: nxagentd.service: Main process exited, code=killed, status=11/SEGV
Mar 25 15:36:11 mail systemd[1]: nxagentd.service: Unit entered failed state.
Mar 25 15:36:11 mail systemd[1]: nxagentd.service: Failed with result 'signal'.
</code></pre>
]]></description><link>https://forum.netxms.org/post/29759</link><guid isPermaLink="true">https://forum.netxms.org/post/29759</guid><dc:creator><![CDATA[headcraft]]></dc:creator><pubDate>Thu, 25 Mar 2021 15:06:58 GMT</pubDate></item><item><title><![CDATA[Reply to nxagentd на ubuntu - 24 Too many open files on Wed, 24 Mar 2021 11:38:02 GMT]]></title><description><![CDATA[<p dir="auto">Попробуйте версию 3.8.226, какие-то исправления на тему дескрипторов там были.</p>
<p dir="auto">Если не поможет - что еще делает этот агент? Есть ли какие-нибудь external parameters?</p>
]]></description><link>https://forum.netxms.org/post/29751</link><guid isPermaLink="true">https://forum.netxms.org/post/29751</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Wed, 24 Mar 2021 11:38:02 GMT</pubDate></item></channel></rss>