Pi Buster shutdown or loss of power. FusionPBX did not load on power up

Status
Not open for further replies.

btil

New Member
Sep 3, 2020
13
0
1
68
When I shutdown my Pi to relocate the FusionPBX did not restart on Pi boot. Why did FusionPBX not load on boot? What is the command to restart FusionPBX without going to /usr/src/fushion-install.sh/debian/ && ./install.sh ?
 

agree

Member
Aug 26, 2018
135
24
18
FusionPBX is not a daemon service that needs to start on boot it's mostly web application the files are at /var/www/fusionpbx. What's exactly that's not working?
 

btil

New Member
Sep 3, 2020
13
0
1
68
Thank you for your reply and question. I shutdown the Pi to relocate. When booted back up I could not open the PBX Gui. I had to perform the Install string to get the PBX working again. I'm concerned if I place this in a commerical application and there is a loss of power the system will not come back up on it's own.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
499
177
43
49
It is not common to have that issue. Your issue could have been resolved without re-installing. Especially if you had help to diagnose it. You provided so little information leaving it impossible to know what went wrong on your system unfortunately we don't have even a good description of the problem. You couldn't login to the GUI? This could because you logged into the device that had a new IP address and your account was assigned to the old IP address. Or maybe blocked by fail2ban.
 
Last edited:

btil

New Member
Sep 3, 2020
13
0
1
68
I guess the question is, after a shutdown (either intentional or a power loss) once the Pi reboots what action(s) are required to restart FusionPBX? The IP remained the same. The GUI login did not load. What other info would you like to see? Thank you.
 

agree

Member
Aug 26, 2018
135
24
18
What means the GUI is not loading, is there any error you see in the browser when you try to get to your login is it a browser error or a server error nginx, php?
 

btil

New Member
Sep 3, 2020
13
0
1
68
When I type the Pi IP address into the browser the page was not found. Timed out.
 

agree

Member
Aug 26, 2018
135
24
18
Can you confirm the nginx service is running
Code:
systemctl status nginx.service
 

mat1010

Member
Jun 8, 2019
56
14
8
Germany
When I type the Pi IP address into the browser the page was not found. Timed out.
Is it a timeout, or a 404 - page not found? If your request times out it may just mean your webserver is not started.

systemctl status nginx will show you the status of the webserver. It may also be that the php-fpm is not started systemctl status php-fpm will show you the status of the php-fpm daemon. Could you post both outputs?

If the daemon(s) are not started it might be enough to start the service systemctl start {nginx,php-fpm}and if that works you can add it into autostart with
Code:
systemctl enable nginx
systemctl enable php-fpm
 

btil

New Member
Sep 3, 2020
13
0
1
68
I did a shutdown of the Pi to try to repeat the issue. The fusionPBX page did come back and I can log in, however my two phones, I'm testing with, have lost registration. Trying the strings referenced by "agree" and "mat1010" return the following:

root@raspberrypi:~# systemct1 status nginx.service
-bash: systemct1: command not found
root@raspberrypi:~# systemct1 start nginx
-bash: systemct1: command not found
root@raspberrypi:~# systemct1 enable nginx
-bash: systemct1: command not found
 

mat1010

Member
Jun 8, 2019
56
14
8
Germany
root@raspberrypi:~# systemct1 status nginx.service
-bash: systemct1: command not found
root@raspberrypi:~# systemct1 start nginx
-bash: systemct1: command not found
root@raspberrypi:~# systemct1 enable nginx
-bash: systemct1: command not found
The command is not systemct1, it's systemctl - you can just copy & paste it to avoid typos. But anyway - a non started webserver seems not to be your issues. Can you check the content of /var/log/freeswitch/freeswitch.log to see if you have any errors that occur while registering the phones?
 

btil

New Member
Sep 3, 2020
13
0
1
68
Thank you for that correction mat1010. status nginx returned

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-09-10 22:25:33 EDT; 16h ago
Docs: man:nginx(8)
Process: 486 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 593 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 595 (nginx)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/nginx.service
├─595 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─596 nginx: worker process
├─598 nginx: worker process
├─599 nginx: worker process
└─600 nginx: worker process

Sep 10 22:25:30 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 10 22:25:33 raspberrypi systemd[1]: Started A high performance web server and a reverse proxy server.

There is a freeswitch.log and a freeswitch.log.1 file in that directory

root@raspberrypi:/var/log/freeswitch# ls -l
total 14108
-rw-rw---- 1 www-data www-data 3425281 Sep 11 06:30 freeswitch.log
-rw-rw---- 1 www-data www-data 10485899 Sep 3 20:29 freeswitch.log.1
-rw-rw---- 1 www-data www-data 512421 Sep 11 06:30 freeswitch.xml.fsxml
drwxr-x--- 2 www-data www-data 4096 Sep 2 11:42 xml_cdr
root@raspberrypi:/var/log/freeswitch# open freeswitch.log
-bash: open: command not found

How do I view the file?
 

mat1010

Member
Jun 8, 2019
56
14
8
Germany
How do I view the file?
you can use cat or less for example. You can also use tail -f which will live follow the output and makes debugging easier when you run the registration on one of the phones. The important file is freeswitch.log since this is the file that is currently written into. freeswitch.log.1 is from 3rd of September and just the rotated version.

So run tail -f freeswitch.log from within the /var/log/freeswitch directory, or tail -f /var/log/freeswitch/freeswitch.log when you are not in that directory anymore and restart the registration on one of the phones.
 

btil

New Member
Sep 3, 2020
13
0
1
68
root@raspberrypi:/var/log/freeswitch# tail -f freeswitch.log
2020-09-11 06:28:16.899912 [NOTICE] switch_utils.c:658 Adding 127.0.0.0/8 (allow) [] to list loopback.auto
2020-09-11 06:28:16.899912 [NOTICE] switch_utils.c:658 Adding ::1/128 (allow) [] to list loopback.auto
2020-09-11 06:28:16.899912 [NOTICE] switch_core.c:1546 Created ip list localnet.auto default (deny)
2020-09-11 06:28:16.899912 [NOTICE] switch_core.c:1549 Adding 192.168.4.49/255.255.255.0 (allow) to list localnet.auto
2020-09-11 06:28:16.899912 [NOTICE] switch_core.c:1574 Created ip list domains default (deny)
2020-09-11 06:28:16.899912 [INFO] mod_enum.c:884 ENUM Reloaded
2020-09-11 06:28:16.919911 [INFO] switch_time.c:1430 Timezone reloaded 530 definitions
2020-09-11 06:28:16.939915 [WARNING] switch_core.c:1627 Cannot locate domain 192.168.4.49 ; This is the IP of the Pi & login for FusionPBX
2020-09-11 06:28:16.939915 [NOTICE] switch_core.c:1574 Created ip list lan default (allow)
2020-09-11 06:28:16.939915 [NOTICE] switch_utils.c:658 Adding 192.168.42.42/32 (allow) [] to list lan

Nothing happens beyond this point.
 

btil

New Member
Sep 3, 2020
13
0
1
68
mat1010, I thank you for your assistance. I've got to run. I'll work at this later this eve if time permits. Thanks again!
 

mat1010

Member
Jun 8, 2019
56
14
8
Germany
2020-09-11 06:28:16.939915 [WARNING] switch_core.c:1627 Cannot locate domain 192.168.4.49 ; This is the IP of the Pi & login for FusionPBX
Has this IP changed since the initial installation? If so, might you phones try to register against the wrong IP address?
 

btil

New Member
Sep 3, 2020
13
0
1
68
The IP of the Pi has never changed following a reboot, has always been 192.168.4.49 After running cd /usr/src/fusionpbx-install.sh/debian && ./install.sh again and waiting 5 minutes for the program to revisit its past. Only one of my two 2160's is now registered. The other has two "Extensions" listed for it (the same number) and I cannot delete either one. Even trying to delete both profiles fails.
 

mat1010

Member
Jun 8, 2019
56
14
8
Germany
Mhh, this sound pretty messed up. Have you tried to clean install the pi and fpbx afterwards? You first reinstallation after the reboot might have caused some strange inconsistencies in the database. If you see issues after a fresh install of both pi and fpbx you might have another look into above mentioned commands and the fpbx logs again.
 

ponch9

New Member
Nov 27, 2019
8
0
1
54
I'm having similar issues. I'm on Debian 10, which OS are you using? If I reboot server, it's seldom it will come back working properly. I can't access the GUI, even thought Nginx is running, and I make sure to restart nginx. I have same IP from location I login, and I restart fail2ban and netfilter-persistent. I can't login with SSH either. Sometimes even the SIP registrations fails after reboot. I'm going to try Ubuntu 20.04 LTS tonight instead.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Debian 10 is rock solid. If you have problems with it, investigate further. If nginx is definitely running and you cannot access gui then its very likely fail2ban.
 
Status
Not open for further replies.