FreePBX 14 Installer (Class 'FreePBX\Install\PDO')

Andrew,

The new code you added to installlib/installcommand.class.php today appears to have broken the FreePBX installer (under Jessie/Debian 8, unrelated to the Stretch/Debian 9 discussion):

STARTING ASTERISK
Asterisk Started
Assuming you are Database Root
Checking if SELinux is enabled…Its not (good)!
No /etc/asterisk/asterisk.conf file detected. Installing…Writing /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined Asterisk version to be: 14.6.0
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…Yes (No /etc/freepbx.conf file detected)
PHP Fatal error: Class ‘FreePBX\Install\PDO’ not found in /usr/src/freepbx/installlib/installcommand.class.php on line 401

Also, there appears to be a problem with the 17 new module signatures in the latest FreePBX installer.

Please use the PM system or @ to contact me. There are hundreds or Andrew’s here. No one knows who you are talking to.

I don’t know anything about this. Looks to be a fluke problem with gpg. I haven’t been able to replicate it and we haven’t published 17 new modules recently so it’d be an issue with gpg servers if anything.[quote=“reraikes, post:1, topic:43818”]
PHP Fatal error: Class ‘FreePBX\Install\PDO’ not found in /usr/src/freepbx/installlib/installcommand.class.php on line 401
[/quote]

Resolved this was only an issue for new hand rolled installations.

The 17 module signatures in the FreePBX installer were different from the previous installer and produced errors during installation and reports of tampered files in the dashboard. ‘fwconsole ma refreshsignatures’ got the same errors, so maybe the signatures in the repository were wrong. The previous installer installed without any signature errors.

I’ll check out the current installer and let you know if the problem persists.

As I previously stated. We haven’t released 17 new modules since last week (we’ve maybe released 3). Which means their signatures are the same now as they were last week when it worked. I can check the signatures in any module by just going to the GUI of any FreePBX instance and force downloading the modules. Which I have done.The signatures are still fine (because they haven’t changed).

Since errors in any software can have a domino effect this is probably what happened to you, you got one error and it caused other errors. This created red herrings, issues is which you attribute to a cause but are in fact unrelated. On our internal machine(s) (and even external) there are no signature problems

This also has nothing to do with the installer.

The “Class ‘FreePBX\Install\PDO’ not found” problem is corrected, but a signatures problem is not.

After executing ‘./install -n’, everything goes error free down to:

Installing all modules…Installing: callrecording, cdr, cel, conferences, customappsreg, featurecodeadmin, infoservices, logfiles, music, recordings, soundlang, ucp, userman

All those modules install without error until ucp:

Installing ucp…
Detected Missing Dependency of: userman 13.0.35
Found local Dependency of: userman 14.0.3.24
Installing Missing Dependency of: userman 13.0.35
Updating table userman_users…Done
Updating table userman_users_settings…Done
Updating table userman_groups…Done
Updating table userman_groups_settings…Done
Updating table userman_directories…Done
Generating CSS…Done
Installed Missing Dependency of: userman 13.0.35
Detected Missing Dependency of: pm2
Downloading Missing Dependency of: pm2
Processing pm2
Downloading…
23307/23307 [============================] 100%
Finished downloading
The following error(s) occured:

  • File Integrity failed for /var/www/html/admin/modules/_cache/pm2-13.0.3.18.tgz.gpg - aborting (GPG Verify File check failed)
    Unable to resolve dependencies for module ucp:
    Updating Hooks…Done

Installing userman…
Updating table userman_users…Done
Updating table userman_users_settings…Done
Updating table userman_groups…Done
Updating table userman_groups_settings…Done
Updating table userman_directories…Done
Generating CSS…Done
Module userman successfully installed
Updating Hooks…Done

Done. All modules installed.
Updating Hooks…Done
Done installing modules
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions…
Setting base permissions…Done
Setting specific permissions…
310 [============================]
Finished setting permissions
Generating default configurations…
Reloading FreePBX
Successfully reloaded
Finished generating default configurations
Trusting FreePBX…Trusted
You have successfully installed FreePBX

Then I set EDGE mode and do an ‘fwconsole ma upgradeall’:

root@FreePBX:/usr/src/freepbx# /var/lib/asterisk/bin/freepbx_setting MODULEADMINEDGE 1
trying to run as user asterisk:

[MODULEADMINEDGE] changed from previous value: [0] to new value: [1]

root@FreePBX:/usr/src/freepbx# fwconsole ma upgradeall
No repos specified, using: [standard] from last GUI settings

Module(s) requiring upgrades: callrecording, core, customappsreg, sipsettings, userman, voicemail
Upgrading module ‘core’ from 14.0.1.5 to 14.0.1.8
Downloading module 'core’
Processing core
Downloading…
1084041/1084041 [============================] 100%
Finished downloading
The following error(s) occured:

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

and it stops.

This all started happening today.

I am sorry but I did not imply we fixed anything on that end as there are no signature problems on our servers.

You have something wrong with your setup. Perhaps your date time is wrong on your system (its in the past, modules are in the future, present). That is only a guess however. I have reconfirmed that the systems are working as intended.

If there was an error with GPG more people would be complaining right now than just you as no modules would be able to be downloaded.

Here is a test I just ran on a system:

[root@uc-XXXXX ~]# fwconsole ma upgrade pm2 --edge
Edge repository temporarily enabled
No repos specified, using: [standard,commercial] from last GUI settings

Downloading module 'pm2'
Processing pm2
Downloading...
 23443/23443 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 5 seconds

[root@uc-XXXX ~]# fwconsole ma upgrade core --edge
Edge repository temporarily enabled
No repos specified, using: [standard,commercial] from last GUI settings

Downloading module 'core'
Processing core
Downloading...
 1084041/1084041 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 1 seconds

At this point I am going to wait to see if anyone else if having issues but there are no reported issues thus far and they would be coming in like wildfire if people couldn’t update modules right now

The “File Integrity failed … aborting (GPG Verify File check failed)” problem is only occurring when installing on the new Debian 9 Stretch o/s.

The system time is set correctly.

Can you give me any clues as to what system packages you rely on for this operation as I have no idea where to even start looking. Or maybe you can suggest some command line test I can run to help isolate the source.

Thanks

As I am a self proclaimed " expert" on FreePBX, Linux kernels, systemd et al, I suggest you just went “A bridge too far” with FreePBX, it is still two generations behind you, the Linux kernel and probably ‘other things’ also, Asterisk will work fine for you however, but any attempt to use “Commercially licensed modules” will always fail dismally.

The problem was more obvious than I expected.

The FreePBX installer is failing to retrieve/install the GPG key when running on Debian 9.

Manually retrieving/installing the GPG key prior to running the FreePBX installer eliminates all the “File Integrity failed” issues and installation completes successfully.

What happens when that key changes.

Unless you’re willing to find and fix the cause of FreePBX failing to properly retrieve/install keys, it’ll probably require another manual intervention.

At the end of the installer it should say Trusting FreePBX Key…

“Trusting FreePBX…Trusted
You have successfully installed FreePBX”

But we only get this far if I manually install the GPG key BEFORE the FreePBX installer is run. Otherwise, every module download fails with “File Integrity failed” and the operation is aborted.

Trusting FreePBX…Trusted

Should happen before any modules are downloaded. I dont understand why or how modules are being downloaded before that is run.

Edit: It looks like it’s because UCP requires PM2 and thats not in the base install.

pm2 is now in the base 14 installation.

I’ve started a new install (with no manual key installation) and will report back when the verdict is in.[quote=“tm1000, post:14, topic:43818”]
It looks like it’s because UCP requires PM2 and thats not in the base install.
[/quote]
I’m skeptical of this being the cause since this has never been (and still isn’t) a problem installing FreePBX on Debian 8. Time will tell…

As we’ve discussed in the past, I’d prefer there be NO modules included in the base installation (other than any absolutely required to get FreePBX installed and alive) and let the implementer choose what to install after the initial installation completes. It would save you headaches like this and not require the implementer to remove unwanted modules.

No improvement.

userman has a requirement of certman that’s not included in the base modules. I don’t believe the solution is to simply add certman as another base module (where does adding base modules stop?). You’ll end up with the base modules installing, but failures on everything else, as well as the installed base modules being flagged as ‘tampered’ since the GPG key is still missing or wrong.

Installing ucp…
Detected Missing Dependency of: userman 13.0.35
Found local Dependency of: userman 14.0.3.24
Installing Missing Dependency of: userman 13.0.35
Updating table userman_users…Done
Updating table userman_users_settings…Done
Updating table userman_groups…Done
Updating table userman_groups_settings…Done
Updating table userman_directories…Done
Generating CSS…Done
Installed Missing Dependency of: userman 13.0.35
Detected Missing Dependency of: certman
Downloading Missing Dependency of: certman
Processing certman
Downloading…
150132/150132 [============================] 100%
Finished downloading
The following error(s) occured:

  • File Integrity failed for /var/www/html/admin/modules/_cache/certman-13.0.36.10.tgz.gpg - aborting (GPG Verify File check failed)
    Unable to resolve dependencies for module ucp:

After permissions are set:

Finished setting permissions
Generating default configurations…
Reloading FreePBX
Successfully reloaded
Finished generating default configurations
Trusting FreePBX…Trusted
You have successfully installed FreePBX

When ‘fwconsole ma upgradeall’ is run:

Module(s) requiring upgrades: callrecording, core, customappsreg, pm2, sipsettings, userman, voicemail
Upgrading module ‘core’ from 14.0.1.5 to 14.0.1.8
Downloading module 'core’
Processing core
Downloading…
1084041/1084041 [============================] 100%
Finished downloading
The following error(s) occured:

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

When ‘fwconsole ma downloadinstall announcement asteriskinfo …’ is run:

Downloading module 'announcement’
Processing announcement
Downloading…
70046/70046 [============================] 100%
Finished downloading
The following error(s) occured:

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

I dont know how to fix this problem for you. You need userman to use FreePBX. So either I have certman or I do nothing. I don’t know. You tell me. Or tell me what modules you want in the default tarball for base installations (I feel like we’ve had this conversation before but perhaps not)

I think you’re still missing the problem. It’s not base module dependencies that are causing a problem. There has been no problem (and there is still no problem) when installing on Debian 8, even though some dependencies on base modules have to be resolved by downloading.

The problem appears to be a missing or wrong GPG key when installing on Debian 9. It first shows up when trying to resolve dependencies (by downloading) on base modules, but it continues to show up on every module downloaded. If I ignore all the errors and go ahead and log into FreePBX with a browser, all the successfully installed base modules are flagged as ‘tampered’. If I retrieve/install the correct GPG key, either before OR after installing FreePBX, all GPG related problems disappear (the already installed ‘tampered’ base modules magically become healthy and can be updated, and additional modules can be successfully downloaded/installed).

I think the attention needs to be directed toward the GPG key, not module dependencies.

We did have this conversation before, but things got side-tracked and the discussion never resumed. I would love for there to be NO base modules. I think the installer should install only the absolute bare minimum to be able to run and be accessed via a browser. Desired modules can then be installed via ‘fwconsole ma downloadinstall’ as I do scripted, or via Module Admin if by hand is preferred. I seriously doubt that anyone who uses the installer sticks with just the current set of base modules without making changes. Why not have the starting point be a blank slate?

There is no problem with the GPG key. The problem is that you aren’t getting to the “Trusting FreePBX…Trusted”.

I already said this. You already said this.

The GPG keys are retrieved from the GPG servers.

Because FreePBX will crash. Try to run or use FreePBX without SIPSettings or Core. Anyways the base state you are requesting is where it’s at today.