Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16033

Docker tests fail to start when using MySQL 5.5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.11.1, 11.0
    • 10.11
    • Test Framework
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Error:

      org.testcontainers.containers.ContainerLaunchException: Container startup failed
      	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:221)
      	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:203)
      	at org.xwiki.test.docker.junit5.AbstractContainerExecutor.start(AbstractContainerExecutor.java:50)
      	at org.xwiki.test.docker.junit5.database.DatabaseContainerExecutor.startDatabaseContainer(DatabaseContainerExecutor.java:181)
      	at org.xwiki.test.docker.junit5.database.DatabaseContainerExecutor.startMySQLContainer(DatabaseContainerExecutor.java:114)
      	at org.xwiki.test.docker.junit5.database.DatabaseContainerExecutor.startMySQLContainer(DatabaseContainerExecutor.java:95)
      	at org.xwiki.test.docker.junit5.database.DatabaseContainerExecutor.start(DatabaseContainerExecutor.java:52)
      	at org.xwiki.test.docker.junit5.XWikiDockerExtension.startDatabase(XWikiDockerExtension.java:291)
      	at org.xwiki.test.docker.junit5.XWikiDockerExtension.beforeAll(XWikiDockerExtension.java:113)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassTestDescriptor.java:358)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeBeforeAllCallbacks(ClassTestDescriptor.java:358)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:197)
      	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.before(ClassTestDescriptor.java:74)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:105)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
      	at java.util.ArrayList.forEach(ArrayList.java:1257)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
      	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
      	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
      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:214)
      	... 37 more
      Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
      	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:286)
      	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:216)
      	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:76)
      	... 38 more
      Caused by: org.rnorth.ducttape.TimeoutException: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
      	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:53)
      	at org.testcontainers.containers.JdbcDatabaseContainer.waitUntilContainerStarted(JdbcDatabaseContainer.java:129)
      	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:263)
      	... 40 more
      Caused by: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
      	at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:70)
      	at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
      	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:38)
      	... 42 more
      Caused by: java.util.concurrent.TimeoutException
      	at java.util.concurrent.FutureTask.get(FutureTask.java:205)
      	at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:65)
      	... 44 more
      

      Real error:

      11:50:53.176 [main] INFO  o.x.t.d.j.AbstractContainerExecutor - Docker image used: [mysql:5.5]
      11:50:54.614 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 
      11:50:54.614 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: ERROR: mysqld failed while attempting to check config
      11:50:54.614 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: command was: "mysqld --character-set-server=utf8 --collation-server=utf8_bin --explicit-defaults-for-timestamp=1 --verbose --help --log-bin-index=/tmp/tmp.XnfRgfCo8O"
      11:50:54.614 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [Note] mysqld (mysqld 5.5.62) starting as process 9 ...
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [Note] Plugin 'FEDERATED' is disabled.
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: mysqld: Table 'mysql.plugin' doesn't exist
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [ERROR] mysqld: unknown variable 'explicit-defaults-for-timestamp=1'
      11:50:54.615 [tc-okhttp-stream-673672784] INFO  o.x.t.d.j.d.DatabaseContainerExecutor - STDERR: 190114 10:50:54 [ERROR] Aborting
      

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: