Problem with configd (Updates and plugins)

Started by Rickytr, September 11, 2019, 02:18:53 PM

Previous topic - Next topic
After the upgrade to 19.7 I have the following problem: when i start an update or install or remove a plugin everything goes well until configd is stopped. Then it never restarts. I cannot see the logs and, in case of updates, I don't konw if everything is installed correctly or not. Any suggestion?

Can you run this from the console and show us what happens / where the output stops?

# pkg install -yf opnsense



Cheers,
Franco

What will be installed with this command? I'm already on 19.7.3 and I prefer not to mess my installation that is working good...

Riccardo

It just reinstalls the GUI packaged which allegedly keeps configd from restarting properly.

Though 19.7.4 is out now so that would make it upgrade instead. But since you want to stay on 19.7.3 you can do this...

# opnsense-revert -r 19.7.3 opnsense

This will simulate the update procedure without installing a new version for you.


Cheers,
Franco

It's not a problem to update to 19.7.4 but the last time I updated I had to force switch off because after I started the update I lost access to ssh and web GUI and I didn't have a way to check the update status. This happened only when I updated from 19.7.2 to .3, not before.

I'll try the first command and I'll let you know the output.

Riccardo

I tried the command:
pkg install -yf opnsense
and this is the output:


Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        opnsense: 19.7.3 -> 19.7.4

Number of packages to be upgraded: 1

4 MiB to be downloaded.
[1/1] Fetching opnsense-19.7.4.txz: 100%    4 MiB   4.4MB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Upgrading opnsense from 19.7.3 to 19.7.4...
[1/1] Extracting opnsense-19.7.4: 100%
Stopping configd...done
Resetting root shell
Updating /etc/shells
Unhooking from /etc/rc
Unhooking from /etc/rc.shutdown
Updating /etc/shells
Registering root shell
Hooking into /etc/rc
Hooking into /etc/rc.shutdown
Starting configd.
Keep version OPNsense\Monit\Monit (1.0.8)
Keep version OPNsense\Firewall\Alias (1.0.0)
Keep version OPNsense\OpenVPN\Export (0.0.1)
Keep version OPNsense\CaptivePortal\CaptivePortal (1.0.0)
Keep version OPNsense\Cron\Cron (1.0.1)
Keep version OPNsense\Backup\NextcloudSettings (1.0.0)
Keep version OPNsense\TrafficShaper\TrafficShaper (1.0.3)
Keep version OPNsense\Syslog\Syslog (1.0.0)
Keep version OPNsense\IDS\IDS (1.0.3)
Keep version OPNsense\Proxy\Proxy (1.0.3)
Migrated OPNsense\Diagnostics\Netflow from 1.0.0 to 1.0.1
Keep version OPNsense\Routes\Route (1.0.0)
Keep version OPNsense\Netdata\General (0.0.1)
Keep version OPNsense\Bind\Dnsbl (1.0.5)
Keep version OPNsense\Bind\General (1.0.5)
Keep version OPNsense\Bind\Domain (1.0.0)
Keep version OPNsense\Bind\Record (1.0.0)
Keep version OPNsense\Bind\Acl (1.0.0)
Keep version OPNsense\Ntopng\General (0.0.1)
Keep version OPNsense\Redis\Redis (0.0.0)
Writing firmware setting...done.
Writing trust files...done.
Configuring login behaviour...done.
Configuring system logging...done.
Message from opnsense-19.7.4:

Roar!


I checked and configd is stopped.

Riccardo

Doesn't make much sense...

What happens on:

# service configd stop
# service configd start

?

Did you by any change fiddle with package mirrors so you ended up with a FreeBSD "pkg" version and not ours?

# pkg query %R pkg

What does that output?


Cheers,
Franco

Also try this, I suspect this makes the most sense...

# pkg query %v pkg


Cheers,
Franco

May be this is the problem...

pkg query %R pkg output:
FreeBSD

pkg query %v pkg output:
1.11.1

I had to to change package source to install a slightly different version of collectd (I need the mqtt part). May be i modified something else...
Is there a way to correct this?

Riccardo

The solution: don't use FreeBSD mirrors. If you must build from the ports tree:

# opnsense-code tools ports
# cd /usr/ports/your/port
# make install

To fix your issue just use the following:

# opnsense-revert pkg


Cheers,
Franco

September 13, 2019, 03:13:24 PM #10 Last Edit: September 13, 2019, 03:15:27 PM by Rickytr
Thanks Franco,

I just updated to 19.7.4 and everything is working well. Will I have problems if I use the command you suggested?

EDIT:
Sorry, I didn't notice that it was related only to pkg package. Just did it without problems.

Riccardo


Somewhere down the line, maybe 2016 or 2017 pkg gained a "reaper" feature which was meant to kill all stray processes from lingering in the system during package script stage. We had to disable it because otherwise we have no clean way to restart configd when it needs to be restarted (on core package install).

So that feature creeps back in if you use FreeBSD packages because of another bug in pkg that will ignore repository priority over version number: pkg will greedily update packages from lower priority mirrors if their version number is higher, which is kind of nuts but we can't fix the world. ;)


Cheers,
Franco