Pmacct not working anymore

Hi!

Since upgrading to core 185, pmacct is not working anymore. Just noticed this today. I get the following error while trying to start the daemon on > console.

/etc/init.d/pmacct start

Starting the pmacct daemon…
/usr/sbin/pmacctd: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory [ OK ]

Any chance to get pmacct running again?

The message is indicating that pmacct is linked to openssl-1.1.1 so the problem has probably been there since Core Update 177 when the old openssl-1.1.1 legacy version was removed.

We will need to ship the pmacct package in Core Update 187 so that the version linked with openssl-3.x.x is shipped.

You are the first person to flag this up but pmacct won’t have been working since Core Update 177.

I will add a patch submission tomorrow to ensure that pmacct is shipped in Core Update 187.

To fix it on your system now you need to uninstall pmacct and then remove it from the cache folder

/var/cache/pakfire/pmacct-5a5e272-7.ipfire

and then re-install it again which will do so with the newest linked version.

You have to remove the cached version otherwise if you try and re-install it will see that there is a version in the cache and use that which is the one linked to openssl-1.1.1

1 Like

I don’t see that error (or any error on pmacct start). Very odd!

(FYI - I can see something is amiss since pmacct is running but not collecting everything. I need to check that part!)

[root@ipfire ~] # /etc/init.d/pmacct status 
pmacctd is running with Process ID(s) 4017 4015 4005.
[root@ipfire ~] # 
[root@ipfire ~] # /etc/init.d/pmacct stop
Stopping the pmacctd daemon...                                                                                                                                            [  OK  ]
[root@ipfire ~] # /etc/init.d/pmacct start
Starting the pmacctd daemon...                                                                                                                                            [  OK  ]
[root@ipfire ~] # 

And I see a different library version:

[root@ipfire ~] # find / -iname "libssl*"
/usr/lib/libssl.so.3
/usr/lib/libssl.so
[root@ipfire ~] # 

tested on an apu4d4
IPFire 2.29 (x86_64) - Core-Update 185

1 Like

Hi @jon & @hellfire

It was a bit late last night when I did my response.

I have now checked back through the git repo history and in CU177, when the legacy opensssl-1.1.1 was removed, was also when the update to pmacct was made from version 1.7.8 to commit 5a5e272 and therefore pmacct was shipped in CU 177 and would have been provided with the openssl-3.x linked version.

The only thing I can think of for @hellfire is that maybe he had a Testing version before the pmacct change was merged and shipped in Testing and if the CU version on your system was not re-updated by changing the
/opt/pakfire/db/core/mine file from 177 to 176 and re-doing the core update to 177 then the pmacct change might have been missing and hence the version remained with the openssl-1.1.1 library linked.

The uninstall, clear the cache, re-install option will still fix the situation in the above case.

1 Like

FWIW, I’ve installed pmacct prior to upgrading to cu185.
I came from cu176, if I remember correctly.

So, there is a big chance of not seeing this error so far. To be honest, I’ve upgraded some weeks ago but did not notice pmacct was failing since then.

And I did receive or install pmacct before using sources or binaries from, guess it was @ummeegge. There was no official package available.

And if I’m not wrong, there is no official package for pmacct available neither.

That is incorrect. There is an official pmacct addon.
@jon did the release of it. It has been available since May 2021.

Normally we would be having the official pmacct release versions. The last one of those was version 1.7.8
There was a bug in that version which @jon found in his ipfire version and he raised that as an issue in the pmacct github repo.
The bug was fixed by pmacct but since then there has been no new release from pmacct and no obvious signs that one will come soon.
Hence in July 2023 I extracted a version of pmacct from the github repo which was based on their commit number 5a5e272 and that version number is what is currently available in IPFire.

If you have been using a separate binary version from @ummeegge then that would not have been updated when Openssl was moved from the 1.1.1x branch to the 3.x branch.

I would suggest clearing out all your old pmacct versions from your system and then installing the IPFire addon version.

If you did an update from CU176 to CU185 then you would have moved from using openssl1.1.1x to openssl-3.x and if you weren’t using the official addon then your version would not have got the updated library link to openssl-3.x.

2 Likes

Ah thanks, this is the solution to the current issue.

I’ve already searched Pakfire (WebIF) yesterday for a pmacct package, but did not find any.
I will try later on today and report back.

Sorry for the confusion with different installations of the pmacct binaries causing some troubles in finding the source of the issue :unamused:

If it is not showing up in the available list that might be because of how your non standard pmacct installation was carried out.

This is what you should see in the available list.

Screenshot_2024-06-14_09-51-41

If that is not being shown then you definitely need to uninstall manually all the files and directories related to the previous manual installation of pmacct.

If that does not work then your best bet would probably be to do a fresh install and restore.

2 Likes

Thanks for your suggestions! Will give it a shot later today :wink:

So, I just upgraded to cu186 and still the package pmacct is not yet showing up in Pakfire :frowning: Refreshing the database did not help either.

Did not find any occurrences of files order folders within IPFire, because I’ve manually deleted all files and folders before upgrading.

This means, I will drop pmacct and any traffic statistics from now on since I do not want to reinstall IPFire.

Then I think this is because IPFire thinks pmacct is already installed.

Any addon that is installed no longer shows up in the list of available addons.

However usually you then see the addon listed in the Installed addons table on the right hand side.

Can you confirm that pmacct is also not shown in the installed addons table on the right hand side?

Is the addon libcdada-0.4.0-3 shown in the available list of addons. This is a required dependency for pmacct. If that is also not shown as available then I would think that IPFire is seeing that pmacct and libcdada are installed and therefore not available.

In the directory /opt/pakfire/db/meta/ do you have the files

meta-pmacct and meta-libcdada listed?

Is libcdada or pmacct listed in the /var/cache/pakfire directory?

Unfortunately on neither side, I’ve checked it before posting.

On a SSH console, I’ve doubled checked using clmmand pakfire list installed and pakfire list uninstalled.

Each one did not list the package pmacct, even updating the packages via CLI did not reveal the missing package afterwards.

So for now I am clueless. Is there a database file that Pakfire uses and I could delete and rebuild?

Edit: libcada is listed on the left side, available packages.
No sign of any meta files in directory /opt/pakfire/db/meta nor in /var/cache/pakfire.

BUT

# find / -iname meta-pmacct*
/opt/pakfire/db/installed/meta-pmacct

What you are saying is that if you look in the file

less /opt/pakfire/db/lists/packages_list.db

neither libcdada or pmacct are present in this list.

That is definitely strange as that file should contain both even if they are installed.

Are you using a single mirror. I seem to recall in the past that you wanted to use a specific mirror.

If you are using all available mirrors then there should be no issues.

If you have specified a single mirror please let me know the name so I can check what that mirror has in its packages list.

Edit:
So it is just the pmacct package that is missing from the packages list.

That means that you have never installed the official pmacct package.

EDIT2:
What date/time do you have on your system for the
/opt/pakfire/db/lists/packages_list.db file

1 Like

Nope, never before I’ve always upgraded with unofficial pmacct binaries/installation.

Date/time:

# ls /opt/pakfire/db/lists/packages_list.db
-rw-r--r-- 1 root root 5022 Jun 14 16:12 /opt/pakfire/db/lists/packages_list.db

less /opt/pakfire/db/lists/packages_list.db
neither libcdada or pmacct are present in this list.

Both files ARE listed, libcdada and pmacct!

We need to understand what is happening with your packages_list.db file because that should have pmacct in it whether you are using an official or unofficial pmacct binary.

Your package list is recently updated. Mine has 16:36 for the time but that is only 24 mins difference.

If you open that packages_list.db file with an editor is pmacct present in the list. The list is alphabetical.

This is what I get for the section with pmacct

perl-Net-SMTP-SSL;1.04;5;
perl-Parse-Yapp;1.21;3;
pmacct;5a5e272;7;
postfix;3.8.4;44;
proxy-accounting;1.0.4;14;
python3-arrow;1.2.3;2;

What do you have in your packages_list.db file

Please see my answer above, Adolf. I’ve found both packages in the database file :grinning:

If this file is the base for the WebIF, then I wonder, why it’s not listed there.
What would be the CLI command for installing pmacct?

pakfire install pmacct...

You typed quicker than me.

So the package list file has pmacct but for some reason your pakfire is not showing it in the available tables list.

1 Like

That’s it!

# pakfire install pmacct

PAKFIRE WARN: The pak "pmacct" is not known. Please try running "pakfire update".
PAKFIRE ERROR: No packages to install. Exiting...

What is the sha256sum hash value for your

/srv/web/ipfire/cgi-bin/pakfire.cgi file

On my CU186 system it is

a60f1c4babe8028d626013d145031aa8c5b2490e10adc8d828c8ffad5d8cf749

That is just to check that the issue is not because your pakfire page code is different.

When I run the cli version pakfire install pmacct I get

# pakfire install pmacct
PAKFIRE RESV: pmacct: Resolving dependencies...
PAKFIRE RESV: pmacct: Need to install dependency: libcdada
PAKFIRE RESV: libcdada: Resolving dependencies...

PAKFIRE INFO: Packages to install for dependencies:
PAKFIRE INFO: libcdada 	 - 90.00 KB


PAKFIRE INFO: Packages to install:
PAKFIRE INFO: pmacct 	 - 500.00 KB

PAKFIRE INFO: Total size: 	 ~ 590.00 KB

PAKFIRE INFO: Is this okay? [y/N]