Testcontainers-java: ContainerLaunchException: Container startup failed

Created on 5 Apr 2019  路  11Comments  路  Source: testcontainers/testcontainers-java

Hi,

I'm trying to start using TestContainers and got a Container startup failed exception.
I'm using windows 10 64 bit, docker version is 18.09.2, build 6247962, testcontainers version 1.11.1.

Code is pretty simple (and was taken from yours examples)

MySQLContainer mysql = (MySQLContainer) new MySQLContainer()              
               .withConfigurationOverride("somepath/mysql_conf_override")
               .withLogConsumer(new Slf4jLogConsumer(logger));
 mysql.start();

When I tried to debug it I checked containers using "docker ps" command and there are several running containers (up to attempts counts). Also, I tried to connect manually to MySQL server using one of these containers and it was successful.

So,

  • container is created
  • mysql server is running
  • I'm able to execute 'Select 1' on it using DBeaver

but still got an exception :(
Do you have any idea what's going wrong?
Also I tried to start MSSQL container with the same results.

Here is a stacktrace

org.testcontainers.containers.ContainerLaunchException: Container startup failed
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:217)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:199)
    at TestContainersMySQL.doSimpleMySQLTest(TestContainersMySQL.java:20)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)
    at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:365)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:330)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:78)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:328)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:65)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:292)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:305)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:412)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:83)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:210)
    ... 27 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:277)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:212)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:76)
    ... 28 more
Caused by: org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:51)
    at org.testcontainers.containers.JdbcDatabaseContainer.waitUntilContainerStarted(JdbcDatabaseContainer.java:129)
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:259)
    ... 30 more
Caused by: java.lang.RuntimeException: Could not get Driver
    at org.testcontainers.containers.JdbcDatabaseContainer.getJdbcDriverInstance(JdbcDatabaseContainer.java:165)
    at org.testcontainers.containers.JdbcDatabaseContainer.createConnection(JdbcDatabaseContainer.java:187)
    at org.testcontainers.containers.JdbcDatabaseContainer.lambda$waitUntilContainerStarted$0(JdbcDatabaseContainer.java:135)
    at org.rnorth.ducttape.unreliables.Unreliables.lambda$retryUntilSuccess$0(Unreliables.java:41)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:332)
    at org.testcontainers.containers.JdbcDatabaseContainer.getJdbcDriverInstance(JdbcDatabaseContainer.java:163)
    ... 7 more

Here is a log of container

Initializing database

2019-04-05T11:23:11.877456Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-04-05T11:23:11.879911Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

2019-04-05T11:23:11.955762Z 0 [Warning] InnoDB: New log files created, LSN=45790

2019-04-05T11:23:12.062578Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2019-04-05T11:23:12.129738Z 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: 328c1b31-5795-11e9-b4e7-0242ac110003.

2019-04-05T11:23:12.133406Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2019-04-05T11:23:12.134093Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.

2019-04-05T11:23:13.553648Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553694Z 1 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553701Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553711Z 1 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553714Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553719Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553810Z 1 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:13.553815Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

Database initialized

Initializing certificates

Generating a 2048 bit RSA private key

...........................+++

......................................+++

unable to write 'random state'

writing new private key to 'ca-key.pem'

-----

Generating a 2048 bit RSA private key

......................+++

.....................................................................................................................+++

unable to write 'random state'

writing new private key to 'server-key.pem'

-----

Generating a 2048 bit RSA private key

................................................+++

........................................................+++

unable to write 'random state'

writing new private key to 'client-key.pem'

-----

Certificates initialized

MySQL init process in progress...

2019-04-05T11:23:16.937179Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-04-05T11:23:16.938427Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 90 ...

2019-04-05T11:23:16.940482Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

2019-04-05T11:23:16.940529Z 0 [Note] InnoDB: PUNCH HOLE support available

2019-04-05T11:23:16.940537Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2019-04-05T11:23:16.940539Z 0 [Note] InnoDB: Uses event mutexes

2019-04-05T11:23:16.940541Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2019-04-05T11:23:16.940544Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2019-04-05T11:23:16.940546Z 0 [Note] InnoDB: Using Linux native AIO

2019-04-05T11:23:16.940697Z 0 [Note] InnoDB: Number of pools: 1

2019-04-05T11:23:16.940810Z 0 [Note] InnoDB: Using CPU crc32 instructions

2019-04-05T11:23:16.942222Z 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

2019-04-05T11:23:16.943051Z 0 [Note] InnoDB: Completed initialization of buffer pool

2019-04-05T11:23:16.943642Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2019-04-05T11:23:16.954884Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2019-04-05T11:23:16.962328Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2019-04-05T11:23:16.962435Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2019-04-05T11:23:16.982276Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2019-04-05T11:23:16.983052Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2019-04-05T11:23:16.983094Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

2019-04-05T11:23:16.983430Z 0 [Note] InnoDB: Waiting for purge to start

2019-04-05T11:23:17.033705Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2589163

2019-04-05T11:23:17.034091Z 0 [Note] Plugin 'FEDERATED' is disabled.

2019-04-05T11:23:17.037419Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2019-04-05T11:23:17.037562Z 0 [Warning] CA certificate ca.pem is self signed.

2019-04-05T11:23:17.037698Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

2019-04-05T11:23:17.038398Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190405 11:23:17

2019-04-05T11:23:17.045742Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2019-04-05T11:23:17.046622Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.046671Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.046679Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.046691Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.046694Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.046700Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.047869Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.047917Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:17.052234Z 0 [Note] Event Scheduler: Loaded 0 events

2019-04-05T11:23:17.052574Z 0 [Note] mysqld: ready for connections.

Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL)

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/zone.tab' as time zone. Skipping it.

Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.

2019-04-05T11:23:20.116176Z 4 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116219Z 4 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116227Z 4 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116241Z 4 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116245Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116251Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116490Z 4 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.116497Z 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.

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-04-05T11:23:20.139752Z 8 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.139848Z 8 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.139882Z 8 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.139926Z 8 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.140107Z 8 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.140159Z 8 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.140639Z 8 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.140683Z 8 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:20.143422Z 0 [Note] Giving 0 client threads a chance to die gracefully

2019-04-05T11:23:20.143461Z 0 [Note] Shutting down slave threads

2019-04-05T11:23:20.143466Z 0 [Note] Forcefully disconnecting 0 remaining clients

2019-04-05T11:23:20.143470Z 0 [Note] Event Scheduler: Purging the queue. 0 events

2019-04-05T11:23:20.144052Z 0 [Note] Binlog end

2019-04-05T11:23:20.144424Z 0 [Note] Shutting down plugin 'ngram'

2019-04-05T11:23:20.144460Z 0 [Note] Shutting down plugin 'partition'

2019-04-05T11:23:20.144466Z 0 [Note] Shutting down plugin 'BLACKHOLE'

2019-04-05T11:23:20.144471Z 0 [Note] Shutting down plugin 'ARCHIVE'

2019-04-05T11:23:20.144475Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'

2019-04-05T11:23:20.144503Z 0 [Note] Shutting down plugin 'MRG_MYISAM'

2019-04-05T11:23:20.144508Z 0 [Note] Shutting down plugin 'MyISAM'

2019-04-05T11:23:20.144517Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'

2019-04-05T11:23:20.144521Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'

2019-04-05T11:23:20.144526Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'

2019-04-05T11:23:20.144531Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'

2019-04-05T11:23:20.144534Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'

2019-04-05T11:23:20.144536Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'

2019-04-05T11:23:20.144537Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'

2019-04-05T11:23:20.144539Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'

2019-04-05T11:23:20.144540Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'

2019-04-05T11:23:20.144542Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'

2019-04-05T11:23:20.144543Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'

2019-04-05T11:23:20.144545Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'

2019-04-05T11:23:20.144546Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'

2019-04-05T11:23:20.144548Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'

2019-04-05T11:23:20.144549Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'

2019-04-05T11:23:20.144551Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'

2019-04-05T11:23:20.144552Z 0 [Note] Shutting down plugin 'INNODB_METRICS'

2019-04-05T11:23:20.144554Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'

2019-04-05T11:23:20.144555Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'

2019-04-05T11:23:20.144557Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'

2019-04-05T11:23:20.144558Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'

2019-04-05T11:23:20.144560Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'

2019-04-05T11:23:20.144561Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'

2019-04-05T11:23:20.144563Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'

2019-04-05T11:23:20.144564Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'

2019-04-05T11:23:20.144565Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'

2019-04-05T11:23:20.144567Z 0 [Note] Shutting down plugin 'INNODB_CMP'

2019-04-05T11:23:20.144568Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'

2019-04-05T11:23:20.144570Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'

2019-04-05T11:23:20.144571Z 0 [Note] Shutting down plugin 'INNODB_TRX'

2019-04-05T11:23:20.144573Z 0 [Note] Shutting down plugin 'InnoDB'

2019-04-05T11:23:20.144615Z 0 [Note] InnoDB: FTS optimize thread exiting.

2019-04-05T11:23:20.145245Z 0 [Note] InnoDB: Starting shutdown...

2019-04-05T11:23:20.245559Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool

2019-04-05T11:23:20.246124Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190405 11:23:20

2019-04-05T11:23:21.868845Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12359588

2019-04-05T11:23:21.878353Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2019-04-05T11:23:21.878461Z 0 [Note] Shutting down plugin 'MEMORY'

2019-04-05T11:23:21.878477Z 0 [Note] Shutting down plugin 'CSV'

2019-04-05T11:23:21.878486Z 0 [Note] Shutting down plugin 'sha256_password'

2019-04-05T11:23:21.878491Z 0 [Note] Shutting down plugin 'mysql_native_password'

2019-04-05T11:23:21.878735Z 0 [Note] Shutting down plugin 'binlog'

2019-04-05T11:23:21.883461Z 0 [Note] mysqld: Shutdown complete

MySQL init process done. Ready for start up.

2019-04-05T11:23:22.160486Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-04-05T11:23:22.161454Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 1 ...

2019-04-05T11:23:22.163246Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

2019-04-05T11:23:22.163319Z 0 [Note] InnoDB: PUNCH HOLE support available

2019-04-05T11:23:22.163326Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2019-04-05T11:23:22.163329Z 0 [Note] InnoDB: Uses event mutexes

2019-04-05T11:23:22.163331Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2019-04-05T11:23:22.163333Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2019-04-05T11:23:22.163334Z 0 [Note] InnoDB: Using Linux native AIO

2019-04-05T11:23:22.163475Z 0 [Note] InnoDB: Number of pools: 1

2019-04-05T11:23:22.163551Z 0 [Note] InnoDB: Using CPU crc32 instructions

2019-04-05T11:23:22.164599Z 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

2019-04-05T11:23:22.165345Z 0 [Note] InnoDB: Completed initialization of buffer pool

2019-04-05T11:23:22.166094Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2019-04-05T11:23:22.177176Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2019-04-05T11:23:22.187290Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2019-04-05T11:23:22.187399Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2019-04-05T11:23:22.207808Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2019-04-05T11:23:22.208777Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2019-04-05T11:23:22.208819Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

2019-04-05T11:23:22.209311Z 0 [Note] InnoDB: Waiting for purge to start

2019-04-05T11:23:22.259597Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 12359588

2019-04-05T11:23:22.260008Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

2019-04-05T11:23:22.260357Z 0 [Note] Plugin 'FEDERATED' is disabled.

2019-04-05T11:23:22.261538Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190405 11:23:22

2019-04-05T11:23:22.264017Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2019-04-05T11:23:22.264342Z 0 [Warning] CA certificate ca.pem is self signed.

2019-04-05T11:23:22.265823Z 0 [Note] Server hostname (bind-address): '*'; port: 3306

2019-04-05T11:23:22.265880Z 0 [Note] IPv6 is available.

2019-04-05T11:23:22.266648Z 0 [Note]   - '::' resolves to '::';

2019-04-05T11:23:22.266698Z 0 [Note] Server socket created on IP: '::'.

2019-04-05T11:23:22.271096Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2019-04-05T11:23:22.272047Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.272093Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.272101Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.272122Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.272126Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.272133Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.273853Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.273911Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-04-05T11:23:22.277853Z 0 [Note] Event Scheduler: Loaded 0 events

2019-04-05T11:23:22.278087Z 0 [Note] mysqld: ready for connections.

Version: '5.7.22'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
stale

All 11 comments

ok, I wrapped container starting in try catch block and it's working (I mean still falling down with the same exception but at least I can use container). Created container has

mysql.isCreated() == true
mysql.isRunning() == true
mysql.isHealthy() falls with Null pointer exception because inspectContainerResponse.getState() return null.

any suggestions?

I have a similar problem with KafkaContainer.

@nagaeva-anastasia hey, I am facing the same issue with my test... Did you get any updates or solutions for this issue? Thank you for your help!

@Novembera Hi! Unfortunately nope. I hope someone from testcontainers team will be able to help us.

@nagaeva-anastasia could you please share a reproducer?

@nagaeva-anastasia After testing with DB examples from https://github.com/testcontainers/testcontainers-java/tree/master/modules/jdbc-test/src/test/java/org/testcontainers/junit (MySQLContainer("mysql:5.5") and with created oracle-xe container) I have same Error in every try: container is created (line 237 this.containerIsCreated(this.containerId); in GenericContainer) but can not be started (catch (Exception var3), line 252) @bsideup

Here is log from my created (but not started) container:
ORACLE PASSWORD FOR SYS AND SYSTEM: 5fa16c205c198929

Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:

Confirm the password:

Configuring Oracle Listener.

Listener configuration succeeded.

Configuring Oracle Database XE.

Enter SYS user password:

**** *

Enter SYSTEM user password:

 **** 

Enter PDBADMIN User Password:

*** *

Prepare for db operation

7% complete

Copying database files

29% complete

Creating and starting Oracle instance

30% complete

31% complete

34% complete

38% complete

41% complete

43% complete

Completing Database Creation

47% complete

50% complete

Creating Pluggable Databases

54% complete

71% complete

Executing Post Configuration Actions

93% complete

Running Custom Scripts

100% complete

Database creation complete. For details check the logfiles at:

/opt/oracle/cfgtoollogs/dbca/XE.

Database Information:

Global Database Name:XE

System Identifier(SID):XE

Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Connect to Oracle Database using one of the connect strings:

 Pluggable database: fb76f889deb1/XEPDB1

 Multitenant container database: fb76f889deb1

Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE

The Oracle base remains unchanged with value /opt/oracle

#

DATABASE IS READY TO USE!

#

The following output is now a tail of the alert.log:

2019-06-19T10:54:48.845841+00:00

XEPDB1(3):Resize operation completed for file# 10, old size 358400K, new size 368640K

2019-06-19T10:54:51.091125+00:00

XEPDB1(3):CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/XE/XEPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

XEPDB1(3):Completed: CREATE SMALLFILE TABLESPACE "USERS" LOGGING DATAFILE '/opt/oracle/oradata/XE/XEPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO

XEPDB1(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"

XEPDB1(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"

2019-06-19T10:54:52.776178+00:00

ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE

Completed: ALTER PLUGGABLE DATABASE XEPDB1 SAVE STATE

@Novembera your issue seems to be different - it just fails to start. Please check Oracle module for the usage details, and raise a separate issue

@nagaeva-anastasia from the original stacktrace, I see the following line:

Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Did you forget adding a MySQL driver?

Sorry for the mess. Right now I can't attach the link to the project with the reproducable issue.
I will come back a bit later.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

naderghanbari picture naderghanbari  路  3Comments

McKratt picture McKratt  路  4Comments

ParafeniukMikalaj picture ParafeniukMikalaj  路  3Comments

rnorth picture rnorth  路  3Comments

andredasilvapinto picture andredasilvapinto  路  3Comments