-
Notifications
You must be signed in to change notification settings - Fork 236
Cant install since db_check not found or Can't seem to locate /usr/sbin/fwconsole. #120
Comments
Let me rebuild the image, it seems to be pulling from the wrong base. |
Hi, I took a look at it and there were a few issues, The function you found throwing errors was indeed wrong and trying to install before the DB was ready, however the real underlying issue was FreePBX changing their source code in the install routines and I missed it. This is referenced here #121 and has been solved with latest push |
Hi. PS: Calling as |
Thanks, to look into, something is off. It shouldn't be starting Mongo and MariaDB inside the container. |
This comment has been minimized.
This comment has been minimized.
After restart, didnt started. Can you fix this? Install (2020-02-11 15:55 GMT+3) After Restart:(I guess) **** ERROR - All scripts have not initialized properly - All services are now halted **** /etc/cont-init.d: /tmp/state: [cont-init.d] 99-container: exited 1. |
I cant for the life of me recreate this. What's confusing is that your system is taking in random variables to enable MongoDB which in the command line copy you've sent clearly do not activate it. I'm also wondering at the errors you are getting displayed regarding your /etc folder (/etc/msmtprc) which I cannot get happening on my system. Probably worth while understanding what type of host you are using, the filesystem for storage, and Docker version. Hows about if you used the example docker-compose file and tweaked it for your purposes as well? |
I am also having the same problem, trying the docker run command in #120 doesn't work for me.
I should say I am using the |
Can you confirm you are starting fresh (ie no external volumes ie data, db, dbbackup logs)? I can add some additional checks if a failed install occurs by bad downloads if this is not the case. |
This comment has been minimized.
This comment has been minimized.
OK thanks for the confirmation. Before I dive into this, can you set DEBUG_MODE=TRUE as an environment variable and send me privately the logs? My email address is in the Changelog. (dave at..) |
I've also tried with a fresh environment and am getting the same error: |
Sorry for the noise. Turns out my issue was that the database was not created correctly when I started the mariadb container, so FreePBX couldn't connect to it (Access denied) and failed from there. Correctly creating the DB fixed the issue |
You are missing the point man. After a few changes made since the issue created, the code successfuly installs freepbx. I mean At First installation DB created, we set all the settings. But after reboot, all the settings gone and logs say initial installation starting... |
So an update....if I use embedded DB setting then the installation runs absolutely fine. When I set embedded DB to false and turn on the debug log. There is a SQL error that seems to be the cause of the problem with using an external DB:
Specifically:
|
Are you able to go into the container and try |
Thanks, I found the issue through trying to connect to the DB from inside the container as you suggested. It appears the command does not specify the DB port, my container is not using the default MariaDB SQL port because I have 10 other DB instances running. Your docker container allows a DB port environment variable to be set but it appears the command being invoked here does not make use of it. |
I just took a quick look at the Freepbx install routines and they do not include an ability to use a different port. This is occurring in this file: |
Hmm it appears if you don't want to use default values provided by freepbx you can set values in CDR DB conf file. Would that be a work around? EDIT: Nvm, I ended up swapping ports with my other DB container, since the application was friendly to changes and it was easy. Maybe this caveat should be documented for anyone else that may potentially run into this error... |
Sadly not. That's actually the big hack that I am doing in this image. It's originally intended to be two databases - quite odd that the CDRDB is referencing a port yet the main freepbx database does not support it. I could have sworn 2 years ago we were using this with different port numbers, but I may be getting confused with another one.I suppose what you might be able to do is setup a temporary copy with a db container on the same host, export it and reimport it into your remote server then by changing the environment variables. It's hackish, but would probably work as I write the DB Connection strings on each container start - It's just the install script which is our issue here. |
Seems that someone has submitted a PR to Freepbx for custom DB Ports - Let's see if they accept it. FreePBX/framework#72 |
Thanks for all your hard work! I hope that PR gets merged. |
Good step but Will this fix this issue about no data after restart...
|
I made a fresh install today. Here is my log with DEBUG
**** ERROR - Some initialization scripts haven't completed - All services are now halted **** **** This could have happened for a variety of reasons. Please make sure you have followed the README **** **** If you feel that you have encountered a bug, please submit an issue on the revision control system **** [cont-init.d] 99-container: exited 1. |
Send me the whole thing privately to my email please - My email is in the changelog. |
Any Updates? I'm having the same issue with :14 and :15 |
Send me your logs with DEBUG_MODE=TRUE to my private email and I will analyze. |
The install log or the startup log with debug enabled? @tiredofit |
Both if possible, also include any startup commands or your docker compose and Host Operating system info. |
You got my message @tiredofit ? |
Yes I did see it this morning - replied earlier on today privately.If you didn't receive let me know and I'll post here the full contents. Takeaway though is for the time being is try to |
New version |
Here is the log:
[....] Starting authentication failure monitor: fail2banWARNING 'failregex' not defined in 'Definition'. Using default one: ''
WARNING 'failregex' not defined in 'Definition'. Using default one: ''
. ok
[cont-init.d] 05-fail2ban: exited 0.
[cont-init.d] 08-mongodb: executing...
[cont-init.d] 08-mongodb: exited 0.
[cont-init.d] 09-mariadb: executing...
[cont-init.d] 09-mariadb: exited 0.
[cont-init.d] 10-freepbx: executing...
### /var/run/s6/etc/cont-init.d/10-freepbx: line 30: db_check: command not found
[NOTICE] ** [freepbx] Creating Default Configuration Files
[NOTICE] ** [freepbx] Setting File Permissions
[INFO] ** [freepbx] New Install Detected - Please wait while we fetch FreePBX - Will take 3 to 30 minutes!
[NOTICE] ** [freepbx] Starting Asterisk 16.7.0 for the first time
[NOTICE] ** [freepbx] Installing FreePBX source code
[ERROR] ** [freepbx] Can't seem to locate /usr/sbin/fwconsole.. Exitting
[cont-init.d] 10-freepbx: exited 1.
[cont-init.d] 99-container: executing...
**** ERROR - All scripts have not initialized properly - All services are now halted ****
**** - Please enter the container find out why the missing *-init state file hasn't been written ****
/etc/cont-init.d:
00-timezone 01-permissions 02-zabbix 03-cron 04-smtp 05-fail2ban
08-mongodb 09-mariadb 10-freepbx
/tmp/state:
/tmp/state/00-timezone-init /tmp/state/01-permissions-init
/tmp/state/02-zabbix-init /tmp/state/03-cron-init
/tmp/state/04-smtp-init /tmp/state/05-fail2ban-init
/tmp/state/08-mongodb-init /tmp/state/09-mariadb-init
The text was updated successfully, but these errors were encountered: