@daschl I have created some tests that reproduce this issue. They’re attached here.
CB303TestcontainersFailure.zip (27.0 KB)
Note that this logs to console and seems to echo the same/similar symptom I detailed above:
INFO: [com.couchbase.node][NodeDisconnectedEvent][7825us] Node disconnected {"coreId":"0x1feeeb7500000003","managerPort":"32895","remote":"localhost"}
Apr 24, 2020 3:29:36 PM com.couchbase.client.core.cnc.LoggingEventConsumer$Slf4JLogger info
INFO: [com.couchbase.core][BucketOpenedEvent][10s] Opened bucket "data1" {"alternateIdentifier":"external","coreId":"0x1feeeb7500000003"}
Apr 24, 2020 3:29:36 PM com.couchbase.client.core.cnc.LoggingEventConsumer$Slf4JLogger info
INFO: [com.couchbase.core][CoreCreatedEvent] {"clientVersion":"3.0.3","clientGitHash":"e55f7d43","coreVersion":"2.0.4","coreGitHash":"e55f7d43","userAgent":"couchbase-java/3.0.3 (Mac OS X 10.15.4 x86_64; OpenJDK 64-Bit Server VM 11.0.6+10)","maxNumRequestsInRetry":32768,"ioEnvironment":{"nativeIoEnabled":true,"eventLoopThreadCount":8,"eventLoopGroups":["KQueueEventLoopGroup"]},"ioConfig":{"captureTraffic":[],"mutationTokensEnabled":true,"networkResolution":"auto","dnsSrvEnabled":true,"tcpKeepAlivesEnabled":true,"tcpKeepAliveTimeMs":60000,"configPollIntervalMs":2500,"kvCircuitBreakerConfig":"disabled","queryCircuitBreakerConfig":"disabled","viewCircuitBreakerConfig":"disabled","searchCircuitBreakerConfig":"disabled","analyticsCircuitBreakerConfig":"disabled","managerCircuitBreakerConfig":"disabled","numKvConnections":1,"maxHttpConnections":12,"idleHttpConnectionTimeoutMs":30000,"configIdleRedialTimeoutMs":300000},"compressionConfig":{"enabled":true,"minRatio":0.83,"minSize":32},"securityConfig":{"tlsEnabled":false,"nativeTlsEnabled":true,"hasTrustCertificates":false,"trustManagerFactory":null},"timeoutConfig":{"kvMs":2500,"kvDurableMs":10000,"managementMs":75000,"queryMs":75000,"viewMs":75000,"searchMs":75000,"analyticsMs":75000,"connectMs":10000,"disconnectMs":10000},"loggerConfig":{"customLogger":null,"fallbackToConsole":false,"disableSlf4j":false,"loggerName":"CouchbaseLogger","diagnosticContextEnabled":false},"orphanReporterConfig":{"emitIntervalMs":10000,"sampleSize":10,"queueLength":1024},"retryStrategy":"BestEffortRetryStrategy","requestTracer":"OwnedSupplier"} {"alternateIdentifier":"external","coreId":"0x1feeeb7500000004"}
Apr 24, 2020 3:29:36 PM com.couchbase.client.core.cnc.LoggingEventConsumer$Slf4JLogger info
INFO: [com.couchbase.node][NodeConnectedEvent] Node connected {"coreId":"0x1feeeb7500000004","managerPort":"32895","remote":"localhost"}
Apr 24, 2020 3:29:36 PM com.couchbase.client.core.cnc.LoggingEventConsumer$Slf4JLogger info
INFO: [com.couchbase.node][NodeConnectedEvent] Node connected {"alternateRemote":"localhost","coreId":"0x1feeeb7500000004","managerPort":"8091","remote":"172.17.0.3"}
Apr 24, 2020 3:29:36 PM com.couchbase.client.core.cnc.LoggingEventConsumer$Slf4JLogger info
INFO: [com.couchbase.node][NodeDisconnectedEvent][580us] Node disconnected {"coreId":"0x1feeeb7500000004","managerPort":"32895","remote":"localhost"}
I run this on my Mac (16-inch, 2019) 10.15.4. I do not know (yet) if other OSes have a similar issue…
It’s important to note that this problem does not happen if there’s a local Couchbase running - the test has “smarts” at the beginning to see if there’s a local Couchbase and connects to that if available, otherwise it will spin up and configure a testcontainer.
To use local Couchbase, you have to have a bucket named data1
with a user data1
with password password
and full bucket access to data1
bucket.
There are 2 sets of tests, one uses some “goofy” inheritance that we use for our tests (inheritedTests
package) and the other selfcontainedTests
seems to be not as unreliable.
Having this work is critical for us - as this is how we manage our tests in our ci/cd pipeline.