5.211.65-X to 6.12.65 upgrade script

SOLVED???

It’s quite strange. With your new script, in my case, the only way to upgrade is to:

  1. execute the upgrade script as far as the message “An error has occurred updating to FreePBX 12”
  2. in web gui, module admin, click the button “check online”, and nothing else
    3 re-execute the upgrade script

after this 3 steps I’m on freepbx12

You have force asterisk version set to 11 in Advanced Settings. Go clear it out.

Couldn’t find ‘force asterisk version’… do you mean changing SIP channel driver from both to ‘chan_pjsip’?

No it is a hidden/read only setting and if that is not set then I am sorry to say you have serious errors on your system as if that value is not set then FreePBX queries the Version number during reload and that means it can’t query the version number which is REALLY bad.

The setting is called “Force Asterisk Version”

Found it after enabling hidden/read only… it is however blank.

Just noticed the timestamp on the PJSIP unsupported message, it is from 3 days ago. Should I clear it and restart?

Update: yeah that appeared to be the old message, after clearing it and restarting, it did not return… going to change sip channel driver back to ‘both’ and see what that does (I had forced pjsip earlier)… would that change require a full reboot or just amportal restart?

Just an amportal restart!

Andrew, where can I found a more accurate upgrade log file? The log files in var/logs/pbx/upgrade say nothing… I’d like to understand where is the issue in my freepbx during the upgrade procedure.
thanks

Can anyone help me to upgrade my production freepbx system with the latest script?
With an old copy of the script, I can easly Upgrade, but I’d like to use the more updated script.

Just a shot in the dark, for a few days there was a typo in the upgrade script. I posted about it in this thread.

@tonyclewis fixed it, but I continued to have the same problem. Then I realized that wget did not overwrite the script I already had, I guess b/c filenames were the same. So I had to delete the script with the typo in it first then re-download the script.

See if you somehow still have the script with the typo in it…

The latest Upgrade Script (from FreePBX Distro 5.211.65 to FreePBX Distro 6.12.65-13) has a timestamp of 25.07.2014 15:14, with the typo fixed by @tonyclewis (as wrote by @jcbdmd in the post above).
If the Upgrade Script name have had a timestamp would be easy to track down (or, at least, recognize) changes/differences to look for the newer one.

Below a meld (graphical diff) between two scripts that share the same name but were changed during the same day:

On the right the actual one I downloaded today, on the left one downloaded during 25 July 2014. You can see the corrected typo.

Sorry I can not time stamp them. If I did they would break our auto updating stuff.

Yea!!!
finally I got the new upgrade script working!

endpoint manager & rest app was not installed at all on my freepbx. Actually I don’t use those modules so I thought it was a good practice to uninstall.

I installed those two module and, after that, the new update script works great

strange but true :wink:

You guys do an amazing job!

We used the script last night on our VPS instance and everything upgraded without a problem. According to the admin interface, we are running “Asterisk (Ver. 12.4.0)” and FreePBX “6.12.65-13” now.

I have a couple observations that may be of help to you. There is also a minor nuisance where you may be able to point me in the right direction.

The first observation might fall into the category of “user error” or “not supported”. The upgrade script was stored in a folder that had some white spaces in the path (our environment is “white space tolerant”). The script had a few error messages such as a “cd” to the folder of the script failed probably due to unquoted variables:

/var/lib/asterisk/bin/freepbx_engine: line 97: cd /PATH/INLY/TO/FIRST/WHITE/SPACE : No such file or directory

The script eventually ended after downloading a lot of items with these lines:

Untaring..Done
Module framework successfully downloaded
Module framework successfully installed
An error has occurred updating to FreePBX 12

The second observation is, that the script did not prevent us from trying to upgrade from 5.211.65-9. It detected the version, indicated it was not sufficient, yet still continued:

Check to make sure this is a FreePBX Distro system before executing
This appears to be a FreePBX Distro system as it has a Distro Version of 5.211.65-9
Make sure this is version 5.211.65-14 or greater before executing
This appears to be FreePBX Distro version 5.211.65.9 so we can now upgrade you to the 6.12.65 track as version 6.12.65-13
...

So we went into the admin interface, upgraded to 5.21.65-15, and reran the script with no errors.

Somewhere along the upgrade path from 5.211.65-9 … 5.211.65-15 … 6.12.65-13, the Superfecta image files mentioned in other posts got screwed up. They became symbolic links to themselves (such as /var/www/html/admin/assets/superfecta/images/bottom.gif --> /var/www/html/admin/assets/superfecta/images/bottom.gif) and the script had warnings such as

find: `/var/www/html/admin/assets/superfecta/images/bottom.gif': Too many levels of symbolic links

We simple removed the symbolic links and retrieved the image files from backup and everything is fine.

Now to the minor nuisance. Crontab has an entry to execute “/usr/sbin/sysadmin_update_system -a” once every minute. I am not sure whether that was there before the update or not. In any case, the program prints to stdout which leads cron to send us an email every minute now with the program output:

Array
(
    [status] => error
    [data] => SimpleXMLElement Object
        (
            [0] => This system is up to date.
        )
)

Few questions.

Should this system check really run every minute?

Is there anything we can do to make the program print info only in cases that need our attention? What I mean is the program should not print anything in the normal case.

The output is a little ambiguous. It both indicates an error, and it says the system is up to date. Anything we should do about that?

Thanks again for an amazing product!

Turn off system auto updating in sysadmin, at least for now.

Thank you, That did it.

1 Like

I just read that “FreePBX Distro 6.12.65-13 is Skipped due to internal screwup” and my production environment is exactly 6.12.65-13.

I was warned from you about risk and obviously I’m the only responsable of any damage, but actually I’d like to know if it is convenient to do a revert to 5.211 or it is safe to run the script upgrade-6.12.65-14.sh that I found on your wiki.

thanks

I noticed that the old path to voicemail & fax is still here, so users that created shortcut on their desktop continue to work in http://HOSTNAME/recordings. I’m worried that they send fax with the old fax pro, that will lead to a inconsistent fax archive.
I suppose that I still have the old path (hostname/recordings), because my install is not clean, but it is a 5.211 upgraded to 6.12

In your official upgrade script to 6.12, please delete the “/recordings” directory or do a redirect to the /ucp directory.

To solve I put the following redirect in the file index.php stored in /recordings directory:

<?php
header( 'Location: ../ucp' ) ;
/**
 * @file
 * main
 */
include_once("includes/bootstrap.php");
ariPageHeader();
include_once("includes/common.php");

handler();

ariPageFooter();


?>

Do I have to write this on issues.freepbx.org?

That would be nice…

We uninstall the ari module. That should delete the directory. If not then thats a bug in the ARI module so open a bug report

Looking at the code, it doesn’t actually remove the directory because ari was never allowed to be uninstalled (till 12) so yup its a bug