FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
9 stars 1 forks source link

[bug]: asterisk-version-switch errors: asterisk21->asterisk20 and asterisk20->asterisk21 #265

Closed dolesec closed 4 months ago

dolesec commented 4 months ago

FreePBX Version

FreePBX 17

Issue Description

had the desire to test something with a different asterisk version this morning and during the version switch from 21 to 20, I encountered an error.

the error occurred after all packages were updated - freepbx shutdown was successful however upon Running FreePBX startup...

Reload Started

In Pest.php line 232:

  Failed to connect to 127.0.0.1 port 6001 after 0 ms: Couldn't connect to server  

reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]

version switch error.txt

the same error was encountered when moving asterisk back to version 21 ...

Operating Environment

root@fpbx17:~# fwconsole ma list No repos specified, using: [standard,extended,commercial] from last GUI settings

+---------------------+------------+---------+-------------+-----------+ | Module | Version | Status | License | Signature | +---------------------+------------+---------+-------------+-----------+ | accountcodepreserve | 17.0.0.1 | Enabled | GPLv2 | Sangoma | | amd | 17.0.1 | Enabled | GPLv3+ | Sangoma | | announcement | 17.0.2.1 | Enabled | GPLv3+ | Sangoma | | api | 17.0.1.4 | Enabled | AGPLv3+ | Sangoma | | areminder | 17.0.3.10 | Enabled | Commercial | Sangoma | | arimanager | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | asterisk-cli | 17.0.2 | Enabled | GPLv3+ | Sangoma | | asteriskinfo | 17.0.2 | Enabled | GPLv3+ | Sangoma | | backup | 17.0.5.52 | Enabled | GPLv3+ | Sangoma | | blacklist | 17.0.1.2 | Enabled | GPLv3+ | Sangoma | | broadcast | 17.0.1.6 | Enabled | Commercial | Sangoma | | builtin | | Enabled | | Unsigned | | bulkhandler | 17.0.4 | Enabled | GPLv3+ | Sangoma | | calendar | 17.0.4.15 | Enabled | GPLv3+ | Sangoma | | callaccounting | 17.0.5 | Enabled | Commercial+ | Sangoma | | callback | 17.0.2.1 | Enabled | GPLv3+ | Sangoma | | callerid | 17.0.1 | Enabled | Commercial | Sangoma | | callforward | 17.0.1.6 | Enabled | AGPLv3+ | Sangoma | | calllimit | 17.0.1.2 | Enabled | Commercial | Sangoma | | callrecording | 17.0.3.6 | Enabled | AGPLv3+ | Sangoma | | callwaiting | 17.0.3.4 | Enabled | GPLv3+ | Sangoma | | cdr | 17.0.4.15 | Enabled | GPLv3+ | Sangoma | | cdrpro | 17.0.3.16 | Enabled | Commercial | Sangoma | | cel | 17.0.2.8 | Enabled | GPLv3+ | Sangoma | | certman | 17.0.3.11 | Enabled | AGPLv3+ | Sangoma | | cidlookup | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | conferences | 17.0.3.2 | Enabled | GPLv3+ | Sangoma | | conferencespro | 17.0.1.7 | Enabled | Commercial | Sangoma | | configedit | 17.0.1.1 | Enabled | AGPLv3+ | Sangoma | | contactmanager | 17.0.5.11 | Enabled | GPLv3+ | Sangoma | | core | 17.0.9.69 | Enabled | GPLv3+ | Sangoma | | cos | 17.0.1.1 | Enabled | Commercial | Sangoma | | customappsreg | 17.0.1 | Enabled | GPLv3+ | Sangoma | | dashboard | 17.0.4.3 | Enabled | AGPLv3+ | Sangoma | | daynight | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | dictate | 17.0.1.2 | Enabled | GPLv3+ | Sangoma | | directory | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | disa | 17.0.3 | Enabled | AGPLv3+ | Sangoma | | donotdisturb | 17.0.2.3 | Enabled | GPLv3+ | Sangoma | | endpoint | 17.0.1.71 | Enabled | Commercial | Sangoma | | extensionroutes | 17.0.1 | Enabled | Commercial | Sangoma | | extensionsettings | 17.0.1 | Enabled | GPLv3+ | Sangoma | | fax | 17.0.3.4 | Enabled | GPLv3+ | Sangoma | | faxpro | 17.0.1.15 | Enabled | Commercial | Sangoma | | featurecodeadmin | 17.0.2 | Enabled | GPLv3+ | Sangoma | | filestore | 17.0.2.20 | Enabled | AGPLv3 | Sangoma | | findmefollow | 17.0.4.8 | Enabled | GPLv3+ | Sangoma | | firewall | 17.0.1.26 | Enabled | AGPLv3+ | Sangoma | | framework | 17.0.15.27 | Enabled | GPLv2+ | Sangoma | | hotelwakeup | 17.0.1.6 | Enabled | GPLv2 | Sangoma | | iaxsettings | 17.0.1 | Enabled | AGPLv3 | Sangoma | | infoservices | 17.0.1 | Enabled | GPLv2+ | Sangoma | | ivr | 17.0.6 | Enabled | GPLv3+ | Sangoma | | languages | 17.0.1 | Enabled | GPLv3+ | Sangoma | | logfiles | 17.0.3.3 | Enabled | GPLv3+ | Sangoma | | manager | 17.0.5 | Enabled | GPLv2+ | Sangoma | | miscapps | 17.0.3 | Enabled | GPLv3+ | Sangoma | | miscdests | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | missedcall | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | music | 17.0.4 | Enabled | GPLv3+ | Sangoma | | outroutemsg | 17.0.1 | Enabled | GPLv3+ | Sangoma | | paging | 17.0.3 | Enabled | GPLv3+ | Sangoma | | pagingpro | 17.0.1.6 | Enabled | Commercial | Sangoma | | parking | 17.0.2.4 | Enabled | GPLv3+ | Sangoma | | parkpro | 17.0.1.4 | Enabled | Commercial | Sangoma | | pbxmfa | 17.0.2 | Enabled | Commercial+ | Sangoma | | phpinfo | 17.0.1 | Enabled | GPLv2+ | Sangoma | | pinsets | 17.0.3.2 | Enabled | GPLv3+ | Sangoma | | pinsetspro | 17.0.2 | Enabled | Commercial | Sangoma | | pm2 | 17.0.3.2 | Enabled | AGPLv3+ | Sangoma | | presencestate | 17.0.2.4 | Enabled | GPLv3+ | Sangoma | | printextensions | 17.0.1.2 | Enabled | GPLv3+ | Sangoma | | queueprio | 17.0.1.4 | Enabled | GPLv3+ | Sangoma | | queues | 17.0.1.9 | Enabled | GPLv2+ | Sangoma | | queuestats | 17.0.1.7 | Enabled | Commercial | Sangoma | | qxact_reports | 17.0.2 | Enabled | Commercial | Sangoma | | recording_report | 17.0.3.8 | Enabled | Commercial | Sangoma | | recordings | 17.0.2.2 | Enabled | GPLv3+ | Sangoma | | restapps | 17.0.1.18 | Enabled | Commercial | Sangoma | | ringgroups | 17.0.2.4 | Enabled | GPLv3+ | Sangoma | | sangomaconnect | 17.0.1.34 | Enabled | Commercial | Sangoma | | sangomacrm | 17.0.1.6 | Enabled | Commercial | Sangoma | | sangomartapi | 17.0.1.25 | Enabled | Commercial | Sangoma | | setcid | 17.0.1.2 | Enabled | GPLv3+ | Sangoma | | sipsettings | 17.0.6.7 | Enabled | AGPLv3+ | Sangoma | | sipstation | 17.0.3.3 | Enabled | Commercial | Sangoma | | sms | 17.0.1.13 | Enabled | Commercial | Sangoma | | smsplus | 17.0.3 | Enabled | Commercial | Sangoma | | soundlang | 17.0.4.1 | Enabled | GPLv3+ | Sangoma | | sysadmin | 17.0.1.88 | Enabled | Commercial | Sangoma | | timeconditions | 17.0.1.17 | Enabled | GPLv3+ | Sangoma | | tts | 17.0.1.1 | Enabled | GPLv3+ | Sangoma | | ttsengines | 17.0.1 | Enabled | AGPLv3 | Sangoma | | ucp | 17.0.4.18 | Enabled | AGPLv3+ | Sangoma | | userman | 17.0.6.25 | Enabled | AGPLv3+ | Sangoma | | vmblast | 17.0.2 | Enabled | GPLv3+ | Sangoma | | vmnotify | 17.0.1.7 | Enabled | Commercial | Sangoma | | voicemail | 17.0.5.19 | Enabled | GPLv3+ | Sangoma | | voicemail_report | 17.0.1.1 | Enabled | Commercial | Sangoma | | voipinnovations | 17.0.1.4 | Enabled | Commercial | Sangoma | | vqplus | 17.0.1.16 | Enabled | Commercial | Sangoma | | weakpasswords | 17.0.1 | Enabled | GPLv3+ | Sangoma | | webcallback | 17.0.4 | Enabled | Commercial | Sangoma | | webrtc | 17.0.2.2 | Enabled | GPLv3+ | Sangoma | +---------------------+------------+---------+-------------+-----------+

Relevant log output

...

asterisk20 has now been verified to be installed

Restarting Asterisk...
Running FreePBX shutdown...

Running Asterisk pre from Cdrpro module
Stopping CDRpro Service...
Stopping CDRpro Service
Stopping cdrpro  service 
Stopped Cdrpro service 
Running Asterisk pre from Core module
Stopping Call Transfer Monitoring Service
Stopping Core FastAGI Server
Stopped FastAGI Server
Running Asterisk pre from Restapps module
Stopping RestApps Server
Stopped RestApps Server
Running Asterisk pre from Sangomaconnect module
Stopping SangomaConnect Server
Stopped SangomaConnect Server
Running Asterisk pre from Sangomartapi module
Stopping Sangoma RT API Server...
Stopped Sangoma RT API Server
Running Asterisk pre from Ucp module
Stopping UCP Node Server
[->--------------------------] 1 sec
Stopped UCP Node Server
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] < 1 sec
Stopping Queue Callback Server
Stopped Queue Callback Server
Stopping Queue Callback Event Server
Stopped Queue Callback Event Server
Running FreePBX startup...
Running Asterisk pre from Firewall module
Running Asterisk pre from Sysadmin module
Running Sysadmin Hooks
Firewall module detected.
Restarting fail2ban
fail2ban Restarted
Updating License Information for 85587356
Checking Vpn server 
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Running Asterisk post from Cdrpro module
Starting CDRpro Service ...
Starting CDRpro event listener

Broadcast message from root@fpbx17.cditcpbx.net (somewhere) (Tue Jun 18 07:19:0

Firewall service now starting.                                                 

[->--------------------------] 1 sec
Started Cdrpro. PID is 14712
Running Asterisk post from Core module
Starting Call Transfer Monitoring Service
Starting Core FastAGI Server...
[->--------------------------] 1 sec
Started Core FastAGI Server. PID is 15826
Running Asterisk post from Endpoint module
Running Asterisk post from Pagingpro module
Running Asterisk post from Restapps module
Starting RestApps Server...
[->--------------------------] 1 sec
Started RestApps Server. PID is 16080
Running Asterisk post from Sangomaconnect module
Starting SangomaConnect Server...
[->--------------------------] < 1 sec
Started SangomaConnect Server. PID is 16329
Restarting CloudConnect Agent
Running Asterisk post from Sangomartapi module
Starting Sangoma RT API Server...
[->--------------------------] 1 sec
Started Sangoma RT API Server. PID is 16633
Running Asterisk post from Ucp module
Starting UCP Node Server...
[->--------------------------] 1 sec
Started UCP Node Server. PID is 16926
Running Asterisk post from Vqplus module
Starting Queue Callback Server...
[->--------------------------] 1 sec
Started Queue Callback Server. PID is 17150
Starting Queue Callback Event Server...
[->--------------------------] 1 sec
Started Queue Callback Event Server. PID is 17385
Regenerate FreePBX Dialplan...
Reload Started

In Pest.php line 232:

  Failed to connect to 127.0.0.1 port 6001 after 0 ms: Couldn't connect to server  

reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]
kguptasangoma commented 4 months ago

if you perform "fwconsole restart" again then will you get the same error @dolesec ?

dolesec commented 4 months ago

@kguptasangoma negative - subsequent restarts see no issues in either case ... only occurs during version switch execution itself

kguptasangoma commented 4 months ago

we just tried asterisk-version-switch and its working fine for us. do you see any error in sangomartapi logs or pm2 logs for rtapi process to get some clue why its not started for you? 6001 is port for nodejs/rtapi so looks like somehow process didnt started for you.

dolesec commented 4 months ago

@kguptasangoma I've rolled back to a previous image to further troubleshoot another issue ... when that's completed I'll take another look and report back - it's a standard install with no modifications

kguptasangoma commented 4 months ago

sure thank you sir.

dolesec commented 4 months ago

@kguptasangoma - tail of rtapi log on top , version switch running on bottom ... all is normal until the reload.

nothing is logged to rtapi.log until after the error is delivered

https://github.com/FreePBX/issue-tracker/assets/2153999/bf5223fd-0e51-4cf8-bd71-6e59a769fa0f

kguptasangoma commented 4 months ago

Hey @dolesec is it possible for you to provide me ssh to your system to check directly ? please share the details to kgupta@sangoma.com

Thanks

dolesec commented 4 months ago

@kguptasangoma - sent , let me know if you have any issues

kguptasangoma commented 4 months ago

sangomartapi v17.0.1.26