GPG Verify File check failed When Using Upgrade Script

Hello Everyone,

I’m attempting to upgrade a very old system (6.12.65-30) using the upgrade path. Unfortunately this installation is on a bare metal box so I installed a fresh copy of 6.12.65-30 as a VM and then plan to do a full backup of the bare metal and restore that backup on the VM. As a pre-test, I downloaded the upgrade-6.12.65-31.sh on the VM and executed it but receive the following GPG error (which occurs for every module update). I also executed: amportal a ma refreshsignatures and tried again but still no success.

Upgrading arimanager..
Downloading 28149 of 28149 (100%)            
The following error(s) occured:
 - File Integrity failed for /var/www/html/admin/modules/_cache/arimanager-12.0.4.tgz.gpg - aborting (GPG Verify File check failed)

It’s followed by this error but not sure if the two are related:

[FATAL] SELECT * FROM cidlookup [nativecode=1146 ** Table 'asterisk.cidlookup' doesn't exist]SQL - <br /> SELECT * FROM cidlookup 

Trace Back:

/var/www/html/admin/libraries/sql.functions.php:25 die_freepbx()
 [0]: SELECT * FROM cidlookup [nativecode=1146 ** Table 'asterisk.cidlookup' doesn't exist]SQL - <br /> SELECT * FROM cidlookup

/var/www/html/admin/modules/cidlookup/functions.inc.php:305 sql()
 [0]: SELECT * FROM cidlookup
 [1]: getAll
 [2]: 2

/var/www/html/admin/modules/cidlookup/functions.inc.php:138 cidlookup_list()
 [0]: 1

/var/www/html/admin/libraries/BMO/DialplanHooks.class.php:79 cidlookup_get_config()
 [0]: asterisk

/var/lib/asterisk/bin/retrieve_conf:727 DialplanHooks->processHooks()
 [0]: asterisk
 [1]: 

Error(s) have occured, the following is the retrieve_conf output:
exit: 1
found language dir fr for directory, not installed on system, skipping
[FATAL] SELECT * FROM cidlookup [nativecode=1146 ** Table 'asterisk.cidlookup' doesn't exist]SQL - &lt;br /&gt; SELECT * FROM cidlookup

Trace Back:

/var/www/html/admin/libraries/sql.functions.php:25 die_freepbx()
 [0]: SELECT * FROM cidlookup [nativecode=1146 ** Table 'asterisk.cidlookup' doesn't exist]SQL - <br /> SELECT * FROM cidlookup

/var/www/html/admin/modules/cidlookup/functions.inc.php:305 sql()
 [0]: SELECT * FROM cidlookup
 [1]: getAll
 [2]: 2

/var/www/html/admin/modules/cidlookup/functions.inc.php:138 cidlookup_list()
 [0]: 1

/var/www/html/admin/libraries/BMO/DialplanHooks.class.php:79 cidlookup_get_config()
 [0]: asterisk

/var/lib/asterisk/bin/retrieve_conf:727 DialplanHooks->processHooks()
 [0]: asterisk
 [1]:

Is there a way to resolve this GPG error?

try this …

su - asterisk -c "gpg --refresh-keys --keyserver [pgp.mit.edu](http://pgp.mit.edu/)"

Thanks for the reply Chris! Unfortunately that does not appear to work:
[root@localhost ~]# su - asterisk -c "gpg --refresh-keys --keyserver [pgp.mit.edu](http://pgp.mit.edu/)"
-bash: -c: line 0: syntax error near unexpected token (’ -bash: -c: line 0: gpg --refresh-keys --keyserver [pgp.mit.edu](http://pgp.mit.edu/)'

However, I did try these two:

[root@localhost ~]# su - asterisk -c "gpg --refresh-keys --keyserver pgp.mit.edu"
gpg: refreshing 1 key from hkp://pgp.mit.edu
gpg: requesting key 69D2EAD9 from hkp server pgp.mit.edu
gpgkeys: key 1013D73FECAC918A0A25823986CE877469D2EAD9 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

And this one:

[root@localhost ~]# su - asterisk -c "gpg --refresh-keys --keyserver http://pgp.mit.edu/"
gpg: refreshing 1 key from http://pgp.mit.edu/
gpg: requesting key 69D2EAD9 from http server pgp.mit.edu
gpgkeys: no key data found for http://pgp.mit.edu/
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

There does not appear to be any GPG key updates but I still executed: amportal a ma refreshsignatures (which worked fine) and then executed: upgrade-6.12.65-31.sh but unfortunately I still see the GPG error:

- File Integrity failed for /var/www/html/admin/modules/_cache/arimanager-12.0.4.tgz.gpg - aborting (GPG Verify File check failed)

Thank you Dave for the reply! I have done this already with no success as mentioned in my previous post but here it is again:

[root@localhost upgradescripts]# su - asterisk -c "gpg --refresh-keys --keyserver pgp.mit.edu"
gpg: refreshing 1 key from hkp://pgp.mit.edu
gpg: requesting key 69D2EAD9 from hkp server pgp.mit.edu
gpgkeys: key 1013D73FECAC918A0A25823986CE877469D2EAD9 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

I also tried this from: **[FREEPBX-12227] sysadmin - most items inoperative - Sangoma Issue Tracker

[root@localhost upgradescripts]# /usr/bin/sysadmin_manager sysadmin.update-dns
File didn't exist. That's unpossible
Can't find signature file /var/www/html/admin/modules/sysadmin/module.sig

Nothing appears to update after executing these:

[root@localhost upgradescripts]# sudo -u asterisk gpg --refresh-keys --keyserver pool.sks-keyservers.net
gpg: refreshing 1 key from hkp://pool.sks-keyservers.net
gpg: requesting key 69D2EAD9 from hkp server pool.sks-keyservers.net
gpg: packet(13) too large
gpg: read_block: read error: Invalid packet
gpg: Total number processed: 0
gpg: no valid OpenPGP data found.

[root@localhost upgradescripts]# sudo -u asterisk gpg --refresh-keys --keyserver hkp://keyserver.ubuntu.com:80
gpg: refreshing 1 key from hkp://keyserver.ubuntu.com:80
gpg: requesting key 69D2EAD9 from hkp server keyserver.ubuntu.com
gpg: key 69D2EAD9: "FreePBX Mirror 1 (Module Signing - 2014/2015) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1

[root@localhost upgradescripts]# sudo -u asterisk gpg --refresh-keys --keyserver pgp.mit.edu
gpg: refreshing 1 key from hkp://pgp.mit.edu
gpg: requesting key 69D2EAD9 from hkp server pgp.mit.edu
gpgkeys: key 1013D73FECAC918A0A25823986CE877469D2EAD9 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

[root@localhost upgradescripts]# sudo -u asterisk gpg --refresh-keys --keyserver keyserver.pgp.com
gpg: refreshing 1 key from hkp://keyserver.pgp.com
gpg: requesting key 69D2EAD9 from hkp server keyserver.pgp.com
gpg: keyserver timed out
gpg: keyserver refresh failed: Keyserver error

Then executed: amportal a ma refreshsignatures which completed successfully, however executing the: upgrade-6.12.65-31.sh I still get:
The following error(s) occured:
- File Integrity failed for /var/www/html/admin/modules/_cache/arimanager-12.0.4.tgz.gpg - aborting (GPG Verify File check failed)

I remember testing this upgrade path late 2018 with no problems so I’m wondering if the GPG keys have changed/expired? I also installed: FreePBX-5.211.65-21-x86_64-Full-1416750375.iso and FreePBX-10.13.66-17-x86_64-Full-1477919798.iso as VM’s but receive the same GPG errors.

One of the other things that came up when we discussed this before was that there were permissions problems on that drive. Have you tried a ‘fwconsole chown’ lately? It’s a long-shot, but this could be a secondary problem.

fwconsole is not available in this version of FreePBX but amportal is:

[root@localhost upgradescripts]# amportal chown

Fetching FreePBX settings with gen_amp_conf.php..

SETTING FILE PERMISSIONS...................Done
Removing any dangling symlinks
Dangling symlinks removed

Still does not help though:

The following error(s) occured:
- File Integrity failed for /var/www/html/admin/modules/_cache/arimanager-12.0.4.tgz.gpg - aborting (GPG Verify File check failed)

Uninstalling the: CallerID Lookup module corrected these errors. The GPG Errors are still occurring though.

On our production system which does not experience the GPG error I list these keys:

[root@freepbx ~]# sudo -u asterisk gpg --list-keys
/var/lib/asterisk/.gnupg/pubring.gpg
------------------------------------
pub 4096R/B33B4659 2014-04-30
uid FreePBX Module Signing (This is the master key to sign FreePBX Modules) <[email protected]>
sub 4096R/5C2FE148 2014-04-30

pub 4096R/69D2EAD9 2014-05-05
uid FreePBX Mirror 1 (Module Signing - 2014/2015) <[email protected]>
sub 4096R/CCEBF9CB 2014-05-05

And on the fresh VM install of 6.12.65-30 I list these GPG keys:

[root@localhost ~]# sudo -u asterisk gpg --list-keys
/home/asterisk/.gnupg/pubring.gpg
---------------------------------
pub 4096R/69D2EAD9 2014-05-05
uid FreePBX Mirror 1 (Module Signing - 2014/2015) <[email protected]>
sub 4096R/CCEBF9CB 2014-05-05

  1. I moved /home/asterisk/.gnupg to /home/asterisk/gnupg_backup.

  2. Copied over: /var/lib/asterisk/.gnupg from our production machine to /home/asterisk/ on the VM

  3. Executed the: upgrade-6.12.65-31.sh

Success! It’s now upgrading with no GPG errors!

Why has this public key been removed from older distros and/or key servers???

pub 4096R/B33B4659 2014-04-30
uid FreePBX Module Signing (This is the master key to sign FreePBX Modules) <[email protected]>
sub 4096R/5C2FE148 2014-04-30

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.