Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Sub-process /usr/bin/dpkg returned an error code (1) #632

Open
jult opened this issue Sep 5, 2024 · 0 comments
Open

Error: Sub-process /usr/bin/dpkg returned an error code (1) #632

jult opened this issue Sep 5, 2024 · 0 comments

Comments

@jult
Copy link

jult commented Sep 5, 2024

Turned out it was nprobe. This is on a default debian 12 install, as per official ntopng instructions. You can see what happens, looks like two extra services are doubled, falsely named and do not need to be there. Both ntop and nprobe do not start at boot, even though I enabled systemd services:

`
root@someserver:~# systemctl status [email protected]
× [email protected] - nprobe extensible NetFlow v5/v9/IPFIX probe/collector for IPv4/v6 on nprobe
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-09-05 10:52:44 CEST; 1min 46s ago
Process: 1334 ExecStartPre=/bin/sh -c /bin/echo "$(/bin/date) nprobe nprobe StartPre" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Process: 1337 ExecStartPre=/bin/sh -c /bin/sed "/^-g.$|^-G.|^--daemon-mode.|^--pid-file./s/^/#/" /etc/nprobe/nprobe-nprobe.conf > /run/nprobe-nprobe.conf (code=exited, status=2)
Process: 1339 ExecStopPost=/bin/rm -rf /run/nprobe-nprobe.conf (code=exited, status=0/SUCCESS)
Process: 1340 ExecStopPost=/bin/sh -c /bin/echo "$(/bin/date) nprobe nprobe StopPost" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
CPU: 33ms

Sep 05 10:52:44 someserver systemd[1]: Starting [email protected] - nprobe extensible NetFlow v5/v9/IPFIX probe/collector for IPv4/v6 on nprobe...
Sep 05 10:52:44 someserver sh[1338]: /bin/sed: can't read /etc/nprobe/nprobe-nprobe.conf: No such file or directory
Sep 05 10:52:44 someserver systemd[1]: [email protected]: Control process exited, code=exited, status=2/INVALIDARGUMENT
Sep 05 10:52:44 someserver systemd[1]: [email protected]: Failed with result 'exit-code'.
Sep 05 10:52:44 someserver systemd[1]: Failed to start [email protected] - nprobe extensible NetFlow v5/v9/IPFIX probe/collector for IPv4/v6 on nprobe.

root@someserver: ~# systemctl status nprobe
○ nprobe.service - nprobe extensible NetFlow v5/v9/IPFIX probe/collector
Loaded: loaded (/etc/systemd/system/nprobe.service; disabled; preset: enabled)
Active: inactive (dead)

root@someserver: ~# systemctl start nprobe
root@someserver: ~# systemctl status nprobe
● nprobe.service - nprobe extensible NetFlow v5/v9/IPFIX probe/collector
Loaded: loaded (/etc/systemd/system/nprobe.service; disabled; preset: enabled)
Active: active (running) since Thu 2024-09-05 10:54:56 CEST; 1s ago
Process: 1674 ExecStartPre=/bin/sh -c /bin/echo "$(/bin/date) nprobe StartPre" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Process: 1677 ExecStartPre=/bin/sh -c /bin/sed "/^-g.$|^-G.|^--daemon-mode.|^--pid-file./s/^/#/" /etc/nprobe/nprobe.conf > /run/nprobe.conf (code=exited, status=0/SUCCESS)
Process: 1680 ExecStartPost=/bin/sh -c /bin/echo "$(/bin/date) nprobe StartPost" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Main PID: 1679 (nprobe)
Tasks: 1 (limit: 9830)
Memory: 12.3M
CPU: 127ms
CGroup: /system.slice/nprobe.service
└─1679 /usr/bin/nprobe /run/nprobe.conf

Sep 05 10:54:56 someserver systemd[1]: Starting nprobe.service - nprobe extensible NetFlow v5/v9/IPFIX probe/collector...
Sep 05 10:54:56 someserver systemd[1]: Started nprobe.service - nprobe extensible NetFlow v5/v9/IPFIX probe/collector.
Sep 05 10:54:56 someserver nprobe[1679]: 05/Sep/2024 10:54:56 [nprobe.c:5951] Reading configuration file /run/nprobe.conf
Sep 05 10:54:57 someserver nprobe[1679]: 05/Sep/2024 10:54:57 [plugin.c:177] No plugins found in ./plugins
Sep 05 10:54:57 someserver nprobe[1679]: 05/Sep/2024 10:54:57 [plugin.c:185] Loading 22 plugins [.so] from /usr/lib/nprobe/plugins

root@someserver:~# apt purge nprobe
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
nprobe*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 33.1 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 121646 files and directories currently installed.)
Removing nprobe (10.6.240904-8427) ...
Stopping nprobe services...
Glob pattern passed to disable, but globs are not supported for this.
Invalid unit name "nprobe@*" escaped as "nprobe@\x2a".
(Reading database ... 121587 files and directories currently installed.)
Purging configuration files for nprobe (10.6.240904-8427) ...

root@someserver:~# apt install nprobe
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
nprobe
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3125 kB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package nprobe.
(Reading database ... 121587 files and directories currently installed.)
Preparing to unpack .../nprobe_10.6.240904-8427_amd64.deb ...
Unpacking nprobe (10.6.240904-8427) ...
Setting up nprobe (10.6.240904-8427) ...
usermod: no changes
Rebuilding ld cache...
Making the /var/log/nprobe directory...
(Re)Starting nprobe services...
Created symlink /etc/systemd/system/multi-user.target.wants/nprobe.service → /etc/systemd/system/nprobe.service.
Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xeu [email protected]" for details.
dpkg: error processing package nprobe (--configure):
installed nprobe package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nprobe
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant