Hello to all.
I'm trying to install raspbx but every time(10) i have the same problem
at freepbx i get the red "can not connect to asterisk" message.
every time i follow the tutorial(i install it 10 times word by word).
when first boot at raspbx i run raspi-config (expand_rootfs) - reboot- then run raspbx-upgrade - reboot
and i get "can not connect to asterisk".......
after
ps -ef | grep /usr/sbin/asterisk``
and i get
root 19090 16638 0 12:18 pts/0 00:00:00 grep /usr/sbin/asterisk
It is a bit strange you have this problem, as we have been through this before. Have a look at the file /usr/sbin/safe_fwconsole it does exactly the same what you described. And the startup script /etc/systemd/system/freepbx.service uses the safe_fwconsole script to start Asterisk. Run the command systemctl status freepbx to make sure the above script is active. Maybe you have different startup scripts on your system?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does it start when you call fwconsole start ?
Is this a Pi1 with a rather slow SD card? The error looks like the chown phase of fwconsole took too long. It can happen on a Pi1, if the process takes much more than 5 minutes the FreePBX startup script just stops because it thinks it should have finished by then.
It might help to use a faster SD card if you still want to stick with the Pi 1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gernot,
I have recently came across pretty much the same problem. Once I restart my FreePBX Server (rides on top of Raspberry Pi model B) with /sbin/reboot then it doesn't strat up automatically:
I read your guess that it might be due to the raspberry pi 1 model B hardware capabilities, however it was running like a charm without any problems for along time and only a while ago I noticed this issue. This makes me to believe that the code itself may cause the problem, not hardware.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I went ahead and performed some testing. I have two devices: RPI 3 model B and RPI 1 model B. Both run Raspbx (Asterisk + FreePBX, nothing more). The issue I described above is specific to RPI 1 model B only. I rebooted my RPI 3 model B a few times and it successfully restarted.
With that in mind it is likely to be what Gernot mentined above. However, let me be repiatative, this was not observed, for example, a month ago. I have a steady feeling that it with some updates.
Gentlemen,
I would appreciate any help on this, as the problem drives me nuts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For those, who may stumble across the same issue - the workaround is to disable FreePBX web interface and a few adjacent service to allow for bare Asterisk startup and run:
This configuration will persist after reboot and make it possible for Asterisk to start. You may also play with unused Asterisk modules to speed up the boot process as well.
You can always revert to where your starting point:
Then reboot. This will considerably speed up boot time.
I took an old Pi 1 with a class 6 SD card here and it showed the same problem, but not every time I rebooted, just once in a while. It looks like a timeout in the fwconsole script. But it is not clear to me what really causes the timeout, because the start process always takes about the same amount of time, and one time it workes and another time it does not.
If you can confirm everything is working stable with the --skipchown modification I will put this into the image for everyone.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello to all.
I'm trying to install raspbx but every time(10) i have the same problem
at freepbx i get the red "can not connect to asterisk" message.
every time i follow the tutorial(i install it 10 times word by word).
when first boot at raspbx i run raspi-config (expand_rootfs) - reboot- then run raspbx-upgrade - reboot
and i get "can not connect to asterisk".......
after
and i get
root 19090 16638 0 12:18 pts/0 00:00:00 grep /usr/sbin/asterisk
i get
asterisk 18662 18660 74 12:16 pts/0 00:01:00 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
root 19090 16638 0 12:18 pts/0 00:00:00 grep /usr/sbin/asterisk
and then i can connect to asterisk with freepbx.
if i reboot i have to do again
What Is Wrong?
Thank you.
It is a bit strange you have this problem, as we have been through this before. Have a look at the file /usr/sbin/safe_fwconsole it does exactly the same what you described. And the startup script /etc/systemd/system/freepbx.service uses the safe_fwconsole script to start Asterisk. Run the command systemctl status freepbx to make sure the above script is active. Maybe you have different startup scripts on your system?
Hi. I have the same problem. What needs to be changed?
/usr/sbin/safe_fwconsole
FILE1=/var/lib/asterisk/bin/fwconsole
if [ -f $FILE1 ]
then
if [ ! -x $FILE1 ]
then
chmod 755 $FILE1
$FILE1 chown
fi
$FILE1 $@
else
exit 1
fi
/etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mysql.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/safe_fwconsole start
ExecStop=/usr/sbin/safe_fwconsole stop
[Install]
WantedBy=multi-user.target
systemctl status freepbx
● freepbx.service - FreePBX VoIP Server
Loaded: loaded (/etc/systemd/system/freepbx.service; enabled)
Active: failed (Result: exit-code) since Пт 2017-04-14 08:30:20 +06; 1h 45min ago
Process: 1294 ExecStart=/usr/sbin/safe_fwconsole start (code=exited, status=1/FAILURE)
Main PID: 1294 (code=exited, status=1/FAILURE)
апр 14 08:30:15 raspbx safe_fwconsole[1294]: [------------>--------------...s
апр 14 08:30:16 raspbx safe_fwconsole[1294]: [------------->-------------...s
апр 14 08:30:17 raspbx safe_fwconsole[1294]: [-------------->------------...s
апр 14 08:30:18 raspbx safe_fwconsole[1294]: [--------------->-----------...s
апр 14 08:30:18 raspbx safe_fwconsole[1294]: [Exception]
апр 14 08:30:18 raspbx safe_fwconsole[1294]: Unable to connect to Asteris...?
апр 14 08:30:18 raspbx safe_fwconsole[1294]: start [--pre] [--post] [--sk...]
апр 14 08:30:18 raspbx systemd[1]: freepbx.service: main process exited,...RE
апр 14 08:30:20 raspbx systemd[1]: Failed to start FreePBX VoIP Server.
апр 14 08:30:20 raspbx systemd[1]: Unit freepbx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Thank you in advance
Does it start when you call fwconsole start ?
Is this a Pi1 with a rather slow SD card? The error looks like the chown phase of fwconsole took too long. It can happen on a Pi1, if the process takes much more than 5 minutes the FreePBX startup script just stops because it thinks it should have finished by then.
It might help to use a faster SD card if you still want to stick with the Pi 1.
Gernot,
I have recently came across pretty much the same problem. Once I restart my FreePBX Server (rides on top of Raspberry Pi model B) with /sbin/reboot then it doesn't strat up automatically:
● freepbx.service - FreePBX VoIP Server
Loaded: loaded (/etc/systemd/system/freepbx.service; enabled)
Active: failed (Result: exit-code) since Sat 2017-04-22 19:34:04 CDT; 7min ago
Process: 1585 ExecStart=/usr/sbin/safe_fwconsole start (code=exited, status=1/FAILURE)
Main PID: 1585 (code=exited, status=1/FAILURE)
I read your guess that it might be due to the raspberry pi 1 model B hardware capabilities, however it was running like a charm without any problems for along time and only a while ago I noticed this issue. This makes me to believe that the code itself may cause the problem, not hardware.
I went ahead and performed some testing. I have two devices: RPI 3 model B and RPI 1 model B. Both run Raspbx (Asterisk + FreePBX, nothing more). The issue I described above is specific to RPI 1 model B only. I rebooted my RPI 3 model B a few times and it successfully restarted.
With that in mind it is likely to be what Gernot mentined above. However, let me be repiatative, this was not observed, for example, a month ago. I have a steady feeling that it with some updates.
Gentlemen,
I would appreciate any help on this, as the problem drives me nuts.
For those, who may stumble across the same issue - the workaround is to disable FreePBX web interface and a few adjacent service to allow for bare Asterisk startup and run:
This configuration will persist after reboot and make it possible for Asterisk to start. You may also play with unused Asterisk modules to speed up the boot process as well.
You can always revert to where your starting point:
Could you please try this: Edit the file /etc/systemd/system/freepbx.service and change this line from
to
Then reboot. This will considerably speed up boot time.
I took an old Pi 1 with a class 6 SD card here and it showed the same problem, but not every time I rebooted, just once in a while. It looks like a timeout in the fwconsole script. But it is not clear to me what really causes the timeout, because the start process always takes about the same amount of time, and one time it workes and another time it does not.
If you can confirm everything is working stable with the --skipchown modification I will put this into the image for everyone.