tiredofit / docker-freepbx

Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
MIT License
516 stars 236 forks source link

Stable version? #151

Open ptruman opened 4 years ago

ptruman commented 4 years ago

Hi - I've just tried your image and rusxakep/freepbx (which seems to be based off yours?)

I am running under portainer, setting up ENV to use mariadb, but am getting several issues. The furthest I get is getting the installer to run on a (complete) new volume, and then after I set the UI password, I get told there is an error and "/var/log/asterisk" is not writable.

If I enter the container and create that folder, and chown -R asterisk:asterisk /var/log/asterisk - then I get a bit further, but immediately arrive at a "Fallback" page, as "Dashboard" is not enabled.

If I hit "Apply Config" (the only option available) then I get told /usr/sbin/fwconsole is not available.

Tracking back through the install logs I can see this: Done, bin is: /var/lib/asterisk/bin, sbin is: /usr/sbin, Symlinking /var/lib/asterisk/bin/fwconsole to /usr/sbin/fwconsole ...Done, Symlinking /var/lib/asterisk/bin/amportal to /usr/sbin/amportal ...Done, Finishing up directory processes...Done!, Running variable replacement...Done, Creating missing #include files...Done, Setting up Asterisk Manager Connection...Done, Running through upgrades..., Checking for upgrades.., No further upgrades necessary, Finished upgrades, Setting FreePBX version to 15.0.16.56...Done, Writing out /etc/amportal.conf...Done, Writing out /etc/freepbx.conf...Done, Chowning directories..., 8402/8402 [============================] 100%, In Process.php line 239:, , The command "/usr/sbin/fwconsole chown" failed. , , Exit Code: 126(Invoked command cannot execute) , , Working directory: /usr/src/freepbx , , Output: , ================ , , , Error Output: , ================ , sh: 1: /usr/sbin/fwconsole: Permission denied ,

Checking in the container (via bash) I can see /usr/sbin/fwconsole symlinked to /var/lib/asterisk/bin, showing as :

-rwxr-xr-x 1 asterisk asterisk 5964 Jun 20 20:18 fwconsole

...but it won't run as root or asterisk:

root@freepbx:/var/lib/asterisk/bin# ./fwconsole
bash: ./fwconsole: Permission denied
root@freepbx:/var/lib/asterisk/bin# su asterisk
asterisk@freepbx:/var/lib/asterisk/bin$ ./fwconsole
bash: ./fwconsole: Permission denied

Any clues?

Then there are other errors around npm etc:

+ '[' true = TRUE ']',
+ '[' true = true ']',
+ fwconsole ma downloadinstall certman userman pm2,
/assets/functions/00-container: line 528: /usr/sbin/fwconsole: Permission denied,
+ silent fwconsole setting SHOWLANGUAGE 1,
+ '[' true = TRUE ']',
+ '[' true = true ']',
+ fwconsole setting SHOWLANGUAGE 1,
/assets/functions/00-container: line 528: /usr/sbin/fwconsole: Permission denied,
+ silent fwconsole chown,
+ '[' true = TRUE ']',
+ '[' true = true ']',
+ fwconsole chown,
/assets/functions/00-container: line 528: /usr/sbin/fwconsole: Permission denied,
+ silent fwconsole reload,
+ '[' true = TRUE ']',
+ '[' true = true ']',
+ fwconsole reload,
/assets/functions/00-container: line 528: /usr/sbin/fwconsole: Permission denied,
+ chown -RH asterisk. /home/asterisk/.npm,
chown: cannot access '/home/asterisk/.npm': No such file or directory,
+ print_notice '- ucp',
+ output_off,

Full log attached...

ptruman commented 4 years ago

fpbx.log

ptruman commented 4 years ago

Update : This may be down to a rather embarrassing case of noexec on a partition - I'll check later :)

rusxakep commented 4 years ago

Update : This may be down to a rather embarrassing case of noexec on a partition - I'll check later :)

Yep, check execute bit on /sbin/fwconsole and (for example) /var/lib/asterisk/modules/*. Check 'noexec' flag in /etc/fstab on a host machine

ptruman commented 4 years ago

Yup, I now have the docker instance starting - but I'm now getting:

_2020-06-24 09:20:43] WARNING[22455][C-0000002a]: pbx.c:2927 pbx_extensionhelper: No application 'VoiceMailMain' for extension (from-internal, *97, 120)

I had issues initially with nat (I'm running this under macvlan) which I've solved - SIP trunks work fine with 2 way audio now, but voicemail won't play

Initially the app_voicemail.so module was not loaded, so I've fixed that (and amended res_mwi which was blocking it) - and I can call *98 to be given a "Mailbox?" prompt - but entering the correct password for any, drops immediately, with the above prompt. Is something missing in the user .conf?

Checking my older installation, this image doesn't seem to have made /var/spool/asterisk/voicemail/default - only /var/spool/asterisk/voicemail/device exists - unless those are made once the app inits?

The voicemail admin menu shows I have 2 "Unactivated" mailboxes - (I have 2 extensions set up).

extensions_additional.conf definitely has the voicemailmain context in, which is (almost) identical to my FPBX14 setup (just a differing order on the lines)