Error When Browsing to Local Host First Time

Hello,
Earlier today I downloaded a copy of the Xibo CMS and Docker. I extracted the Xibo archive to C:\xibo. Next I installed Docker and restarted at the installer’s request. Next I looked at the config.env and added a random character string for the MySQL password. Lastly I ran the PowerShell command C:\xibo> docker-compose up -d. Once that finished I tried to browse to http://localhost and got the following message: Fatal Error - sorry this shouldn’t happen. SQLSTATE[HY000] [1045] Access denied for user ‘cms’@‘172.18.0.5’ (using password: YES).

Do I need to install MySQL? Did I miss a step?

Thanks!

Did you take a copy of it and rename it config.env ?

No you don’t need to because Docker will start up a MySQL container for you, which I think it probably did given you had access denied rather than unable to connect.

If you run docker-compose logs it should give you some information about what each container is doing which might help.

Hi Dan,
Thanks for getting back to me. I did make a copy and edited the copy of the config.env file. As for the MySQL, I did not think I needed to install, but I thought I would check. I am currently running docker commands via Powershell, not Powershell ISE; however I did see somewhere that I should run the CLI from the Docker Toolbox. Unfortunately I am having issues getting the Docker Tool box installed and running. Looking at the log as you suggested, I do not outright see any issues save for, “ERROR 1045 (28000): Access denied for user ‘cms’@‘172.19.0.5’ (using password: YES)”. Shall I post the full log to see if you can spot something else?

So at face value this error just means that the MYSQL_PASSWORD you’ve put in config.env is not the same as the one that got configured when MySQL first started.

This really ought not to be possible, given the MySQL container uses the same config.env file when it starts. :man_shrugging:

All I can suggest is to delete the shared/ folder or rename it and try the process again. If you want you could capture the whole output of that and pop it on here and I will look.

Ok here’s my log:

    PS C:\xibo> docker-compose logs
Attaching to xibo_cms-web_1, xibo_cms-xmr_1, xibo_cms-db_1, xibo_cms-quickchart_1
cms-quickchart_1  | yarn run v1.19.1
cms-quickchart_1  | $ node index.js
cms-quickchart_1  | 2020-02-08T00:43:32.444Z - info: Loaded 1 keys from API keyfile
cms-db_1          | 2020-02-08 00:43:31+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.6.47-1debian9 started.
cms-quickchart_1  | 2020-02-08T00:43:32.591Z - info: Telemetry is enabled
cms-db_1          | 2020-02-08 00:43:32+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
cms-quickchart_1  | Sat, 08 Feb 2020 00:43:32 GMT body-parser deprecated undefined extended: provide extended option at index.js:33:17
cms-db_1          | 2020-02-08 00:43:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.6.47-1debian9 started.
cms-web_1         | Waiting for MySQL to start - max 300 seconds
cms-quickchart_1  | 2020-02-08T00:43:33.002Z - info: Setting request timeout: 1000 ms
cms-db_1          | 2020-02-08 00:43:32 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-web_1         | MySQL started
cms-quickchart_1  | 2020-02-08T00:43:33.002Z - info: NODE_ENV: production
cms-web_1         | Updating settings.php
cms-db_1          | 2020-02-08 00:43:32 0 [Note] mysqld (mysqld 5.6.47) starting as process 1 ...
cms-quickchart_1  | 2020-02-08T00:43:33.002Z - info: Listening on port 3400
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-db_1          | 2020-02-08 00:43:32 1 [Note] Plugin 'FEDERATED' is disabled.
cms-web_1         | New install
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
cms-web_1         | Provisioning Database
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: The InnoDB memory heap is disabled
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
cms-web_1         | Phinx by CakePHP - https://phinx.org. 0.9.2
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Memory barrier is not used
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Compressed tables use zlib 1.2.11
cms-web_1         | using config file .varwwwcmsphinx.php
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Using Linux native AIO
cms-web_1         | using config parser php
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Using CPU crc32 instructions
cms-web_1         | using migration paths
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
cms-web_1         |  - /var/www/cms/db/migrations
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Completed initialization of buffer pool
cms-web_1         | warning no environment specified, defaulting to: production
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Highest supported file format is Barracuda.
cms-web_1         | using adapter mysql
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: 128 rollback segment(s) are active.
cms-web_1         | using database cms
cms-db_1          | 2020-02-08 00:43:32 1 [Note] InnoDB: Waiting for purge to start
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:33 1 [Note] InnoDB: 5.6.47 started; log sequence number 1626057
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:33 1 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
cms-web_1         |   [InvalidArgumentException]
cms-db_1          | 2020-02-08 00:43:33 1 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
cms-web_1         |   There was a problem connecting to the database: SQLSTATE[HY000] [1045] Acce
cms-db_1          | 2020-02-08 00:43:33 1 [Note] Server hostname (bind-address): '*'; port: 3306
cms-web_1         |   ss denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-db_1          | 2020-02-08 00:43:33 1 [Note] IPv6 is available.
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:33 1 [Note]   - '::' resolves to '::';
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:33 1 [Note] Server socket created on IP: '::'.
cms-web_1         | migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE] [-x|--dry-run]
cms-db_1          | 2020-02-08 00:43:33 1 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
cms-web_1         |
cms-db_1          | 2020-02-08 00:43:33 1 [Warning] 'proxies_priv' entry '@ root@b563f926f14f' ignored in --skip-name-resolve mode.
cms-web_1         | Configuring Database Settings
cms-db_1          | 2020-02-08 00:43:33 1 [Note] Event Scheduler: Loaded 0 events
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-db_1          | 2020-02-08 00:43:33 1 [Note] mysqld: ready for connections.
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-db_1          | Version: '5.6.47'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-web_1         | Setting up Maintenance
cms-web_1         | Protected Maintenance
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
cms-web_1         | ERROR 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
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 1045 (28000): Access denied for user 'cms'@'172.19.0.5' (using password: YES)
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.19.0.5. Set the 'ServerName' directive globally to suppress this message

I will try and delete the shared folder, but I’m not exactly sure how to do so. From what I can tell, I need to down Xibo, quit Docker then delete the file in C:\ProgramData\DockerDesktop\vm-data. I next need to Up Xibo again and it restarts the whole process.

In there you should have a folder created called shared ?

I’ve gone beyond my expertise i’m afraid, I’ve not used docker on windows for a long time. All I can tell you for certain is that those passwords don’t line up.

Maybe if @alex (or anyone else for that matter) gets some time they can assist

That did it. I basically started fresh and emptied that folder and re-extracted the Xibo archive. Thanks for holding my hand! Now on to the next leg of my Xibo journy.

1 Like

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