Yesterday I upgraded from 6.0 to 6.1. This problem might have been present then, but my monitors only run this particular check once a day. This morning I upgraded from 6.1 to 6.1.1.
6.1.1+9bd27f8, codename Noir
I monitor all services on my systems with needsrestart. Today after the updates I get this:
[main] #3495 uses deleted /var/lib/graylog-server/libnative/libzstd-jni-1.5.6-613249988640211524658.so
[main] #3495 is a child of #3490
[main] #3490 exe => /usr/bin/bash
[main] #3490 is graylog-server.service
I have restarted the service, and rebooted the node, and still get this error.
I have confirmed that file does not exist on the system.
Everything runs fine, but my monitors seem to think that graylog is trying to use a file that gets removed when the process starts. This is on Alma 9 using packages.
My directory looks like this:
root@graylog:~
ll /var/lib/graylog-server/libnative/
total 100
-rw------- 1 graylog graylog 99563 Oct 25 09:24 libnetty_transport_native_epoll_x86_6412433652931218598535.so
needsrestart output:
root@graylog:~
# needrestart -ma -v -rl
[main] eval /etc/needrestart/needrestart.conf
[main] eval /etc/needrestart/conf.d/schweb.conf
[main] needrestart v3.6
[main] running in root mode
[Core] Using UI 'NeedRestart::UI::stdio'...
[main] systemd detected
[Core] #633 is a NeedRestart::Interp::Java
[Core] #807 is a NeedRestart::Interp::Python
[Python] #807: source=/usr/sbin/tuned
[main] #80521 uses deleted /var/lib/graylog-server/libnative/libzstd-jni-1.5.6-616812283262751137345.so
[main] #80521 is a child of #80520
[main] #80520 exe => /usr/bin/bash
[main] #80520 is graylog-server.service
[Kernel] Linux: kernel release 5.14.0-427.40.1.el9_4.x86_64, kernel version #1 SMP PREEMPT_DYNAMIC Wed Oct 16 07:08:17 EDT 2024
[Kernel/Linux] /boot/vmlinuz-5.14.0-427.40.1.el9_4.x86_64 => 5.14.0-427.40.1.el9_4.x86_64 (mockbuild@x64-builder01.almalinux.org) #1 SMP PREEMPT_DYNAMIC Wed Oct 16 07:08:17 EDT 2024 [5.14.0-427.40.1.el9_4.x86_64]*
[Kernel/Linux] /boot/vmlinuz-5.14.0-427.37.1.el9_4.x86_64 => 5.14.0-427.37.1.el9_4.x86_64 (mockbuild@x64-builder02.almalinux.org) #1 SMP PREEMPT_DYNAMIC Tue Sep 24 17:44:03 EDT 2024 [5.14.0-427.37.1.el9_4.x86_64]
[Kernel/Linux] /boot/vmlinuz-5.14.0-427.35.1.el9_4.x86_64 => 5.14.0-427.35.1.el9_4.x86_64 (mockbuild@x64-builder01.almalinux.org) #1 SMP PREEMPT_DYNAMIC Thu Sep 12 11:21:43 EDT 2024 [5.14.0-427.35.1.el9_4.x86_64]
[Kernel/Linux] using RPM version sorting
[Kernel/Linux] Expected linux version: 5.14.0-427.40.1.el9_4.x86_64
Running kernel seems to be up-to-date.
Services to be restarted:
systemctl restart graylog-server.service
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
to clarify: needrestart looks for processes using deleted (aka updated) libraries. If for instance libssl gets updated by a new package version, it is crucial that every service which uses libssl (apache, ssh, nginx…) gets restarted to make sure it uses the updated version of the library.
In this case here the detection seems to be a false positive as the deleted library does not belong to any package but gets created and deleted by graylog itself.
There are two ways to remove this false positive:
configure needrestart to ignore the deleted library
patch graylog not to produce this detectable behaviour
The first solution can be implemented by every user (who understands needrestarts config), the second one only by graylog’s developers (who understand what the hell graylog is doing there).
As I see exactly the same issue here on Debian, I will try the first solution.