oscerd commented on issue #2684: URL: https://github.com/apache/camel-k/issues/2684#issuecomment-939059619
With the kamelets, you'll get some complaints before the correct connection will be done ``` 2021-10-08 19:08:39,308 WARN [io.qua.net.run.NettyRecorder] (Thread-0) Netty DefaultChannelId initialization (with io.netty.machineId system property set to 6b:d5:f4:43:a6:d8:c4:47) took more than a second 2021-10-08 19:08:41,106 INFO [org.mon.dri.cluster] (main) Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'} 2021-10-08 19:08:42,019 INFO [org.mon.dri.cluster] (main) Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'} 2021-10-08 19:08:42,710 INFO [org.mon.dri.cluster] (cluster-ClusterId{value='61609738311ec2632f641801', description='null'}-127.0.0.1:27017) Exception in monitor thread while connecting to server 127.0.0.1:27017: com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:165) at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:195) at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:151) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.base/java.net.Socket.connect(Socket.java:609) at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ... 4 more 2021-10-08 19:08:43,009 INFO [org.mon.dri.cluster] (cluster-ClusterId{value='6160973a311ec2632f641802', description='null'}-127.0.0.1:27017) Exception in monitor thread while connecting to server 127.0.0.1:27017: com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.AsynchronousSocketChannelStream$OpenCompletionHandler.failed(AsynchronousSocketChannelStream.java:124) at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:283) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) at java.base/sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:306) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) 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:829) Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native Method) at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252) ... 7 more ``` But after that you'll get the correct connection, this is something related to underlined quarkus extension ``` 2021-10-08 19:08:54,308 INFO [org.apa.cam.imp.eng.AbstractCamelContext] (main) StreamCaching is enabled on CamelContext: camel-k-runtime-examples-yaml 2021-10-08 19:08:54,609 INFO [org.mon.dri.cluster] (main) Cluster created with settings {hosts=[172.17.0.3:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'} 2021-10-08 19:08:54,907 INFO [org.apa.cam.com.mon.MongoDbEndpoint] (main) Initialising MongoDb endpoint: local-mongodb-1://test?collection=log&createCollection=false&database=test&hosts=172.17.0.3&operation=insert&password=xxxxxx&username=mongoadmin 2021-10-08 19:08:55,415 INFO [org.mon.dri.cluster] (main) Cluster description not yet available. Waiting for 30000 ms before timing out 2021-10-08 19:08:55,613 INFO [org.mon.dri.connection] (cluster-ClusterId{value='61609746311ec2632f641803', description='null'}-172.17.0.3:27017) Opened connection [connectionId{localValue:9, serverValue:2}] to 172.17.0.3:27017 2021-10-08 19:08:55,613 INFO [org.mon.dri.connection] (cluster-rtt-ClusterId{value='61609746311ec2632f641803', description='null'}-172.17.0.3:27017) Opened connection [connectionId{localValue:10, serverValue:3}] to 172.17.0.3:27017 2021-10-08 19:08:55,615 INFO [org.mon.dri.cluster] (cluster-ClusterId{value='61609746311ec2632f641803', description='null'}-172.17.0.3:27017) Monitor thread successfully connected to server with description ServerDescription{address=172.17.0.3:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=804429642} 2021-10-08 19:09:00,107 INFO [org.mon.dri.connection] (main) Opened connection [connectionId{localValue:11, serverValue:4}] to 172.17.0.3:27017 ``` I set 172.17.0.3 on the kameletBinding. It's just logging, but the feature works and I think it is the same for the component. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org