Pmacct and pmacct.cgi don`t really start

Hi, I stumbled across this topic and wanted to create a nice overview for myself, but unfortunately it doesn’t seem to work that easy way.
I downloaded the package via Pakfire and loaded the configuration you linked here and installed it with the three specified commands.
Unfortunately, the module does not start, or at least I do not get an overview page displayed. Neither in the web GUI nor when entering the link manually.

Did I miss sonething or have to configure any file?

Greetz

P.s.

Happy new year to the community :smiley:

So like your advice i opend a new topic.

As I wrote I install the pakage and your cgi but the the log tells me that the plugin lost his connection and the pmacct prizess stopped.

I tried to configure the pmacct.conf as mentioned in the ipfire doku, but still same problem.

Happy new year,

Could you post the steps to reproduce. I could try to see if I can figure it out during the weekend and I am sure there will be others as well.

I went through the install and troubleshooting steps but pmacct.cgi did not work for me. Since my issue may be different than @mumpitz , I didn’t want to start posting my issues.

This is what I did to install:
https://deepwiki.com/ummeegge/IPFire-Pmacct-Web-Interface/3-installation-and-setup

And then I did these troubleshooting steps: https://deepwiki.com/ummeegge/IPFire-Pmacct-Web-Interface/3-installation-and-setup#troubleshooting-common-issues

@mumpitz - what responses do you get from troubleshooting section?

Hi all, may you try this version https://raw.githubusercontent.com/ummeegge/IPFire-Pmacct-Web-Interface/f816fe4f1b88ae936ada45ffe4d9e39f6677e760/srv_cgi-bin/pmacct.cgi (one before the last commit) . If i place it under /srv/web/ipfire/cgi-bin in a file called pmacct.cgi it should work…

Permissions are:

chmod 755 /srv/web/ipfire/cgi-bin/pmacct.cgi
chown root:root /srv/web/ipfire/cgi-bin/pmacct.cgi

You can find potential problems under /var/log/httpd/error_log may or via browser console.

Have currently a lot of development stuff on the machine, may i miss something ?!

Best,

Erik

1 Like

I see these issues with the new cgi:

[root@ipfire ~] # tail -50 /var/log/httpd/error_log
. . .
[Fri Jan  2 14:27:35 2026] pmacct.cgi: Pipe/socket for plugin1 does not exist: /var/spool/pmacct/plugin1.pipe – skipping at /srv/web/ipfire/cgi-bin/pmacct.cgi line 69.
[Fri Jan  2 14:27:35 2026] pmacct.cgi: No valid pipes/sockets found after checks at /srv/web/ipfire/cgi-bin/pmacct.cgi line 58.

my config:

[root@ipfire ~] # cat /etc/pmacct/pmacct.conf
!
! Pmacctd configuration file for IPFire environment
!

!-----------------------------------  global  --------------------------------------------

syslog: daemon
!logfile: /var/log/pmacct.log
daemonize: true
debug: false
promisc: true
pcap_interface: green0

imt_mem_pools_number: 256

!pcap_interfaces_map: /etc/pmacct/pcap_interfaces.map
!pcap_ifindex: map

plugins: memory[plugin1], sqlite3[plugin3]


!-----------------------------------  memory  --------------------------------------------

!
! "plugin1" plugin configuration
!
!plugins: memory[plugin1]

plugin_buffer_size[plugin1]: 10240
plugin_pipe_size[plugin1]:   10240000

aggregate[plugin1]: src_host, dst_host

imt_path[plugin1]: /var/spool/pmacct/plugin1.pipe


!-----------------------------------  sqlite3  -------------------------------------------

!
! "plugin3" plugin configuration
!
!plugins: sqlite3[plugin3]
!	small DB - 4 million row/line - 9.7 MB
!	since 2021-05-20
!   save once day
!	refresh save every 15 minutes / 900 sec
!	ignore LAN-to-LAN

plugin_buffer_size[plugin3]: 102400
plugin_pipe_size[plugin3]: 10240000

sql_db[plugin3]: /var/spool/pmacct/pmacct_sqlitev1p3_copy_copy.db
sql_table_version[plugin3]: 1
sql_history[plugin3]: 1d
sql_refresh_time[plugin3]: 900
sql_history_roundoff[plugin3]: h

aggregate[plugin3]: src_host, src_mac, dst_host, dst_mac
aggregate_filter[plugin3]: ip and not (dst and src net 192.168.0.0/16)
[root@ipfire ~] # 

sure,

installed package pmacct with pakfire.

follow this instructions https://github.com/ummeegge/IPFire-Pmacct-Web-Interface

sudo cp pmacct.cgi /srv/web/ipfire/cgi-bin/pmacct.cgi
sudo chmod 755 /srv/web/ipfire/cgi-bin/pmacct.cgi
sudo chown nobody:nobody /srv/web/ipfire/cgi-bin/pmacct.cgi

After restart it doesn’t work

then i follow this instructions www.ipfire.org - pmacct using SQLite3

and complete the pmccat.conf with plugin2

etc/pmacct/pmacct.conf

! Pmacctd configuration file for IPFire environment
!

!----------------------------------- global -----------------------------------

syslog: daemon
daemonize: true
debug: false
promisc: true
pcap_interface: green0

imt_mem_pools_number: 256

plugins: memory[plugin1], sqlite3[plugin2]

!----------------------------------- memory -----------------------------------

!
! “plugin1” plugin configuration
!

plugin_buffer_size[plugin1]: 102400
plugin_pipe_size[plugin1]: 10240000

imt_path[plugin1]: /var/spool/pmacct/plugin1.pipe

aggregate[plugin1]: src_host, src_port, src_mac, dst_host, dst_port, dst_mac, proto
aggregate_filter[plugin1]: ip

!----------------------------------- sqlite3 ----------------------------------

!
! “plugin2” plugin configuration
!

sql_db[plugin2]: /var/spool/pmacct/pmacct_sqlitev1.db
sql_table_version[plugin2]: 1
sql_history[plugin2]: 60m
sql_refresh_time[plugin2]: 900
sql_history_roundoff[plugin2]: m

aggregate[plugin2]: src_host, src_port, src_mac, dst_host, dst_port, dst_mac, proto
aggregate_filter[plugin2]: ip

Error message when starting the module:

cat /var/log/messages | grep pmacct

WARN ( default/core ): connection lost to ‘plugin2-sqlite3’; closing connection.
WARN ( default/core ): connection lost to ‘plugin1-memory’; closing connection.
WARN ( default/core ): no more plugins active. Shutting down.
INFO ( default/core ): Start logging …
INFO ( default/core ): Promiscuous Mode Accounting Daemon, pmacctd 1.7.9 (RELEASE)
INFO ( default/core ): ‘–prefix=/usr’ ‘–sysconfdir=/etc/pmacct’ ‘–enable-sqlite3’ ‘–enable-l2’ ‘–enable-jansson’ ‘CFLAGS=-O2 -g0 -pipe -Wall -fexceptions -fPIC -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -m64 -mtune=generic -fcf-protection=full -std=gnu17’ ‘CXXFLAGS=-O2 -g0 -pipe -Wall -fexceptions -fPIC -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -m64 -mtune=generic -fcf-protection=full’ ‘–enable-traffic-bins’ ‘–enable-bgp-bins’ ‘–enable-bmp-bins’ ‘–enable-st-bins’
INFO ( default/core ): Reading configuration file ‘/etc/pmacct/pmacct.conf’.
INFO ( default/core ): [green0,0] link type is: 1
INFO ( plugin2/sqlite3 ): cache entries=32771 base cache memory=12975392 bytes
OK ( plugin1/memory ): waiting for data on: ‘/var/spool/pmacct/plugin1.pipe’
INFO ( plugin2/sqlite3 ): *** Purging cache - START (PID: 8557) ***
INFO ( plugin2/sqlite3 ): *** Purging cache - END (PID: 8557, QN: 92/92, ET: 0) ***

@ummeegge Instead of the first github source i downloaded now the new source

@jon My troubleshooting is not listed because the module is not loaded due to missing plugins. This is probably why the settings page is not working either.

tail -50 /var/log/httpd/error_log

This gives only me a lot of errors for conections.cgi, but not for pmacct.cgi.

reboot but no difference in the log messages.

Greetz

Good morning,
this CGI works currently only with the memory plugin (standart installation from Pakfire How to see which connection uses bandwith - #8 by ummeegge ) not with sqlite. If it doesn´t work with standart installations it might be great to get some logs to become an idea what´s happening on your systems since it works here.

Best,

Erik

1 Like

Hi,

i changed the pamcct.conf file and delete the sqlite plugin.

/etc/pmacct/pmacct.conf

!
! Pmacctd configuration file for IPFire environment
!

!----------------------------------- global -----------------------------------

syslog: daemon
daemonize: true
debug: false
promisc: true
pcap_interface: green0

imt_mem_pools_number: 256

plugins: memory[plugin1]

!----------------------------------- memory -----------------------------------

!
! “plugin1” plugin configuration
!

plugin_buffer_size[plugin1]: 102400
plugin_pipe_size[plugin1]: 10240000

imt_path[plugin1]: /var/spool/pmacct/plugin1.pipe

aggregate[plugin1]: src_host, src_port, src_mac, dst_host, dst_port, dst_mac, proto
aggregate_filter[plugin1]: ip

But the message doesn’t really change in the log:

WARN ( default/core ): connection lost to ‘plugin1-memory’; closing connection.
WARN ( default/core ): no more plugins active. Shutting down.
INFO ( default/core ): Start logging …
INFO ( default/core ): Promiscuous Mode Accounting Daemon, pmacctd 1.7.9 (RELEASE)
INFO ( default/core ): ‘–prefix=/usr’ ‘–sysconfdir=/etc/pmacct’ ‘–enable-sqlite3’ ‘–enable-l2’ ‘–enable-jansson’ ‘CFLAGS=-O2 -g0 -pipe -Wall -fexceptions -fPIC -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -m64 -mtune=generic -fcf-protection=full -std=gnu17’ ‘CXXFLAGS=-O2 -g0 -pipe -Wall -fexceptions -fPIC -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -m64 -mtune=generic -fcf-protection=full’ ‘–enable-traffic-bins’ ‘–enable-bgp-bins’ ‘–enable-bmp-bins’ ‘–enable-st-bins’
INFO ( default/core ): Reading configuration file ‘/etc/pmacct/pmacct.conf’.
INFO ( default/core ): [green0,0] link type is: 1
OK ( plugin1/memory ): waiting for data on: ‘/var/spool/pmacct/plugin1.pipe’

But why isn’t the CGI page loading? Do I have to add it to the additional sidebar function in IE somehow?