What is my problem?
I want to use Docker to deploy the Piwik web analytics tool on my CentOs 7 .
To achieve this, I followed this page , which says that to start the piwik container, the mysql container should work. So, I ran mysql-docker-container as follows:
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest
After that, I ran piwik-docker-container as follows:
docker run --name some-piwik --link some-mysql:mysql -p 6969:9000 -d piwik
According to the site, you can now browse http://localhost:6969to see the Piwik login page.
Unfortunately, using my browser ( lynx), I get the following error message:
[root@localhost /]# lynx localhost:6969
Looking up localhost first
Looking up localhost:6969
Making HTTP connection to localhost:6969
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://localhost:6969/'
Alert!: Unable to access document.
lynx: Can't access startfile
What have I done to debug it?
To debug this behavior, I have listed all running containers:
[root@localhost /]
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
091d56f024f7 piwik "/entrypoint.sh php-f" About an hour ago Up About an hour 0.0.0.0:6969->9000/tcp some-piwik
0d869ba11123 mysql:latest "/entrypoint.sh mysql" About an hour ago Up About an hour 3306/tcp some-mysql
Conclusion . It seems that the ports are mapped and both containers are running.
Looking for another possible hint of the source of my problem, I checked the container logs:
[root@localhost gitlab]# docker logs some-piwik
[22-Mar-2016 14:53:08] NOTICE: fpm is running, pid 1
[22-Mar-2016 14:53:08] NOTICE: ready to handle connections
Conclusion : it looks like the piwik container is ready.
[root@localhost gitlab]
Initializing database
2016-03-22T14:31:30.234530Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-03-22T14:31:30.715480Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-22T14:31:30.803664Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c4f82d8d-f03a-11e5-b9ab-0242ac110003.
2016-03-22T14:31:30.807955Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-03-22T14:31:30.808521Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the
2016-03-22T14:31:32.217007Z 1 [Warning] 'user' entry 'root@localhost' ignored in
2016-03-22T14:31:32.217054Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in
2016-03-22T14:31:32.217074Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in
2016-03-22T14:31:32.217092Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in
2016-03-22T14:31:32.217148Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in
Database initialized
MySQL init process in progress...
2016-03-22T14:31:34.152405Z 0 [Note] mysqld (mysqld 5.7.11) starting as process 45 ...
2016-03-22T14:31:34.157555Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-03-22T14:31:34.157593Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-22T14:31:34.157601Z 0 [Note] InnoDB: Uses event mutexes
2016-03-22T14:31:34.157608Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-03-22T14:31:34.157617Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-03-22T14:31:34.157623Z 0 [Note] InnoDB: Using Linux native AIO
2016-03-22T14:31:34.157969Z 0 [Note] InnoDB: Number of pools: 1
2016-03-22T14:31:34.158117Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-03-22T14:31:34.171400Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-03-22T14:31:34.183239Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-03-22T14:31:34.186125Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-03-22T14:31:34.198794Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-22T14:31:34.212704Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-03-22T14:31:34.212824Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-03-22T14:31:34.543252Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-03-22T14:31:34.544661Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-03-22T14:31:34.544685Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-03-22T14:31:34.545567Z 0 [Note] InnoDB: Waiting for purge to start
2016-03-22T14:31:34.595786Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 2492554
2016-03-22T14:31:34.595979Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-03-22T14:31:34.596205Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-03-22T14:31:34.597885Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160322 14:31:34
2016-03-22T14:31:34.598226Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-03-22T14:31:34.622636Z 0 [Warning] 'user' entry 'root@localhost' ignored in
2016-03-22T14:31:34.622697Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in
2016-03-22T14:31:34.622731Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in
2016-03-22T14:31:34.622762Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in
2016-03-22T14:31:34.624174Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in
2016-03-22T14:31:34.631086Z 0 [Note] Event Scheduler: Loaded 0 events
2016-03-22T14:31:34.631311Z 0 [Note] mysqld: ready for connections.
Version: '5.7.11' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server (GPL)
Warning: Unable to load '/usr/share/zoneinfo/Factory' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/posix/Factory' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/right/Factory' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
2016-03-22T14:31:40.318193Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in
2016-03-22T14:31:40.318230Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in
2016-03-22T14:31:40.318272Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in
/entrypoint.sh: ignoring /docker-entrypoint-initdb.d
Conclusion: It is strange that the mysql-container log does not contain messages related to it. Thus, this suggests that the connection between these containers did not occur, despite the fact that the piwik container was launched with the flag --link some-mysql:mysql.
All this leads to the following questions:
- How can I view the Piwik login page?
- , , ?
- docker-Piwik conatiner?