Git Product home page Git Product logo

Comments (4)

yawkat avatar yawkat commented on May 28, 2024 1

the setup in the docs changes slightly. your code is not the same as the docs, you likely used a previous version. please change it to match the docs.

in the medium term i think a micronaut-logbook module will have to be introduced.

from micronaut-core.

yawkat avatar yawkat commented on May 28, 2024

The netty pipeline is not stable between micronaut versions. you have to update customizers to work with new micronaut versions. The current logbook setup is described here: https://docs.micronaut.io/latest/guide/index.html#nettyServerPipeline

Also be aware that the logbook integration may stop working by default in 4.5.0 for http2. #10524

from micronaut-core.

ericsnx avatar ericsnx commented on May 28, 2024

@yawkat Thanks for the quick reply, I did not understand what exactly I need to update though, I actually used this exact link to set up my customizer, I'm not sure what i'm missing here.

from micronaut-core.

ericsnx avatar ericsnx commented on May 28, 2024

the setup in the docs changes slightly. your code is not the same as the docs, you likely used a previous version. please change it to match the docs.

in the medium term i think a micronaut-logbook module will have to be introduced.

Ok, I will try again then, Thanks.

Update: I literally copied and pasted the code form the docs and still I've got.

15:11:23.301 [default-nioEventLoopGroup-1-3] ERROR i.m.h.n.AbstractCompositeCustomizer - Failed to trigger customizer event
java.util.NoSuchElementException: micronaut-http-response
	at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1073)
	at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:248)
	at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:237)
	at com.example.LogbookNettyServerCustomizer$Customizer.onStreamPipelineBuilt(LogbookFactory.kt:63)
	at io.micronaut.http.netty.AbstractCompositeCustomizer.forEach(AbstractCompositeCustomizer.java:109)
	at io.micronaut.http.server.netty.CompositeNettyServerCustomizer.onStreamPipelineBuilt(CompositeNettyServerCustomizer.java:53)
	at io.micronaut.http.server.netty.HttpPipelineBuilder$ConnectionPipeline.configureForHttp1(HttpPipelineBuilder.java:383)
	at io.micronaut.http.server.netty.HttpPipelineBuilder$ConnectionPipeline.initChannel(HttpPipelineBuilder.java:299)
	at io.micronaut.http.server.netty.NettyHttpServer$Listener.initChannel(NettyHttpServer.java:892)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	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)

something is not right cc: @yawkat

I will leave this for now because I spend half day of work, maybe docs are outdated, not sure my project is available on gh if anyone feels like having a go.

from micronaut-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.