Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] server reflection error #15108

Open
3 of 4 tasks
nfw999 opened this issue Feb 6, 2025 · 1 comment
Open
3 of 4 tasks

[Bug] server reflection error #15108

nfw999 opened this issue Feb 6, 2025 · 1 comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@nfw999
Copy link

nfw999 commented Feb 6, 2025

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

Dubbo 3.3.1、3.3.2、3.3.3 3.3.3 , jdk8

Steps to reproduce this issue

Create a project using the official scaffolding, set the Dubbo version to 3.3.1 or higher (Dubbo 3.3.0 is ok),set dubbo.tri.builtin.service.init=true.

Use grpcurl to execute the following command.

grpcurl -plaintext localhost:50051 list

What you expected to happen

The details of the exception log are as follows

2025-02-06 16:46:28`dealer.barn`springboot-api-test`ERROR`` [DUBBO] An error occurred while processing the http request with GrpcHttp2ServerTransportListener, Http2MetadataFrame{method='POST', path='/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo', contentType='application/grpc', streamId=3, endStream=false}, method=ServerReflectionInfo(ServerReflectionRequest), dubbo version: 3.3.3, current host: 10.xx.xx.xx, error code: 99-0. This may be caused by , go to https://dubbo.apache.org/faq/99/0 to find instructions. `
java.lang.NullPointerException: null
	at org.apache.dubbo.common.utils.UrlUtils.computeServiceAttribute(UrlUtils.java:694) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.buildRpcInvocation(AbstractServerTransportListener.java:281) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.http2.GenericHttp2ServerTransportListener.buildHttpMessageListener(GenericHttp2ServerTransportListener.java:94) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.grpc.GrpcHttp2ServerTransportListener.buildHttpMessageListener(GrpcHttp2ServerTransportListener.java:113) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.lambda$onMetadata$0(AbstractServerTransportListener.java:108) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:105) [dubbo-3.3.3.jar:3.3.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
	at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:39) [dubbo-3.3.3.jar:3.3.3]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
2025-02-06 16:46:28`dealer.barn`springboot-api-test`ERROR`` [DUBBO] Exception while executing runnable org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener$$Lambda$1617/551996024@31c81cee, dubbo version: 3.3.3, current host: 10.xx.xx.xx, error code: 0-19. This may be caused by , go to https://dubbo.apache.org/faq/0/19 to find instructions. `
java.lang.NullPointerException: value
	at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:39) ~[netty-common-4.1.112.Final.jar:4.1.112.Final]
	at io.netty.handler.codec.DefaultHeaders.set(DefaultHeaders.java:469) ~[netty-codec-4.1.112.Final.jar:4.1.112.Final]
	at org.apache.dubbo.remoting.http12.netty4.NettyHttpHeaders.set(NettyHttpHeaders.java:117) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.CompositeExceptionHandler.resolveGrpcStatus(CompositeExceptionHandler.java:82) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.ExceptionCustomizerWrapper.customizeGrpcStatus(ExceptionCustomizerWrapper.java:65) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.remoting.http12.AbstractServerHttpChannelObserver.customizeTrailers(AbstractServerHttpChannelObserver.java:334) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.remoting.http12.AbstractServerHttpChannelObserver.doOnCompleted(AbstractServerHttpChannelObserver.java:315) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.remoting.http12.AbstractServerHttpChannelObserver.onCompleted(AbstractServerHttpChannelObserver.java:301) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.remoting.http12.AbstractServerHttpChannelObserver.onError(AbstractServerHttpChannelObserver.java:132) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.http2.GenericHttp2ServerTransportListener.onError(GenericHttp2ServerTransportListener.java:154) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.onMetadataError(AbstractServerTransportListener.java:152) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.lambda$onMetadata$0(AbstractServerTransportListener.java:112) ~[dubbo-3.3.3.jar:3.3.3]
	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:105) [dubbo-3.3.3.jar:3.3.3]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
	at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:39) [dubbo-3.3.3.jar:3.3.3]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@nfw999 nfw999 added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Feb 6, 2025
@Stellar1999
Copy link
Contributor

PTAL @oxsean
It appears that the absence of a ServiceModel during the initialization of the gRPC-related URL object caused a NullPointerException (NPE) in the following code:

HeaderFilter[] headerFilters =  
    UrlUtils.computeServiceAttribute(invoker.getUrl(), HEADER_FILTERS_CACHE, this::loadHeaderFilters);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

2 participants