ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.26k stars 656 forks source link

ntopng failure on OPNSense due to shared object #7201

Closed StarkZarn closed 1 year ago

StarkZarn commented 1 year ago

Environment:

What happened: ntopng fails to start with the error: ld-elf.so.1: Shared object "libldap_r-2.4.so.2" not found, required by "ntopng"

How did you reproduce it?

  1. Install the most recent ntopng-enterprise package from the official ntopng pkg repo on OPNSense 23.1.
  2. Run ntopng from the command line.
  3. Observe failure

Debug Information:

root@OPNsense:~ # pkg info | grep ldap
openldap26-client-2.6.3        Open source LDAP client implementation
php81-ldap-8.1.14              The ldap shared extension for php

This leads me to believe dependency versioning is off, as the error complains of libldap 2.4 but the current version is 2.6.

StarkZarn commented 1 year ago

Quick update just for thoroughness: I updated the ntopng package this morning and the problem still remains. I am now running version/revision: 5.7.230204

StarkZarn commented 1 year ago

5.7.230205, same thing

Gulaschcowboy commented 1 year ago

same for me root@fw:~ # pkg info | grep ntop ntop-1.0 ntop Vendor Repository ntopng-5.7.230207 High speed network traffic monitor os-ntopng-enterprise-5.7.230207 ntopng is a high-speed web-based network traffic analysis and flow collection tool root@fw:~ # ntopng -v ld-elf.so.1: Shared object "libldap_r-2.4.so.2" not found, required by "ntopng"

andromaks commented 1 year ago

and same on

5.7.230208

StarkZarn commented 1 year ago

Devs is there anything we can do to help out here, provide more data?

dburkland commented 1 year ago

Came up with the following workaround (not pretty):

# cd /tmp
# fetch https://pkg.opnsense.org/FreeBSD:12:amd64/21.7/MINT/21.7.2/OpenSSL/All/openldap-client-2.4.59_1.txz
# /usr/local/etc/rc.d/ntopng stop
# tar xvf openldap-client-2.4.59_1.txz -C /tmp/
# cp -v /tmp/usr/local/lib/libldap_r-2.4.so.2.11.7 /usr/local/lib/
# ln -s /usr/local/lib/libldap_r-2.4.so.2.11.7 /usr/local/lib/libldap_r-2.4.so.2
# cp -v /tmp/usr/local/lib/liblber-2.4.so.2.11.7 /usr/local/lib/
# ln -s /usr/local/lib/liblber-2.4.so.2.11.7 /usr/local/lib/liblber-2.4.so.2
# /usr/local/etc/rc.d/ntopng start
Batnun commented 1 year ago

Same issue here, with the latest version of OPNsense (23.1.1.2) and the latest build of ntopng (5.7.230220)

mrajema commented 1 year ago

I have the same problem with the latest version of opnsense (23.1.1.2) and with an ntopng entreprise

Batnun commented 1 year ago

I'm sure this issue is easy to fix, but it seems like no one is maintaining the OPNsense ntopng package anymore. Too bad :(

lucaderi commented 1 year ago

Sorry for the delay: OPNsense is a moving target and we forgot about this ticket. We'll fix it by Monday. we apologise for the delay.

Batnun commented 1 year ago

Thanks @lucaderi :)

cardigliano commented 1 year ago

The ldap dependency on OPNsense 23.x has been fixed, please update and let us know. Thank you.

Batnun commented 1 year ago

It's working! ntopng build 5.7.230307, tested on OPNsense 23.1.2 (released today).

Thanks for fixing it! :)

cardigliano commented 1 year ago

Thank you! Closing this

Batnun commented 1 year ago

Just a small issue:

In Services: ntopng Enterprise: Settings, DNS Mode - the selected DNS mode is not saved (and I'm not sure it apply).

davidemiccone commented 5 months ago

On OPNSense 24.1.8 "libsodium.so.23" is superseded by libsodium.so.26.1.0 (and ./usr/local/lib/libsodium.so.26), I just installed latest version (6.1.240606) of os-ntopng-enterprise and I get the error

/usr/local/bin/ntopng --version ld-elf.so.1: Shared object "libsodium.so.23" not found, required by "ntopng"

iamtherobin commented 4 months ago

ntopng on my opnsense has been failing to start for me for some time due to the same issue.

Will there be an update for opnsense plugin to fix this?

cardigliano commented 4 months ago

There is a workaround for this at https://www.ntop.org/guides/ntopng/third_party_integrations/opnsense.html Short answer: ln -s /usr/local/lib/libsodium.so.26 /usr/local/lib/libsodium.so.23

Googlepuss commented 3 months ago

I am having the same issue on pfsense plus (freebsd 15). I followed this guide https://packages.ntop.org/FreeBSD/

Starting ntopng. ld-elf.so.1: Shared object "libsodium.so.26" not found, required by "ntopng" /usr/local/etc/rc.d/ntopng: WARNING: failed to start ntopng

I also don't see n2disk pkg in the repo but it is listed in the install guide.

I have been running this on a linux VM to test an enterprise license and wanted to migrate that to a pfsense box. removed the existing ntop packages on pfsense and started your guide.

cardigliano commented 3 months ago

Please provide the output of ls -al /usr/local/lib/libsodium.so.*

Googlepuss commented 3 months ago

ls -al /usr/local/lib/libsodium.so.*

/root: ls -al /usr/local/lib/libsodium.so.* lrwxr-xr-x 1 root wheel 19 Apr 23 09:57 /usr/local/lib/libsodium.so.23 -> libsodium.so.23.3.0 -rwxr-xr-x 1 root wheel 452016 Apr 23 09:57 /usr/local/lib/libsodium.so.23.3.0

Thanks for the feedback!

Googlepuss commented 2 months ago

Please provide the output of ls -al /usr/local/lib/libsodium.so.*

Wanted to follow up on this. Looks like the issue for Pfsense is reversed. is there a reason I should not upgrade this to libsodium.so.26 on the pfsense freebsd install? I am assuming if I symlink from 26 to 23 (installed), I would introduce more opportunities for error than installing 26 and then symlinking 23 to 26. I recognize you all might not be able to speak for the pfsense side of this. Thanks!

deanfourie1 commented 2 months ago

Hi did you manage to get this going on pfSense? I just update pf to FreeBSD 15 and now having issues with this latest release of ntopn, same error.

Thanks

deanfourie1 commented 1 month ago

This is such a mess.

deanfourie1 commented 1 month ago

In my case, libsodium was looking for version 26. Here is what I did to resolve this.

Find your version of libsodium, in my case, 23.3.0

ls /usr/local/lib/libsodium.so.*

Then symlink your current version to 26.

ln -s /usr/local/lib/libsodium.so.23.3.0 /usr/local/lib/libsodium.so.26

Googlepuss commented 1 month ago

In my case, libsodium was looking for version 26. Here is what I did to resolve this.

Find your version of libsodium, in my case, 23.3.0

ls /usr/local/lib/libsodium.so.*

Then symlink your current version to 26.

ln -s /usr/local/lib/libsodium.so.23.3.0 /usr/local/lib/libsodium.so.26

Thanks for posting. I have been running ntop on a dedicated VM and importing flows from pfsense. I will try the steps you lined out.