I’m trying to install Freepbx with Asterisk 14 into a docker container based on CentOS 6, running on a Synology RS812+ box with DSM 6 and a pre-existing mariadb. I’ve got DAHDI and all the other prerequisites compiling and installing.
I install Asterisk and:
chown -R $ASTERISKUSER. -v /var/run/asterisk
chown -R $ASTERISKUSER. -v /etc/asterisk
chown -R $ASTERISKUSER. -v /var/{lib,log,spool}/asterisk
chown -R $ASTERISKUSER. -v /usr/lib64/asterisk
chown -R $ASTERISKUSER. -v /var/www/
chown -R $ASTERISKUSER. -v /var/www/*
However, when I get to FreePBX:
./install -n -v --dbuser=asterisk
I get the error:
Error!
Could not determine Asterisk version (got: Unable to access the running directory (Permission denied). Changing to ‘/’ for compatibility.). Please report this.
And then:
…
Finished setting permissions
Generating default configurations…
Reloading FreePBX
Error(s) have occured, the following is the retrieve_conf output:
exit: 1
Exception: Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting in file /var/lib/asterisk/bin/retrieve_conf on line 11
Stack trace:
- Exception->() /var/lib/asterisk/bin/retrieve_conf:11
And finally, I:
fwconsole restart
And get:
Running FreePBX shutdown…
[Whoops\Exception\ErrorException]
fclose(): 61 is not a valid stream resource
restart [-i|–immediate] [args1] … [argsN]
SELinux is disabled, and iptables is set to allow all incoming and outgoing connections by default and has no other settings assigned.
The docker container is running as --net=host --pid=host --privileged
How can I overcome this problem?