OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: tnsasse on March 01, 2017, 11:07:57 am

Title: [SOLVED] Update fails: No trusted public keys found pkg
Post by: tnsasse on March 01, 2017, 11:07:57 am
Hi Guys,

this is my first time deploying OpnSense, so please be gentle. I did the basic setup and have LAN and WAN connectivity. Just wanted to check for updates, as I set up the box a couple of weeks ago in advance. Going through the UI System > Firmware > Updates and clicking "Check for updates" regardless of the mirror / flavour I choose, I get an error and the log says (newest statement on top):

Code: [Select]
configd.py: [347b0230-94c1-40ab-9516-6866e4fc0cf7] Script action failed with Command 'pkg rquery
 "%n|||%v|||%c|||%sh|||0"' returned non-zero exit status 74 at Traceback (most recent call last): File
 "/usr/local/opnsense/service/modules/processhandler.py", line 477, in execute stdout=output_stream,
 stderr=error_stream) File "/usr/local/lib/python2.7/subprocess.py", line 541, in check_call raise
 CalledProcessError(retcode, cmd) CalledProcessError: Command 'pkg rquery "%n|||%v|||%c|||%sh|||0"' returned
 non-zero exit status 74

configd.py: [347b0230-94c1-40ab-9516-6866e4fc0cf7] view remote packages

configd.py: [a397dc8c-708e-4c88-ab39-87b2392e6de8] view local packages

configd.py: [e1d08521-5db9-4578-aa81-1680cac1e2a8] Script action stderr returned "pkg: No trusted public keys
found pkg: No trusted public keys found pkg: No trusted public keys found pkg: No trusted public keys found pkg:
 Repository OPNsense cannot be opened. 'pkg update' required"

configd.py: [e1d08521-5db9-4578-aa81-1680cac1e2a8] retrieve firmware update status

The forum search did not yield any results for me, and google only points me to PfSense stuff...

Thanks for your help,
Tobi
Title: Re: Update fails: No trusted public keys found pkg
Post by: franco on March 01, 2017, 12:32:40 pm
Hi Tobi,

Something went wrong with your install. The package fingerprints are provided by the core package, but seem to have been lost. Let's try to reset all packages from the root shell:

# opnsense-bootstrap

Box configuration will be retained, but export a backup xml just in case.


Cheers,
Franco
Title: Re: Update fails: No trusted public keys found pkg
Post by: tnsasse on March 01, 2017, 01:59:30 pm
Hi Franco,

thanks I will give this a shot tonight.

Tobi
Title: Re: Update fails: No trusted public keys found pkg
Post by: franco on March 01, 2017, 10:28:40 pm
Hi Tobi,

Something is currently not quite right with opnsense-bootstrap on a running system. We don't normally use it there so this went unnoticed. Fixed it, please use this updated script:

# pkg install ca_root_nss
# fetch https://raw.githubusercontent.com/opnsense/update/master/bootstrap/opnsense-bootstrap.sh
# sh ./opnsense-bootstrap.sh


Cheers,
Franco
Title: Re: Update fails: No trusted public keys found pkg
Post by: tnsasse on March 06, 2017, 04:14:10 pm
Works like a charm, thanks Franko!