Ioncube Error: No Valid License Found

On a fresh install of FreePBX 16, I restored a backup from v13. Now, things are broken.

The freepbx_dbug log shows these errors:

[2024-03-08 04:49:09] [dbug.DEBUG]: NO Valid License File found


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: 2024-Mar-08 04:49:15        /var/www/html/admin/modules/sysadmin/functions.inc/IoncubeErrorCallback.php:62


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: Ioncube Error : missing license.


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: 2024-Mar-08 04:49:15        /var/www/html/admin/modules/sysadmin/functions.inc/IoncubeErrorCallback.php:63


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: Array
(
    [license_file] => /etc/sangoma/license.txt
    [current_file] => /var/www/html/admin/modules/sysadmin/functions.inc/IoncubeLicenseLoader.php
    [ip_address] =>
    [domain_name] =>
    [include_file] =>
)



 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: 2024-Mar-08 04:49:15        /var/www/html/admin/modules/sysadmin/functions.inc/Ioncube.php:44


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: Ioncube Error: No Valid License Found


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: 2024-Mar-08 04:49:15        /var/www/html/admin/modules/sysadmin/functions.inc/Ioncube.php:44


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: Ioncube Error: No Valid License Found


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: 2024-Mar-08 04:49:15        /var/www/html/admin/modules/sysadmin/functions.inc/sysadmin.extend.class.php:85


 [] []
[2024-03-08 04:49:15] [dbug.DEBUG]: NO Valid License File found

They repeat until it gives up.

fwconsole restart fails with:

Starting Asterisk...
[--------------->------------] 2 mins
In Start.class.php line 193:

  Unable to connect to Asterisk. Did it start?

My guess is the Asterisk problem is related to the Ioncube problem.

If anyone can help with this, it would be appreciated!

Turns out that even though it was complaining that it was unable to connect to asterisk, asterisk was actually running.

Connecting to it from the shell with “asterisk -rvvv” repeatedly showed these two errors:

[Mar  8 17:21:02] NOTICE[29121]: manager.c:3681 authenticate: 127.0.0.1 failed to authenticate as 'pbxadmin'
[Mar  8 17:21:03] NOTICE[29135]: manager.c:3644 authenticate: 127.0.0.1 tried to authenticate with nonexistent user 'pbxadmin'

Apparently, when restoring the backup, it wiped out the pbxadmin entry in /etc/asterisk/manager.conf. To fix this, I just copied the existing random user block and changed the username to pbxadmin for the new block.

I verified the password hash matched the database with:
mysql -e 'select keyword,value from asterisk.freepbx_settings where keyword = "ampmgrpass";'

Then I did a ‘fwconsole restart’ and everything came up clean.

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