Hello everyone! Faced the other day with a problem, the description of which I did not find on the forum. I install FreePBX 15 from source. Everything worked fine until I needed to install the arimanager and asteriskinfo modules. The problem is in the arimanager module. After installing it, I do the
fwconsole chown && fwconsole reload
As a result, I get a 495 error from php-asmanager.php
[root@headstack asterisk]# fwconsole reload -vvvvvvvvv
Reload StartedIn php-asmanager.php line 495:
[Whoops\Exception\ErrorException (2)]
fclose() expects parameter 1 to be resource, boolean givenException trace:
() at /var/www/html/admin/libraries/php-asmanager.php:495
Whoops\Run->handleError() at n/a:n/a
fclose() at /var/www/html/admin/libraries/php-asmanager.php:495
AGI_AsteriskManager->disconnect() at /var/www/html/admin/libraries/php-asmanager.php:257
AGI_AsteriskManager->send_request() at /var/www/html/admin/libraries/php-asmanager.php:597
AGI_AsteriskManager->Command() at /var/www/html/admin/modules/arimanager/Arimanager.class.php:155
Arimanager->genPassword() at /var/www/html/admin/modules/arimanager/Arimanager.class.php:353
Arimanager->genConfig() at /var/www/html/admin/libraries/BMO/FileHooks.class.php:97
FreePBX\FileHooks->processNewHooks() at /var/www/html/admin/libraries/BMO/FileHooks.class.php:26
FreePBX\FileHooks->processFileHooks() at /var/www/html/admin/libraries/Console/Reload.class.php:331
FreePBX\Console\Command\Reload->reload() at /var/www/html/admin/libraries/Console/Reload.class.php:90
FreePBX\Console\Command\Reload->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:163reload [–json] [–dry-run] [–skip-registry-checks] [–dont-reload-asterisk]
If you use the --json option, the output will be like this:
[root@headstack asterisk]# fwconsole reload -vvvvvvvvv --json
{“message”:“Reload Started”}
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
{“message”:“Reload Complete”}
If you demolish the arimanager module, then everything starts working again.
This is not the end of my analysis of the problem. I found that in the case when the module is installed, and I do fwconsole reload, the following happens in the full Asterisk log:
- On the last line of this piece, the process freezes, Asterisk restarts.
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15886] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15886] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15892] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15892] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15894] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15894] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15757] asterisk.c: Remote UNIX connection
[2020-06-09 17:21:32] VERBOSE[15896] asterisk.c: Remote UNIX connection disconnected
[2020-06-09 17:21:32] VERBOSE[15896] asterisk.c: Remote UNIX connection disconnected
- After freezing, it is clear that Asterisk restarts and the log continues on, eventually Asterisk gets up, but the problem is not solved. The full log is quite voluminous, so I won’t upload all of it here.
[2020-06-09 17:21:39] Asterisk 16.9.0 built by root @ headstack on a x86_64 running Linux on 2020-06-08 11:11:46 UTC
[2020-06-09 17:21:39] Asterisk 16.9.0 built by root @ headstack on a x86_64 running Linux on 2020-06-08 11:11:46 UTC
[2020-06-09 17:21:39] VERBOSE[15942] message.c: Message handler ‘dialplan’ registered.
[2020-06-09 17:21:39] VERBOSE[15942] message.c: Message handler ‘dialplan’ registered.
[2020-06-09 17:21:39] VERBOSE[15942] pbx_functions.c: Registered custom function ‘MESSAGE’
[2020-06-09 17:21:39] VERBOSE[15942] pbx_functions.c: Registered custom function ‘MESSAGE’
[2020-06-09 17:21:39] VERBOSE[15942] pbx_functions.c: Registered custom function ‘MESSAGE_DATA’
[2020-06-09 17:21:39] VERBOSE[15942] pbx_functions.c: Registered custom function ‘MESSAGE_DATA’
[2020-06-09 17:21:39] VERBOSE[15942] pbx_app.c: Registered application ‘MessageSend’
[2020-06-09 17:21:39] VERBOSE[15942] pbx_app.c: Registered application ‘MessageSend’
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action MessageSend
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action MessageSend
[2020-06-09 17:21:39] VERBOSE[15942] channel.c: Registered channel type ‘Surrogate’ (Surrogate channel used to pull channel from an application)
[2020-06-09 17:21:39] VERBOSE[15942] channel.c: Registered channel type ‘Surrogate’ (Surrogate channel used to pull channel from an application)
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologyList
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologyList
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologySuspend
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologySuspend
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologyUnsuspend
[2020-06-09 17:21:39] VERBOSE[15942] manager.c: Manager registered action BridgeTechnologyUnsuspend
[2020-06-09 17:21:39] VERBOSE[15942] dns_core.c: Registered DNS resolver ‘system’ with priority ‘2147483647’
[2020-06-09 17:21:39] VERBOSE[15942] dns_core.c: Registered DNS resolver ‘system’ with priority ‘2147483647’
Colleagues, I ask for help in Troubleshoot.