isxiaochen / Chen-API

一个丰富的API开放调用平台,为开发者提供便捷、实用、安全的API调用体验
77 stars 4 forks source link

dubbo 报错 #1

Open sunny-cgw opened 1 year ago

sunny-cgw commented 1 year ago

我是直接拉去代码运行,报

java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. at org.apache.dubbo.remoting.transport.CodecSupport.checkSerialization(CodecSupport.java:167) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:137) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:92) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) [dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) [dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) [dubbo-3.0.9.jar:3.0.9] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) [dubbo-3.0.9.jar:3.0.9] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] 和无法找到提供给它的服务提供者 org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: getMetadataInfo, provider: dubbo://192.168.246.1:20880/org.apache.dubbo.metadata.MetadataService?connections=1&corethreads=2&dubbo=2.0.2&group=dubbo&port=20880&protocol=dubbo&release=3.0.9&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0, cause: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. at org.apache.dubbo.remoting.transport.CodecSupport.checkSerialization(CodecSupport.java:167) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:137) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:92) at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) at java.lang.Thread.run(Thread.java:745) api-backed无法启动

isxiaochen commented 1 year ago

我尚未完全将代码上传到github中,因为我还在持续优化项目。不过你这个问题是你未将服务注册到注册中心中,请自己根据错误检查服务是否注册成功

------------------ 原始邮件 ------------------ 发件人: "isxiaochen/Chen-API" @.>; 发送时间: 2023年8月4日(星期五) 晚上11:01 @.>; @.***>; 主题: [isxiaochen/Chen-API] dubbo 报错 (Issue #1)

我是直接拉去代码运行,报

java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. at org.apache.dubbo.remoting.transport.CodecSupport.checkSerialization(CodecSupport.java:167) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:137) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:92) ~[dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) [dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) [dubbo-3.0.9.jar:3.0.9] at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) [dubbo-3.0.9.jar:3.0.9] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) [dubbo-3.0.9.jar:3.0.9] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] 和无法找到提供给它的服务提供者 org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: getMetadataInfo, provider: dubbo://192.168.246.1:20880/org.apache.dubbo.metadata.MetadataService?connections=1&corethreads=2&dubbo=2.0.2&group=dubbo&port=20880&protocol=dubbo&release=3.0.9&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0, cause: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. java.io.IOException: Service org.apache.dubbo.metadata.MetadataService with version 1.0.0 not found, invocation rejected. at org.apache.dubbo.remoting.transport.CodecSupport.checkSerialization(CodecSupport.java:167) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:137) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:92) at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) at org.apache.dubbo.remotin发送g.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) at java.lang.Thread.run(Thread.java:745) api-backed无法启动

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

sunny-cgw commented 1 year ago

问题的解决:1.在package com.yupi.springbootinit.controller中的类上的 private InnerOrderService innerOrderService;添加 @DubboReference(check = false),成功启动