Aurélien Pupier created CAMEL-24647:
---------------------------------------
Summary: Camel JBang IT tests failing with BindException: Address
already in use
Key: CAMEL-24647
URL: https://issues.apache.org/jira/browse/CAMEL-24647
Project: Camel
Issue Type: Test
Components: camel-jbang
Affects Versions: 4.23.0
Reporter: Aurélien Pupier
several tests are failign with this kind of erro:
{noformat}
java.nio.file.FileAlreadyExistsException: target/data/d4e8f1900a98d
at
java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
at
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at
java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:418)
at java.base/java.nio.file.Files.createDirectory(Files.java:647)
at
org.apache.camel.dsl.jbang.it.support.JBangTestSupport.beforeEach(JBangTestSupport.java:80)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
Suppressed: java.lang.AssertionError: [log contains ERROR]
Expecting actual:
"FromDirectoryRoute| org.apache.camel.RuntimeCamelException:
java.io.FileNotFoundException:
/deployments/data/d4e8f1900a98d/FromDirectoryRoute.java does not exist
FromDirectoryRoute| at
org.apache.camel.RuntimeCamelException.wrapRuntimeException(RuntimeCamelException.java:91)
FromDirectoryRoute| at
org.apache.camel.support.RouteWatcherReloadStrategy.onRouteReload(RouteWatcherReloadStrategy.java:388)
FromDirectoryRoute| at
org.apache.camel.support.RouteWatcherReloadStrategy.lambda$doStart$0(RouteWatcherReloadStrategy.java:122)
FromDirectoryRoute| at
org.apache.camel.support.FileWatcherResourceReloadStrategy$WatchFileChangesTask.run(FileWatcherResourceReloadStrategy.java:312)
FromDirectoryRoute| at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
FromDirectoryRoute| at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
FromDirectoryRoute| at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
FromDirectoryRoute| at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
FromDirectoryRoute| at java.base/java.lang.Thread.run(Thread.java:1583)
FromDirectoryRoute| Caused by: java.io.FileNotFoundException:
/deployments/data/d4e8f1900a98d/FromDirectoryRoute.java does not exist
FromDirectoryRoute| at
org.apache.camel.impl.engine.DefaultResourceResolvers$FileResolver$1.getInputStream(DefaultResourceResolvers.java:76)
FromDirectoryRoute| at
org.apache.camel.dsl.support.DefaultSourceLoader.loadResource(DefaultSourceLoader.java:34)
FromDirectoryRoute| at
org.apache.camel.dsl.support.RouteBuilderLoaderSupport.resourceInputStream(RouteBuilderLoaderSupport.java:166)
FromDirectoryRoute| at
org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader.compileResources(JavaRoutesBuilderLoader.java:196)
FromDirectoryRoute| at
org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader.preParseRoutes(JavaRoutesBuilderLoader.java:109)
FromDirectoryRoute| at
org.apache.camel.impl.engine.DefaultRoutesLoader.findRoutesBuilders(DefaultRoutesLoader.java:154)
FromDirectoryRoute| at
org.apache.camel.impl.engine.DefaultRoutesLoader.findRoutesBuilders(DefaultRoutesLoader.java:102)
FromDirectoryRoute| at
org.apache.camel.impl.engine.DefaultRoutesLoader.updateRoutes(DefaultRoutesLoader.java:295)
FromDirectoryRoute| at
org.apache.camel.support.RouteWatcherReloadStrategy.onRouteReload(RouteWatcherReloadStrategy.java:319)
FromDirectoryRoute| ... 7 more
FromDirectoryRoute| java.lang.RuntimeException: java.net.BindException: Address
already in use
FromDirectoryRoute| at
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServer.lambda$startServer$1(VertxPlatformHttpServer.java:238)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureImpl$4.onFailure(FutureImpl.java:188)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:81)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureImpl.tryFail(FutureImpl.java:278)
FromDirectoryRoute| at
io.vertx.core.impl.future.FixedMapping.onFailure(FixedMapping.java:36)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureBase.emitFailure(FutureBase.java:81)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureImpl.tryFail(FutureImpl.java:278)
FromDirectoryRoute| at
io.vertx.core.impl.future.FixedMapping.onFailure(FixedMapping.java:36)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureImpl$ListenerArray.onFailure(FutureImpl.java:316)
FromDirectoryRoute| at
io.vertx.core.impl.future.FutureBase.lambda$emitFailure$1(FutureBase.java:75)
FromDirectoryRoute| at
io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:148)
FromDirectoryRoute| at
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:141)
FromDirectoryRoute| at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:535)
FromDirectoryRoute| at
io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:201)
FromDirectoryRoute| at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1204)
FromDirectoryRoute| at
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
FromDirectoryRoute| at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
FromDirectoryRoute| at java.base/java.lang.Thread.run(Thread.java:1583)
FromDirectoryRoute| Caused by: java.net.BindException: Address already in use
FromDirectoryRoute| at java.base/sun.nio.ch.Net.bind0(Native Method)
FromDirectoryRoute| at java.base/sun.nio.ch.Net.bind(Net.java:577)
FromDirectoryRoute| at
java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344)
FromDirectoryRoute| at
java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301)
FromDirectoryRoute| at
io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:148)
FromDirectoryRoute| at
io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:431)
FromDirectoryRoute| at
io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1353)
FromDirectoryRoute| at
io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:500)
FromDirectoryRoute| at
io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:994)
FromDirectoryRoute| at io.netty.channel.Channel.bind(Channel.java:302)
{noformat}
{noformat}
org.opentest4j.AssertionFailedError:
expected: 200
but was: 404
at
org.apache.camel.dsl.jbang.it.OpenApiITCase.runOpenApiUsingContractFirstApproach(OpenApiITCase.java:79)
Suppressed: java.lang.AssertionError: [log contains ERROR]
Expecting actual:
"petstore | java.lang.RuntimeException: java.net.BindException: Address
already in use
{noformat}
{noformat}
org.awaitility.core.ConditionTimeoutException:
Assertion condition defined as a Lambda expression in
org.apache.camel.dsl.jbang.it.JolokiaITCase command curl
http://localhost:8888/hawtio/ failed with output and error % Total %
Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8888 after 1 ms: Could not
connect to server
within 30 seconds.
at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
at
org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
at
org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
at
org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
at
org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
at
org.apache.camel.dsl.jbang.it.JolokiaITCase.testRunHawtio(JolokiaITCase.java:56)
Caused by: org.opentest4j.AssertionFailedError: command curl
http://localhost:8888/hawtio/ failed with output and error % Total %
Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to localhost port 8888 after 1 ms: Could not
connect to server
at org.junit.jupiter.api.Assertions.fail(Assertions.java:142)
at
org.apache.camel.test.infra.cli.services.CliLocalContainerService.executeGenericCommand(CliLocalContainerService.java:166)
at
org.apache.camel.test.infra.cli.services.CliLocalContainerService.executeGenericCommand(CliLocalContainerService.java:143)
at
org.apache.camel.test.infra.cli.services.CliServiceFactory$SingletonCliService.executeGenericCommand(CliServiceFactory.java:48)
at
org.apache.camel.dsl.jbang.it.support.JBangTestSupport.execInContainer(JBangTestSupport.java:135)
at
org.apache.camel.dsl.jbang.it.JolokiaITCase.lambda$testRunHawtio$0(JolokiaITCase.java:58)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)