|Posted: Thu Feb 25, 2016 4:31 pm Post subject: [Freeswitch-users] Getting 503 when starting automatically
|On Thu, 2016-02-25 at 21:26:09 +0300, Bote wrote:
|A 503 error, huh? Weird. Check for permissions problems.
|My guess is that you are building as "root" so when you first ran it
manually all the databases and log files were created with root as owner.
But when it boots systemd is starting it as root and then dropping
privileges to the freeswitch user as it should. After dropping privileges it
can't access its config files or open ports necessary to function.
Thanks for the suggestion. I compiled as a normal user using Arch Linux's makepkg tool and installed using its pacman tool, so I don't think that's the problem. I'm also letting system start freeswitch.service with its default user setting (as root).
The weirdest thing is that it does start and connect fine using systemd when make a request after boot to have systemd start it (systemctl start freeswitch or systemctl restart freeswitch). In both cases, systemd is controlling process identity, so I don't think it's a permissions issue. My best guess is there's some kind of race condition at boot and if FreeSWITCH starts too early, it gets a cached but invalid handle of some sort that doesn't allow communicating in or out. This is just a guess though.
Professional FreeSWITCH Consulting Services:
Official FreeSWITCH Sites
FreeSWITCH-users mailing list