NO SUCCESS setting up with REMOTE-MYSQL.YML

hello members, i have been playing around with all options for xibo docker install. I want to test xibo install using an external database, a MARIADB which on the same server. but i get an error no matter what i do…below is the error:

Attaching to anansemedia_cms-web_1, anansemedia_cms-xmr_1, anansemedia_cms-quickchart_1
cms-quickchart_1 | yarn run v1.19.1
cms-quickchart_1 | $ node index.js
cms-quickchart_1 | 2020-03-30T05:10:57.819Z - info: Loaded 1 keys from API keyfile
cms-quickchart_1 | 2020-03-30T05:10:58.002Z - info: Telemetry is enabled
cms-quickchart_1 | Mon, 30 Mar 2020 05:10:58 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-quickchart_1 | 2020-03-30T05:10:58.619Z - info: Setting request timeout: 1000 ms
cms-quickchart_1 | 2020-03-30T05:10:58.619Z - info: NODE_ENV: production
cms-quickchart_1 | 2020-03-30T05:10:58.619Z - info: Listening on port 3400
cms-web_1 | Waiting for MySQL to start - max 300 seconds

waiting for MySQL to start…when i check in the database, its empty. WITHOUT USING REMOTE-MYSQL.YML I can run xibo 2.3.2 without any issues. i am just curious to see how using another database aside from the default database that installs with xibo as you launch the docker yml.

i replaced the default config.env file with that of config.env.template-remote-mysql (renamed it config.env and made necessary changes) while cms_remote-mysql.yml also exist, i bring up the containers with sudo docker-compose -f cms_remote-mysql.yml up -d. containers start fine, but then i am not able to start xibo and login page…

what am i doing wrong?

Hi aponkye,

Can you confirm what command you are running when you get this message?

Many Thanks.

The Docker containers running the CMS need to be able to connect to your MySQL server, so you’ll need to ensure you’ve enabled your MySQL server to accept connections over the network (and then firewalled that off appropriately), and then created a user and database for Xibo to use.

You then put those details in config.env. Note you can’t use “localhost” as the server name, it will need to be the IP address of a non-loopback interface (eg your LAN interface) and you’ll need to ensure your firewall allows access to that.

There’s really no benefit to using a local MySQL server separate to the one Xibo runs itself. We provide remote MySQL for people who want to use a separate server to run MySQL on really.

sudo docker-compose logs
Attaching to anansemedia_cms-web_1, anansemedia_cms-xmr_1, anansemedia_cms-quickchart_1
cms-quickchart_1 | yarn run v1.19.1
cms-quickchart_1 | $ node index.js
cms-quickchart_1 | 2020-03-30T07:59:03.479Z - info: Loaded 1 keys from API keyfile
cms-quickchart_1 | 2020-03-30T07:59:03.656Z - info: Telemetry is enabled
cms-web_1 | Waiting for MySQL to start - max 300 seconds
cms-quickchart_1 | Mon, 30 Mar 2020 07:59:04 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: Setting request timeout: 1000 ms
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: NODE_ENV: production
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: Listening on port 3400
cms-quickchart_1 | 2020-03-31T03:55:13.449Z - info: Received kill signal, shutting down gracefully.
cms-quickchart_1 | 2020-03-31T03:55:13.453Z - info: Closed out remaining connections.
cms-quickchart_1 | yarn run v1.19.1
cms-quickchart_1 | $ node index.js
cms-quickchart_1 | 2020-03-31T03:59:09.308Z - info: Loaded 1 keys from API keyfile
cms-quickchart_1 | 2020-03-31T03:59:10.237Z - info: Telemetry is enabled
cms-quickchart_1 | Tue, 31 Mar 2020 03:59:11 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-quickchart_1 | 2020-03-31T03:59:12.023Z - info: Setting request timeout: 1000 ms
cms-quickchart_1 | 2020-03-31T03:59:12.024Z - info: NODE_ENV: production
cms-quickchart_1 | 2020-03-31T03:59:12.024Z - info: Listening on port 3400
ananse@ghanamedia:/opt/anansemedia$

sudo docker-compose logs
Attaching to anansemedia_cms-web_1, anansemedia_cms-xmr_1, anansemedia_cms-quickchart_1
cms-quickchart_1 | yarn run v1.19.1
cms-quickchart_1 | $ node index.js
cms-quickchart_1 | 2020-03-30T07:59:03.479Z - info: Loaded 1 keys from API keyfile
cms-quickchart_1 | 2020-03-30T07:59:03.656Z - info: Telemetry is enabled
cms-quickchart_1 | Mon, 30 Mar 2020 07:59:04 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: Setting request timeout: 1000 ms
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: NODE_ENV: production
cms-quickchart_1 | 2020-03-30T07:59:04.257Z - info: Listening on port 3400
cms-quickchart_1 | 2020-03-31T03:55:13.449Z - info: Received kill signal, shutting down gracefully.
cms-quickchart_1 | 2020-03-31T03:55:13.453Z - info: Closed out remaining connections.
cms-quickchart_1 | yarn run v1.19.1
cms-quickchart_1 | $ node index.js
cms-quickchart_1 | 2020-03-31T03:59:09.308Z - info: Loaded 1 keys from API keyfile
cms-quickchart_1 | 2020-03-31T03:59:10.237Z - info: Telemetry is enabled
cms-quickchart_1 | Tue, 31 Mar 2020 03:59:11 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-quickchart_1 | 2020-03-31T03:59:12.023Z - info: Setting request timeout: 1000 ms
cms-quickchart_1 | 2020-03-31T03:59:12.024Z - info: NODE_ENV: production
cms-quickchart_1 | 2020-03-31T03:59:12.024Z - info: Listening on port 3400
cms-web_1 | Waiting for MySQL to start - max 300 seconds

this is how far i can get…

that is the output fron compose logs…i still cant launch xibo

MySQL started
cms-web_1 | Updating settings.php
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | New install
cms-web_1 | Provisioning Database
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-web_1 |
cms-web_1 | using config file .varwwwcmsphinx.php
cms-web_1 | using config parser php
cms-web_1 | using migration paths
cms-web_1 | - /var/www/cms/db/migrations
cms-web_1 | warning no environment specified, defaulting to: production
cms-web_1 | using adapter mysql
cms-web_1 | using database media
cms-web_1 |
cms-web_1 | In MysqlAdapter.php line 115:
cms-web_1 |
cms-web_1 | There was a problem connecting to the database: SQLSTATE[HY000] [2002] Conn
cms-web_1 | ection refused
cms-web_1 |
cms-web_1 |
cms-web_1 | migrate [-c|–configuration CONFIGURATION] [-p|–parser PARSER] [-e|–environment ENVIRONMENT] [-t|–target TARGET] [-d|–date DATE] [-x|–dry-run]
cms-web_1 |
cms-web_1 | Configuring Database Settings
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | Setting up Maintenance
cms-web_1 | Protected Maintenance
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | Importing ca-certs
cms-web_1 | cp: can’t stat ‘/var/www/cms/ca-certs/.pem’: No such file or directory
cms-web_1 | cp: can’t stat '/var/www/cms/ca-certs/
.crt’: No such file or directory
cms-web_1 | WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
cms-web_1 | Setting up Quickchart
cms-web_1 | ERROR 2002 (HY000): Can’t connect to MySQL server on ‘135.23.77.250’ (115)
cms-web_1 | Configuring Maintenance
cms-web_1 | Removing web/install/index.php from production container
cms-web_1 | Starting cron
cms-web_1 | Starting webserver
cms-web_1 | AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 172.24.0.3. Set the ‘ServerName’ directive globally to suppress this message

Your MySQL server isn’t accepting connections over the network. You need to fix that for it to work.

docker-compose -f cms_remote-mysql.yml up -d …I am guessing this installs works best with older MYSQL…I am using the lates version of MARIADB which seem not allow the us passwords.

I suspect that. but i shifted gears from that. I am now following the steps to us local nginx to redirect traffic to xibo in docker. my nginx is not a dockerized nginx. i have access to xibo unti i put 127.0.0.1 infront of my public port e.i 127.0.0.1:1001:80 in the custom port yml file, I also tried it using docker-compose yml. so far i am learning a lot of reason as to why most xibo users cant get xibo to working using docker. once i get through with being able to launch xibo using remote MYSQL and also none DOCKERIZED NGINX server host to proxy / redirect traffic to docker container…i will write my instructions to help even the most computer illiterate to be able to setup xibo under 30 minutes. i already have an instruction but this was during 1.8.1 xibo…tested same instructions on my guinea pig server over and over and each time, xibo worked right on. …my instructions will be for NGINX and not apache .

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.