question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Failing Spring startup with CosmosDB on Azure

See original GitHub issue

Describe the bug When starting my Spring app on an Azure App Service I get a NoSuchElementException. Application Insights shows GET /addresses/ prior to the exception

Exception or Stack Trace

Report this azure-cosmos issue to ensure it is addressed:
[ChannelHandlerContext(RntbdRequestManager#0, [id: 0xcd8ed54d, L:/***:54350 - R:***westeurope.documents.azure.com/***:17994])]
[com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdRequestManager.reportIssue(RntbdRequestManager.java:957)]
[SslHandshakeCompletionEvent(SUCCESS): : java.util.NoSuchElementException: io.opentelemetry.javaagent.instrumentation.netty.common.client.NettySslInstrumentationHandler
at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1073)
at io.netty.channel.DefaultChannelPipeline.addAfter(DefaultChannelPipeline.java:302)
at io.netty.channel.DefaultChannelPipeline.addAfter(DefaultChannelPipeline.java:290)
at com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdRequestManager.userEventTriggered(RntbdRequestManager.java:396)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
at io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered(ChannelInboundHandlerAdapter.java:117)
at io.netty.handler.codec.ByteToMessageDecoder.userEventTriggered(ByteToMessageDecoder.java:368)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireUserEventTriggered(CombinedChannelDuplexHandler.java:430)
at io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered(ChannelInboundHandlerAdapter.java:117)
at io.netty.handler.codec.ByteToMessageDecoder.userEventTriggered(ByteToMessageDecoder.java:368)
at io.netty.channel.CombinedChannelDuplexHandler.userEventTriggered(CombinedChannelDuplexHandler.java:241)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
at io.opentelemetry.javaagent.instrumentation.netty.common.client.NettySslInstrumentationHandler.userEventTriggered(NettySslInstrumentationHandler.java:104)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
at io.netty.handler.ssl.SslHandler.setHandshakeSuccess(SslHandler.java:1838)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1360)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:487)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:385)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
]

Setup:

  • Spring Boot 2.7.2
  • Spring Cloud Azure 4.4.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yiliuTocommented, Oct 11, 2022

Hi @kushagraThapar could you help to take a look of this issue? Besides, @ViktorZieg could you provide which Spring Cloud Azure library you are using?

0reactions
ViktorZiegcommented, Oct 14, 2022

I could not create a sample app, where this occurs. Also I could not find anything poining to opentelemetry. For now, I just downgraded to the latest working solution. I close this, because there seems to be a solution to the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue while connecting Azure cosmos DB from my spring boot ...
1 Answer. Hi @SrivastavaVivekK-8343, welcome to Microsoft Q&A forum. From the problem description, it seems while you are connecting your  ...
Read more >
Spring Boot - Azure Cosmos DB Change Feed process failing ...
How to update the cosmos master key in change feed process while it is in running state. I am using Change feed process...
Read more >
How to use Azure Cosmos DB from your Spring Boot App
... Brown welcomes Principal Cloud Advocate Mark Heckler to the show to discuss using Azure Cosmos DB as a data store for your...
Read more >
Unable to run time triggered function with CosmosDB Binding ...
Related Query · Unable to run time triggered function with CosmosDB Binding in Azure as SpringBoot App · Azure Function with Spring Boot...
Read more >
How to use Cosmos DB with Spring Boot Reactive(WebFlux)
And, to make this example a bit more interesting I have decided to show how to use Azure Cosmos DB with Java.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found