Closed asn25 closed 4 years ago
What's the output of docker logs ftgo-application_mysql_1
?
The container has failed - often this due to a lack of diskspace in the Docker VM
I'll try to add hdd space and retest, thank you.
$ docker logs ftgo-application_mysql_1 Initializing database 2019-12-23T17:00:03.964484Z 0 [Warning] InnoDB: New log files created, LSN=45790 2019-12-23T17:00:04.008154Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2019-12-23T17:00:04.016005Z 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: a9ffb2c4-25a5-11ea-9790-0242ac170002. 2019-12-23T17:00:04.016780Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2019-12-23T17:00:04.018173Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2019-12-23T17:00:04.533195Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:04.533254Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:04.533289Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:04.533316Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:04.533368Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. Database initialized MySQL init process in progress... 2019-12-23T17:00:06.185659Z 0 [Note] mysqld (mysqld 5.7.13-log) starting as process 50 ... 2019-12-23T17:00:06.190655Z 0 [Note] InnoDB: PUNCH HOLE support available 2019-12-23T17:00:06.190739Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2019-12-23T17:00:06.190753Z 0 [Note] InnoDB: Uses event mutexes 2019-12-23T17:00:06.190761Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2019-12-23T17:00:06.190769Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8 2019-12-23T17:00:06.190776Z 0 [Note] InnoDB: Using Linux native AIO 2019-12-23T17:00:06.191248Z 0 [Note] InnoDB: Number of pools: 1 2019-12-23T17:00:06.191610Z 0 [Note] InnoDB: Using CPU crc32 instructions 2019-12-23T17:00:06.193851Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2019-12-23T17:00:06.206311Z 0 [Note] InnoDB: Completed initialization of buffer pool 2019-12-23T17:00:06.209444Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2019-12-23T17:00:06.222288Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2019-12-23T17:00:06.232558Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2019-12-23T17:00:06.232908Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-12-23T17:00:06.253854Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-12-23T17:00:06.255132Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2019-12-23T17:00:06.255164Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2019-12-23T17:00:06.255879Z 0 [Note] InnoDB: Waiting for purge to start 2019-12-23T17:00:06.307003Z 0 [Note] InnoDB: 5.7.13 started; log sequence number 2525487 2019-12-23T17:00:06.307522Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2019-12-23T17:00:06.308067Z 0 [Note] Plugin 'FEDERATED' is disabled. 2019-12-23T17:00:06.314832Z 0 [Note] InnoDB: Buffer pool(s) load completed at 191223 17:00:06 2019-12-23T17:00:06.317377Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2019-12-23T17:00:06.321979Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:06.322050Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:06.322110Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:06.322151Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:06.326334Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:06.352115Z 0 [Note] Event Scheduler: Loaded 0 events 2019-12-23T17:00:06.353195Z 0 [Note] mysqld: ready for connections. Version: '5.7.13-log' 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. 2019-12-23T17:00:10.302128Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:10.302178Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:10.302352Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. mysql: [Warning] Using a password on the command line interface can be insecure. mysql: [Warning] Using a password on the command line interface can be insecure. 2019-12-23T17:00:10.316270Z 6 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:10.316370Z 6 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. 2019-12-23T17:00:10.316892Z 6 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/3.common-schema.sql mysql: [Warning] Using a password on the command line interface can be insecure.
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/4.compile-schema-per-service.sh /docker-entrypoint-initdb.d/4.compile-schema-per-service.sh: line 2: $'\r': command not found
Here are screenshots of hdds settings in Docker machine: https://imgur.com/a/oXoG1SO
Main disk actual size is 12G, virtual size is 19G, dynamically allocated. In Oracle VM Virtual Box Manager there is no option to add space to hdd. Maybe it's possible from CLI interface, need to check...
There are no errors about lack of disk space.
The very last line of the mysql log shows the error /docker-entrypoint-initdb.d/4.compile-schema-per-service.sh: line 2: $'\r': command not found
This is very strange. Some Linux/Windows line termination problem.
What is even stranger is that this previously worked for you.
Have you edited the file and added carriage returns?
What does git status
say?
Before that I was working on a local copy, that was unzipped from sources zip-archieve. And there were no problems with MySQL in the run-app mode (manual docker compose up).
These tests I'm doing on a new copy of project, that is pulled from Git by IDEA. Here is a git status:
==========================
$ git status On branch master Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add
modified: ftgo-end-to-end-tests/src/test/java/net/chrisrichardson/ftgo/endtoendtests/EndToEndTests.java
modified: ftgo-order-history-service/build.gradle
Untracked files:
(use "git add
_odrhist_integr_test.txt
_ord_serv_itegr_tests_run.txt
no changes added to commit (use "git add" and/or "git commit -a")
==========================================
I didn't modify compile-schema-per-service.sh.
I checked it in Notepad+ for special characters: https://imgur.com/a/ULZL5Qm
It seems that this corruption was done by Git plugin for IDEA. Because I just downloaded your latest sources as zip and there are Linux LFs in the file - so all is OK.
Thanks for pointing this out. I'll check why Git for IDEA corrupts LFs to LFCRs and retest it on correct sources.
The problem was caused by "LF->CRLF substitution" in sources that is relates not to IDEA or plugin, but to Git itself. Here is the solution that worked for me: https://stackoverflow.com/a/33424884
Test is passed OK on correct sources. Could be closed.
The only thing is that container "ftgo-application_mysql_1" remains running after test. Probably shoud be stopped - ?
Hi,
I'm trying to run integration tests with gradle from root project folder. Start conditions - docker-machine is started, all containers are deleted. Command:
$ ./gradlew :ftgo-order-service:cleanTest :ftgo-order-service:integrationTest --info
Loops on connect attempt to mysql_1, but mysql_1 container is stopped:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ac7d5cb5cf92 ftgo-application_mysql "docker-entrypoint.s" 3 minutes ago Exited (127) 3 minutes ago ftgo-application_mysql_1
Output:
$ ./gradlew :ftgo-order-service:cleanTest :ftgo-order-service:integrationTest --info
Starting 3rd build in daemon [uptime: 5 mins 5.101 secs, performance: 100%, no major garbage collections] Using 8 worker leases. Starting Build