djangopbx / djangopbx-install.sh

DjangoPBX - Installer for the full-featured domain based multi-tenant PBX driven by Django and FreeSwitch.
MIT License
5 stars 9 forks source link

FreeSwitch fails to start on Debian 12 install #9

Closed wardmundy closed 7 months ago

wardmundy commented 7 months ago

freeswitch.service - freeswitch Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Fri 2024-02-02 21:55:45 UTC; 1min 6s ago Process: 13692 ExecStartPre=/bin/mkdir -p /var/run/freeswitch/ (code=exited, status=0/SUCCESS) Process: 13693 ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/lib/freeswitch /var/log/freeswitch /home/django-pbx/freeswitch /usr/share/freeswitch /var/run/freeswitch (code=exited, status=1/FAILURE)

See "systemctl status freeswitch.service" and "journalctl -xeu freeswitch.service" for details. root@djangopbx:/usr/src/djangopbx-install# journalctl -xeu freeswitch.service No journal files were found.

wardmundy commented 7 months ago

Feb 02 22:01:26 djangopbx.4voip.org chown[786]: /bin/chown: cannot access '/var/log/freeswitch': No such file or directory Feb 02 22:01:26 djangopbx.4voip.org systemd[1]: freeswitch.service: Control process exited, code=exited, status=1/FAILURE Feb 02 22:01:26 djangopbx.4voip.org systemd[1]: freeswitch.service: Failed with result 'exit-code'. Feb 02 22:01:26 djangopbx.4voip.org systemd[1]: Failed to start freeswitch.service - freeswitch. Feb 02 22:01:27 djangopbx.4voip.org systemd[1]: freeswitch.service: Scheduled restart job, restart counter is at 5. Feb 02 22:01:27 djangopbx.4voip.org systemd[1]: Stopped freeswitch.service - freeswitch. Feb 02 22:01:27 djangopbx.4voip.org systemd[1]: freeswitch.service: Start request repeated too quickly. Feb 02 22:01:27 djangopbx.4voip.org systemd[1]: freeswitch.service: Failed with result 'exit-code'. Feb 02 22:01:27 djangopbx.4voip.org systemd[1]: Failed to start freeswitch.service - freeswitch.

wardmundy commented 7 months ago

After creating /var/log/freeswitch file and chown'd to django-pbx:django-pbx, I get this on restart attempt:

freeswitch.service - freeswitch Loaded: loaded (/lib/systemd/system/freeswitch.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Fri 2024-02-02 22:07:10 UTC; 16s ago Process: 883 ExecStartPre=/bin/mkdir -p /var/run/freeswitch/ (code=exited, status=0/SUCCESS) Process: 884 ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/lib/freeswitch /var/log/freeswitch /home/django-pbx/freeswitch /usr/share/freeswitch /var/run/freeswitch (code=exited, status=0/SUCCESS) Process: 885 ExecStart=/usr/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait -conf /home/django-pbx/freeswitch -log /var/log/freeswitch -db /var/lib/freeswitch/db -run /var/run/freeswitch ${DAEMON_OPTS} (code=exited, status=203/EXEC) CPU: 5ms

chris021 commented 7 months ago

Did you install from src or package?

AdrianFretwell commented 7 months ago

This is interesting because /var/log/freeswitch is normally created by freeswitch itself not the install script. I will research this...

wardmundy commented 7 months ago

Install from pkg.

AdrianFretwell commented 7 months ago

Will you post your freeswitch log please.

wardmundy commented 7 months ago

There was no freeswitch log when the install completed.

Feb 02 22:01:26 djangopbx.4voip.org chown[786]: /bin/chown: cannot access '/var/log/freeswitch': No such file or directory

AdrianFretwell commented 7 months ago

Ok, so your last error (after you manually created /var/log/freeswitch) has an exit status of 203. The error message (code=exited, status=203/EXEC) is often seen when the script itself or its interpreter cannot be executed. This leads me to believe that FreeSWITCH may not have installed properly.

Can you check if /usr/bin/freeswitch exists. Please also share the output of 'which freeswitch'.

If /usr/bin/freeswitch does not exist or the output of the which command returns nothing, then freeswitch is not installed.

You said you installed from pkg, did you also enter your Signalwire Token in the installer configuration? If so is it valid?

wardmundy commented 7 months ago

Token is valid. Watched the install and it looked OK, but /usr/bin/freeswitch is not there. I'm wondering if this was an out-of-ram issue. This was a small VPS. I will try on a more robust platform and report back.

AdrianFretwell commented 7 months ago

It may be possible that the freeswitch binary is being installed somewhere else in your environment, that is why the which command can be very helpful.

You can also check out the key installation directories with: dpkg -S freeswitch | grep freeswitch:

wardmundy commented 7 months ago

Well, it turns out FreeSwitch didn't like the SignalWire token. No idea why since it was brand new. I reinstalled from source, and all is well. Thanks for the hand-holding.