Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Oracle Free #1665

Closed
gvenzl opened this issue Nov 17, 2023 · 8 comments
Closed

Upgrade to Oracle Free #1665

gvenzl opened this issue Nov 17, 2023 · 8 comments
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@gvenzl
Copy link

gvenzl commented Nov 17, 2023

Hi all (and @schauder),

This is a follow-on ticket from the discussions in #1528.

This Wednesday, Atomic Jar introduced a new Oracle Free module, which means that these lines:

DockerImageName dockerImageName = DockerImageName.parse("gvenzl/oracle-free:23-slim")
.asCompatibleSubstituteFor("gvenzl/oracle-xe");
OracleContainer container = new OracleContainer(dockerImageName)
.withDatabaseName("freepdb2")
.withReuse(true);

can now be further simplified to:

var oracle = new OracleContainer("gvenzl/oracle-free:23-slim");

The following dependency is required:

<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>oracle-free</artifactId>
    <version>1.19.2</version>
    <scope>test</scope>
</dependency>

Looking at the current code in OracleDataSourceConfiguration, I think the line withDatabase('freepdb2') can also be removed. I think we added that because the default database names between oracle-xe and oracle-free TC modules are incompatible.
Removing that line means no new database XEPDB2 will be created at container startup which will further improve overall startup time.

Thanks,

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 17, 2023
@schauder
Copy link
Contributor

Great. What is the difference between slim and slim-faststart? The later sounds promising.

schauder added a commit that referenced this issue Nov 17, 2023
Also moving to the  label, hoping it will start less slow.

Closes #1665
@loiclefevre
Copy link
Contributor

Great. What is the difference between slim and slim-faststart? The later sounds promising.

Hi @schauder, you have all the details here.

HTH

@schauder
Copy link
Contributor

Thanks, I also just found the description myself.

1 similar comment
@schauder
Copy link
Contributor

Thanks, I also just found the description myself.

schauder added a commit that referenced this issue Nov 17, 2023
Also moving to the `faststart` label, hoping it will start less slow.

Closes #1665
mp911de pushed a commit that referenced this issue Nov 17, 2023
Also moving to the `faststart` label, hoping it will start less slow.

Closes #1665
Original pull request: #1668
@mp911de mp911de changed the title Testcontainers Oracle Free module now available Upgrade to Oracle Free Nov 17, 2023
@mp911de
Copy link
Member

mp911de commented Nov 17, 2023

Seems there are issues with the container:

Code:

DockerImageName dockerImageName = DockerImageName.parse("gvenzl/oracle-free:23.3-slim-faststart");
OracleContainer container = new OracleContainer(dockerImageName).withReuse(true);
container.start();
[2023-11-17T08:37:14.102Z] 2023-11-17 08:37:06,998 ERROR e/gvenzl/oracle-free:23.3-slim-faststart: 553 - Could not start container
[2023-11-17T08:37:14.102Z] org.testcontainers.containers.ContainerLaunchException: Timed out waiting for log output matching '.*DATABASE IS READY TO USE!.*\s'
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy.waitUntilReady(LogMessageWaitStrategy.java:47)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.wait.strategy.AbstractWaitStrategy.waitUntilReady(AbstractWaitStrategy.java:52)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.oracle.OracleContainer.waitUntilContainerStarted(OracleContainer.java:82)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:503)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:357)
[2023-11-17T08:37:14.102Z] 	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:347)
[2023-11-17T08:37:14.102Z] 	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:333)
[2023-11-17T08:37:14.102Z] 	at org.springframework.data.jdbc.testing.OracleDataSourceConfiguration.createDataSource(OracleDataSourceConfiguration.java:61)
[2023-11-17T08:37:14.102Z] 	at org.springframework.data.jdbc.testing.DataSourceConfiguration.dataSource(DataSourceConfiguration.java:60)
[2023-11-17T08:37:14.102Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-11-17T08:37:14.103Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2023-11-17T08:37:14.103Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-11-17T08:37:14.103Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:489)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1166)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:563)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
[2023-11-17T08:37:14.103Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
[2023-11-17T08:37:14.104Z] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
[2023-11-17T08:37:14.104Z] 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:946)
[2023-11-17T08:37:14.104Z] 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:616)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:221)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:110)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:212)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependenaes(DependencyInjectionTestExecutionListener.java:141)
[2023-11-17T08:37:14.104Z] 	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:97)
[2023-11-17T08:37:14.105Z] 	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:247)
[2023-11-17T08:37:14.105Z] 	at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:163)
[2023-11-17T08:37:14.105Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$10(ClassBasedTestDescriptor.java:378)
[2023-11-17T08:37:14.105Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:383)
[2023-11-17T08:37:14.105Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$11(ClassBasedTestDescriptor.java:378)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
[2023-11-17T08:37:14.105Z] 	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
[2023-11-17T08:37:14.106Z] 	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:377)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$6(ClassBasedTestDescriptor.java:290)
[2023-11-17T08:37:14.106Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:289)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:279)
[2023-11-17T08:37:14.106Z] 	at java.base/java.util.Optional.orElseGet(Optional.java:364)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:278)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106)
[2023-11-17T08:37:14.106Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105)
[2023-11-17T08:37:14.106Z] 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
[2023-11-17T08:37:14.107Z] 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.107Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
[2023-11-17T08:37:14.108Z] 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
[2023-11-17T08:37:14.108Z] 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
[2023-11-17T08:37:14.109Z] 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:50)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
[2023-11-17T08:37:14.110Z] 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
[2023-11-17T08:37:14.110Z] 2023-11-17 08:37:07,036 ERROR e/gvenzl/oracle-free:23.3-slim-faststart: 560 - Log output from the failed container:
[2023-11-17T08:37:14.110Z] CONTAINER: starting up...
[2023-11-17T08:37:14.110Z] CONTAINER: first database startup, initializing...
[2023-11-17T08:37:14.110Z] CONTAINER: starting up Oracle Database...
[2023-11-17T08:37:14.110Z] 
[2023-11-17T08:37:14.110Z] LSNRCTL for Linux: Version 23.0.0.0.0 - Production on 17-NOV-2023 08:36:07
[2023-11-17T08:37:14.110Z] 
[2023-11-17T08:37:14.110Z] Copyright (c) 1991, 2023, Oracle.  All rights reserved.
[2023-11-17T08:37:14.111Z] 
[2023-11-17T08:37:14.111Z] Starting /opt/oracle/product/23c/dbhomeFree/bin/tnslsnr: please wait...
[2023-11-17T08:37:14.111Z] 
[2023-11-17T08:37:14.111Z] TNSLSNR for Linux: Version 23.0.0.0.0 - Production
[2023-11-17T08:37:14.111Z] System parameter file is /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora
[2023-11-17T08:37:14.111Z] Log messages written to /opt/oracle/diag/tnslsnr/95381d5d2f14/listener/alert/log.xml
[2023-11-17T08:37:14.111Z] Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_FREE)))
[2023-11-17T08:37:14.111Z] Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
[2023-11-17T08:37:14.111Z] 
[2023-11-17T08:37:14.111Z] Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_FREE)))
[2023-11-17T08:37:14.111Z] STATUS of the LISTENER
[2023-11-17T08:37:14.111Z] ------------------------
[2023-11-17T08:37:14.111Z] Alias                     LISTENER
[2023-11-17T08:37:14.111Z] Version                   TNSLSNR for Linux: Version 23.0.0.0.0 - Production
[2023-11-17T08:37:14.111Z] Start Date                17-NOV-2023 08:36:08
[2023-11-17T08:37:14.111Z] Uptime                    0 days 0 hr. 0 min. 1 sec
[2023-11-17T08:37:14.112Z] Trace Level               off
[2023-11-17T08:37:14.112Z] Security                  ON: Local OS Authentication
[2023-11-17T08:37:14.112Z] SNMP                      OFF
[2023-11-17T08:37:14.112Z] Default Service           FREE
[2023-11-17T08:37:14.112Z] Listener Parameter File   /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora
[2023-11-17T08:37:14.112Z] Listener Log File         /opt/oracle/diag/tnslsnr/95381d5d2f14/listener/alert/log.xml
[2023-11-17T08:37:14.112Z] Listening Endpoints Summary...
[2023-11-17T08:37:14.112Z]   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_FREE)))
[2023-11-17T08:37:14.112Z]   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
[2023-11-17T08:37:14.112Z] The listener supports no services
[2023-11-17T08:37:14.112Z] The command completed successfully
[2023-11-17T08:37:14.113Z] ORACLE instance started.
[2023-11-17T08:37:14.113Z] 
[2023-11-17T08:37:14.113Z] Total System Global Area 1603679416 bytes
[2023-11-17T08:37:14.113Z] Fixed Size		    5313720 bytes
[2023-11-17T08:37:14.113Z] Variable Size		  738197504 bytes
[2023-11-17T08:37:14.113Z] Database Buffers	  855638016 bytes
[2023-11-17T08:37:14.113Z] Redo Buffers		    4530176 bytes
[2023-11-17T08:37:14.113Z] Database mounted.
[2023-11-17T08:37:14.113Z] 

@loiclefevre
Copy link
Contributor

loiclefevre commented Nov 17, 2023

timeout? I think you can increase it.

@schauder
Copy link
Contributor

I currently suspect this is fluke. We'll take another look next week.

@gvenzl
Copy link
Author

gvenzl commented Nov 18, 2023

Hm, I believe that's the timeout set within the Testcontainers module which is currently set to 60 seconds, see:

https://github.com/testcontainers/testcontainers-java/blob/f1f79dc4281f906d7b508b45a79dac28585778d5/modules/oracle-free/src/main/java/org/testcontainers/oracle/OracleContainer.java#L35-L37

and

https://github.com/testcontainers/testcontainers-java/blob/f1f79dc4281f906d7b508b45a79dac28585778d5/modules/oracle-free/src/main/java/org/testcontainers/oracle/OracleContainer.java#L68-L78

I thought 60 seconds would be enough to pull the image and start the container as Testcontainers' own tests didn't run into that issue but the time is heavily impacted by the download speed and CPU clock speed for extracting the compressed layers.

For what it's worth, the database was almost up, another 3-5 seconds and it would have been there. Ah well :)

Great. What is the difference between slim and slim-faststart? The later sounds promising.

@schauder, the difference is the tradeoff between image size and actual database startup time. The *-faststart images include already the extracted database dictionary files in three additional layers. That will add a GB or two to the overall image size and takes a while longer to download. The non-faststart images have these database dictionary files as a compressed 7z file that will be extracted at container startup time.

Here is what it boils down to:

If you have a case where you start and destroy many containers from the same image, you will want to use the *-faststart images, as you don't want to pay the penalty of data dictionary files extraction for each of these new containers. This is usually the case when spinning up containers locally or somewhere where the downloaded image tends to persist.

If you have a case where all you do is pull the image, startup the container run some tests and throw it all away again, you are most often better off using the non-faststart slim image. Why? Because oddly enough, the image with the compressed database dictionary files is so much smaller, and 7z able to decompress in parallel (unlike gunzip which is used by Docker for image layer extraction), that the total download + uncompress at startup time is lower than the total download time and gunzip layer uncompress time from the -faststart image. Hence this image aligns itself much better for CI/CD jobs like GitHub Action or similar.

For reference, see this GitHub Actions run: https://github.com/gvenzl/github-actions-tests/actions/runs/6911512051

You will see that the three slim runs were all significantly faster than the slim-faststart images, just because in the end the 7z uncompress is faster than the additional 3 layers download and gunzip uncompress operation.

schauder added a commit that referenced this issue Nov 20, 2023
Timeout increased from the default because that cause problems on CI.
Brought SD JDBC now uses `ojdbc11` as R2DBC.

Closes #1665
Original pull request #1668
schauder added a commit that referenced this issue Nov 20, 2023
Timeout increased from the default because that cause problems on CI.
Brought SD JDBC now uses `ojdbc11` as R2DBC.

Closes #1665
Original pull request #1668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants