Unable to upgrade core modules

fresh install running on ubuntu server 22.04, php7.4 asterisk 19 and freepbx 16
fwconsole ma installall produces an error with module cdr

Processing cdr

In functions.inc.php line 463:
  fgets(): SSL operation failed with code 1. OpenSSL Error messages:  
  error:0A000126:SSL routines::unexpected eof while reading           

is this on a restore?

no just on a module upgrade, whether done form the ui or with:
fwconsole ma installall

I have problem with new ubuntu 22.04 and openssl 3.0.2 - Ask Ubuntu This may be your answer…

This doesn’t seem to help, I added the legacy providers to openssl conf

providers = provider_sect

# List of providers to load
default = default_sect
legacy = legacy_sect

# The fips section name should match the section name inside the
# included fipsmodule.cnf.
# fips = fips_sect

# If no providers are activated explicitly, the default one is activated implicitly.
# See man 7 OSSL_PROVIDER-default for more details.
# If you add a section explicitly activating any other provider(s), you most
# probably need to explicitly activate the default provider, otherwise it
# becomes unavailable in openssl.  As a consequence applications depending on
# OpenSSL may not work correctly which could lead to significant system
# problems including inability to remotely access the system.
activate = 1

activate = 1

and rebooted, and still get the same error

ok, this problem is a bit deeper and probably out of FreePBX to solve at the moment. Here is a description of the problem:

How it affects the upgrade is through PHP’s call to fgets (and numerous other applications that use openssl somewhere in their stream) is described here:

There is a PR to fix it in PHP8.1:

I have not looked to see if it is going to get pulled into 7.4. So this will likely remain an unresolved problem until FreePBX moves to php 8.1. So I will re-install on ubuntu 20.04 which still uses openssl 1.1.1f and see what future releases bring.

Although the error at its root is being caused by the server that hosts the upgrade files, so the real answer lies in those servers being upgraded. Those servers I assume are FreePBX controlled.

I figured out a workaround for the following setup:
Ubuntu 22.04 + openssl3 + php 7.4 + freepbx 16 + asterisk 18 (from 22.04 repo)

Also faced the error:
fgets(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A000126:SSL routines::unexpected eof while reading

But i noticed that retrying the download multiple times (mostly 5-15 times) “works around” the “issue” (so if this is a security feature in openssl3 - it does not work properly:-).

So no need to switch back from openssl3 or even 22.04 to outdated versions because of freepbx.

I created the following script then:

until [ ${RET} -eq 0 ]; do
fwconsole --skipdisabled ma download amd announcement api arimanager asteriskinfo backup blacklist builtin bulkhandler calendar callforward callrecording callwaiting cdr cel certman cidlookup conferences contactmanager core customappsreg cxpanel dashboard daynight directory donotdisturb fax featurecodeadmin filestore findmefollow framework iaxsettings infoservices ivr logfiles manager music outroutemsg pagin parking pinsets pm2 presencestate printextensions queues recordings ringgroups setcid sipsettings soundlang timeconditions ucp userman vmblast voicemail weakpasswords
echo Error recognized, retrying…
sleep 0

At my installation on an orange pi plus 2e / armbian/ubuntu 22.04 it took ~ 1 hour for the script to complete. It will exit as soon as the cmd returns exit code 0. This only happens if there was no error during package download before.
Afterwards you can run “fwconsole ma installlocal” to

Please note that replacing the cmd in the script with fw console ma installall does not work since installation of commercial plugin sms is broken.

Hoper this helps others too :slight_smile:

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