[BUG] Create of of async client fails with assertion error on Cosmos SDK v4
See original GitHub issueDescribe the bug
Using the Cosmos SDK v4, I attempt to create a client using CosmosClientBuilder
.
Both CosmosClientBuilder.buildAsyncClient()
and CosmosClientBuilder.buildClient()
fail with an assertion error.
Exception or Stack Trace
Assertion fails due to globalEndpointManager.getLatestDatabaseAccount()
returning null
during initialization:
java.lang.AssertionError
at com.azure.cosmos.implementation.RxDocumentClientImpl.initializeGatewayConfigurationReader(RxDocumentClientImpl.java:264)
at com.azure.cosmos.implementation.RxDocumentClientImpl.init(RxDocumentClientImpl.java:282)
at com.azure.cosmos.implementation.AsyncDocumentClient$Builder.build(AsyncDocumentClient.java:204)
at com.azure.cosmos.CosmosAsyncClient.<init>(CosmosAsyncClient.java:98)
at com.azure.cosmos.CosmosClientBuilder.buildAsyncClient(CosmosClientBuilder.java:649)
...
To Reproduce
Run the following code snippet. The code is executed during a test, while invoking it from @Test
and @BeforeClass
does not make a difference.
Code Snippet
new CosmosClientBuilder()
.endpoint(ENDPOINT)
.key(KEY)
.buildAsyncClient();
Expected behavior Client is created successfully and can be used to create database and container objects.
Setup (please complete the following information):
- OS: MacOS 10.15.6 (19G73)
- IDE : IntelliJ Ultimate 2020.1.4
- Java: openjdk version “11.0.8” 2020-07-14
- Library:
com.azure:azure-cosmos:4.3.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Async Java SDK v2 - Azure Cosmos DB - Microsoft Learn
PoolExhaustedException is a client-side failure. This failure indicates that your app workload is higher than what the SDK connection pool can ...
Read more >CHANGELOG.md - cosmos/cosmos-sdk - Sourcegraph
"Client Breaking" for breaking Protobuf, gRPC and REST routes used by end-users. "CLI Breaking" for breaking CLI commands.
Read more >Azure Cosmos DB SQL API client library for Python - PyPI
Create and modify containers to store collections of JSON documents; Create, read, update, and delete the items (JSON documents) in your containers; Query...
Read more >Stardog Platform Release Notes
There are multiple indices maintained by Stardog and as due to this bug the ... fails (#PLAT-3012); Cluster nodes expelled after sending a...
Read more >Henry Been – DevOps & Azure Architect | Consultant ...
' But again, if you are using a CRM, GitHub issues or bug-tracking software for recording and detailing bugs, it doesn't really make...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JanneKataja-TomTom - closing this issue since the key used was incorrect, hopefully it works fine with the right key 😃
It appears this bug was fixed as a part of #14742
Also, in case the domain name is incorrect, the exception is not thrown but instead the following error is logged in a loop: