Closed madhushreegc closed 2 years ago
Describe the bug Not able to connect to cosmos db from wildfly application server , for development I have used azure-sosmos-4.30.0 sdk.
Expected behavior Should create CosmosAsyncClient
Actual behavior I see this error when trying to create CosmosAsyncClient .
2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) 08:21:51.976 [reactor-http-epoll-1] ERROR com.azure.cosmos.implementation.RxGatewayStoreModel - Network failure 2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) io.netty.channel.StacklessClosedChannelException: null 2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source) ~[netty-transport-4.1.65.Final.jar:4.1.65.Final] 2022-06-13 08:21:51,978 INFO [stdout] (reactor-http-epoll-1) 08:21:51.977 [reactor-http-epoll-1] ERROR com.azure.cosmos.implementation.GlobalEndpointManager - Fail to reach location any of locations West US {"innerErrorMessage":null,"cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.30.0 Linux/4.18.0-193.75.1.el8_2.x86_64 JRE/1.8.0_332","activityId":null,"requestLatencyInMs":5,"requestStartTimeUTC":"2022-06-13T08:21:51.972Z","requestEndTimeUTC":"2022-06-13T08:21:51.977Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":[],"retryContext":{"statusAndSubStatusCodes":null,"retryLatency":0,"retryCount":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatistics":{"sessionToken":null,"operationType":"Read","resourceType":"DatabaseAccount","statusCode":503,"subStatusCode":10001,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionAcquired","startTimeUTC":"2022-06-13T08:21:51.972Z","durationInMicroSec":5000},{"eventName":"connectionConfigured","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"requestSent","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"transitTime","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"received","startTimeUTC":null,"durationInMicroSec":0}],"partitionKeyRangeId":null,"exceptionMessage":null,"exceptionResponseHeaders":"{x-ms-substatus=10001}"},"systemInformation":{"usedMemory":"109745 KB","availableMemory":"356687 KB","systemCpuLoad":"empty","availableProcessors":4},"clientCfgs":{"id":1,"machineId":"uuid:bd7df75e-a13d-48f4-9a71-2751a22ec152","connectionMode":"DIRECT","numberOfClients":1,"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, p:false)","other":"(ed: true, cs: false)"},"consistencyCfg":"(consistency: null, mm: true, prgns: [westus])"}}}
2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) 08:21:51.976 [reactor-http-epoll-1] ERROR com.azure.cosmos.implementation.RxGatewayStoreModel - Network failure 2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) io.netty.channel.StacklessClosedChannelException: null 2022-06-13 08:21:51,976 INFO [stdout] (reactor-http-epoll-1) at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source) ~[netty-transport-4.1.65.Final.jar:4.1.65.Final]
2022-06-13 08:21:51,978 INFO [stdout] (reactor-http-epoll-1) 08:21:51.977 [reactor-http-epoll-1] ERROR com.azure.cosmos.implementation.GlobalEndpointManager - Fail to reach location any of locations West US {"innerErrorMessage":null,"cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.30.0 Linux/4.18.0-193.75.1.el8_2.x86_64 JRE/1.8.0_332","activityId":null,"requestLatencyInMs":5,"requestStartTimeUTC":"2022-06-13T08:21:51.972Z","requestEndTimeUTC":"2022-06-13T08:21:51.977Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":[],"retryContext":{"statusAndSubStatusCodes":null,"retryLatency":0,"retryCount":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatistics":{"sessionToken":null,"operationType":"Read","resourceType":"DatabaseAccount","statusCode":503,"subStatusCode":10001,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionAcquired","startTimeUTC":"2022-06-13T08:21:51.972Z","durationInMicroSec":5000},{"eventName":"connectionConfigured","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"requestSent","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"transitTime","startTimeUTC":null,"durationInMicroSec":0},{"eventName":"received","startTimeUTC":null,"durationInMicroSec":0}],"partitionKeyRangeId":null,"exceptionMessage":null,"exceptionResponseHeaders":"{x-ms-substatus=10001}"},"systemInformation":{"usedMemory":"109745 KB","availableMemory":"356687 KB","systemCpuLoad":"empty","availableProcessors":4},"clientCfgs":{"id":1,"machineId":"uuid:bd7df75e-a13d-48f4-9a71-2751a22ec152","connectionMode":"DIRECT","numberOfClients":1,"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, p:false)","other":"(ed: true, cs: false)"},"consistencyCfg":"(consistency: null, mm: true, prgns: [westus])"}}}
Environment summary SDK Version:4.30.0 Java JDK version:8 OS Version (e.g. Windows, Linux, MacOSX) : Linux
Additional context If I run simple java problem , it works but within wildfly it is not . Please help me to resolve this issue.
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); CosmosAsyncClient client = new CosmosClientBuilder() .endpoint("https://xxxxx.documents.azure.com:443/") .credential(tokenCredential) .preferredRegions(Arrays.asList("West US")) .buildAsyncClient();
Code snippet I have used to create:
There was a mismatch in the netty version . I updated and issue is resolved.
Thank you , I am closing this issue.
Describe the bug Not able to connect to cosmos db from wildfly application server , for development I have used azure-sosmos-4.30.0 sdk.
Expected behavior Should create CosmosAsyncClient
Actual behavior I see this error when trying to create CosmosAsyncClient .
Environment summary SDK Version:4.30.0 Java JDK version:8 OS Version (e.g. Windows, Linux, MacOSX) : Linux
Additional context If I run simple java problem , it works but within wildfly it is not . Please help me to resolve this issue.
Code snippet I have used to create: