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

couchdb: native mode has to be fixed for a different implentation #6198

Closed
JiriOndrusek opened this issue Jun 17, 2024 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@JiriOndrusek
Copy link
Contributor

Bug description

Cloudant implementation is used instead of LightCouch (see https://issues.apache.org/jira/browse/CAMEL-20800)

Native mode fails with several issues. Native test is disabled for now in camel-main branch.

@JiriOndrusek
Copy link
Contributor Author

The current error is probably linked with okhttp3

@JiriOndrusek
Copy link
Contributor Author

The error log:

__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2024-06-17 15:35:35,567 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
2024-06-17 15:35:35,567 INFO  [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 4.7.0-SNAPSHOT is starting
2024-06-17 15:35:35,657 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.7.0-SNAPSHOT (camel-1) is starting
2024-06-17 15:35:35,658 INFO  [org.apa.cam.mai.BaseMainSupport] (main) Property-placeholders summary
2024-06-17 15:35:35,658 INFO  [org.apa.cam.mai.BaseMainSupport] (main)     [JVM System Property]          camel.couchdb.test.server.authority=localhost:33074
2024-06-17 15:35:35,659 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes startup (total:1)
2024-06-17 15:35:35,659 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route1 (couchdb://http://localhost:33074/database)
2024-06-17 15:35:35,659 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.7.0-SNAPSHOT (camel-1) started in 1ms (build:0ms init:0ms start:1ms)
2024-06-17 15:35:35,660 INFO  [io.quarkus] (main) camel-quarkus-integration-test-couchdb 3.12.0-SNAPSHOT native (powered by Quarkus 3.12.0.CR1) started in 0.106s. Listening on: http://0.0.0.0:8081
2024-06-17 15:35:35,660 INFO  [io.quarkus] (main) Profile prod activated. 
2024-06-17 15:35:35,660 INFO  [io.quarkus] (main) Installed features: [camel-core, camel-couchdb, cdi, resteasy, resteasy-jackson, smallrye-context-propagation, vertx]
2024-06-17 15:35:36,662 WARN  [org.apa.cam.com.cou.CouchDbConsumer] (Camel (camel-1) thread #1 - couchdb://http://localhost:33074/database) Failed polling endpoint: couchdb://http://localhost:33074/database?createDatabase=true&heartbeat=100. Will try again at next poll. Caused by: [java.lang.NullPointerException - null]: java.lang.NullPointerException
	at org.apache.camel.component.couchdb.CouchDbConsumer.poll(CouchDbConsumer.java:80)
	at org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:205)
	at org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:119)
	at java.base@21.0.3/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base@21.0.3/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
	at java.base@21.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base@21.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base@21.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base@21.0.3/java.lang.Thread.runWith(Thread.java:1596)
	at java.base@21.0.3/java.lang.Thread.run(Thread.java:1583)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)

Jun 17, 2024 3:35:36 PM org.jboss.logmanager.JBossLoggerFinder getLogger
ERROR: The LogManager accessed before the "java.util.logging.manager" system property was set to "org.jboss.logmanager.LogManager". Results may be unexpected.
2024-06-17 15:35:36,900 INFO  [org.apa.cam.qua.com.cou.it.CouchdbResource] (executor-thread-1) Invoking create
2024-06-17 15:35:37,163 WARN  [org.apa.cam.com.cou.CouchDbConsumer] (Camel (camel-1) thread #1 - couchdb://http://localhost:33074/database) Failed polling endpoint: couchdb://http://localhost:33074/database?createDatabase=true&heartbeat=100. Will try again at next poll. Caused by: [java.lang.RuntimeException - java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:33074]: java.lang.RuntimeException: java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:33074
	at com.ibm.cloud.sdk.core.service.BaseService$IBMCloudSDKServiceCall.execute(BaseService.java:588)
	at org.apache.camel.component.couchdb.CouchDbClientWrapper.pollChanges(CouchDbClientWrapper.java:99)
	at org.apache.camel.component.couchdb.CouchDbConsumer.poll(CouchDbConsumer.java:78)
	at org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:205)
	at org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:119)
	at java.base@21.0.3/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base@21.0.3/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
	at java.base@21.0.3/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
	at java.base@21.0.3/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base@21.0.3/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base@21.0.3/java.lang.Thread.runWith(Thread.java:1596)
	at java.base@21.0.3/java.lang.Thread.run(Thread.java:1583)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
Caused by: java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:33074
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at com.ibm.cloud.sdk.core.http.gzip.GzipRequestInterceptor.intercept(GzipRequestInterceptor.java:41)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at com.ibm.cloud.sdk.core.service.BaseService$IBMCloudSDKServiceCall.execute(BaseService.java:581)
	... 13 more
	Suppressed: java.io.IOException: unexpected end of stream on http://localhost:33074/...
		at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:210)
		at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
		at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
		... 25 more
	Caused by: java.io.EOFException: \n not found: limit=0 content=…
		at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:335)
		at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
		at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
		... 29 more
	Suppressed: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:33074
		... 32 more
	Caused by: java.net.ConnectException: Connection refused
		at java.base@21.0.3/sun.nio.ch.Net.pollConnect(Native Method)
		at java.base@21.0.3/sun.nio.ch.Net.pollConnectNow(Net.java:682)
		at java.base@21.0.3/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
		at java.base@21.0.3/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
		at java.base@21.0.3/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
		at java.base@21.0.3/java.net.Socket.connect(Socket.java:751)
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
		... 31 more
Caused by: java.net.ConnectException: Connection refused
	at java.base@21.0.3/sun.nio.ch.Net.pollConnect(Native Method)
	at java.base@21.0.3/sun.nio.ch.Net.pollConnectNow(Net.java:682)
	at java.base@21.0.3/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
	at java.base@21.0.3/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
	at java.base@21.0.3/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base@21.0.3/java.net.Socket.connect(Socket.java:751)
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
	... 31 more

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.869 s <<< FAILURE! -- in org.apache.camel.quarkus.component.couchdb.it.CouchbIT
[ERROR] org.apache.camel.quarkus.component.couchdb.it.CouchbIT.crudShouldSucceed -- Time elapsed: 1.535 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: not <null>
	at org.apache.camel.quarkus.component.couchdb.it.CouchdbTest.crudShouldSucceed(CouchdbTest.java:46)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:820)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   CouchbIT>CouchdbTest.crudShouldSucceed:46 expected: not <null>
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

@jamesnetherton
Copy link
Contributor

Should be fixed in 0a46a57.

@jamesnetherton jamesnetherton self-assigned this Jun 24, 2024
@jamesnetherton jamesnetherton added this to the 3.13.0 milestone Jun 24, 2024
@jamesnetherton jamesnetherton changed the title [camel-main] couchdb: native mode has to be fixed for a different implentation couchdb: native mode has to be fixed for a different implentation Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants