记一次dubbo直连调试遇到的坑
作者:互联网
dubbo直连调试遇到Not found exported service:
org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: queryOrderSysDic, provider: dubbo://127.0.0.1:20880/com.shiqiao.order.trade.api.sysdic.OrderSysDicService?application=demo&check=false&interface=com.shiqiao.order.trade.api.sysdic.OrderSysDicService&lazy=false&pid=50616&qos.enable=false®ister.ip=10.3.1.106&remote.application=&revision=1.0.0-20211008.101345-109&side=consumer&sticky=false, cause: org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.remoting.RemotingException: Not found exported service: com.shiqiao.order.trade.api.sysdic.OrderSysDicService:20880 in [com.shiqiao.order.trade.api.AuditResultService:1.0.0:20880, com.shiqiao.order.trade.api.sysdic.OrderSysDicService:1.0.0:20880, com.shiqiao.order.trade.api.CancelOrderService:1.0.0:20880, com.shiqiao.order.trade.api.QueryOrderService:1.0.0:20880, com.shiqiao.order.trade.api.OrderFundContractRecordService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseMortgageService:1.0.0:20880, com.shiqiao.order.trade.asset.appservice.IGpsInfoService:20880, com.shiqiao.order.trade.api.IBfsService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseGpsInfoService:1.0.0:20880, com.shiqiao.order.trade.api.GetDataCheckService:1.0.0:20880, com.shiqiao.order.trade.api.BlackListService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectContractService:1.0.0:20880, com.shiqiao.order.trade.api.OrderEnterpriseCertInfoService:1.0.0:20880, com.shiqiao.order.trade.api.PayOrderService:1.0.0:20880, com.shiqiao.order.trade.flow.IFLowCommService:20880, com.shiqiao.order.trade.api.LendingService:1.0.0:20880, com.shiqiao.order.trade.flow.api.FlowInitiateService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectFilesCheckService:1.0.0:20880, com.shiqiao.order.trade.api.FileCfgConditionService:1.0.0:20880, com.shiqiao.order.trade.api.FinancialQuotationService:1.0.0:20880, com.shiqiao.order.trade.api.OrderLeaseInfoService:1.0.0:20880, com.shiqiao.order.trade.api.OrderBankInfoService:1.0.0:20880, com.shiqiao.order.trade.api.IFinancialInsService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseGpsApplyService:1.0.0:20880, com.shiqiao.order.trade.api.PlaceLeaseOrderService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseCertificateService:1.0.0:20880, com.shiqiao.order.trade.api.FinancialPayTableService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectFileService:1.0.0:20880, com.shiqiao.order.trade.api.InsurancePolicyService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseLicenseAgenciesService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseVehicleLicenseService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseInvoiceService:1.0.0:20880, com.shiqiao.order.trade.api.OrderPayTableService:1.0.0:20880, com.shiqiao.order.trade.api.IFlowNodeTaskService:1.0.0:20880, com.shiqiao.order.trade.api.OrderRouteService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectCustomerService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectLinkCompanyService:1.0.0:20880], may be version or group mismatch , channel: consumer: /10.3.1.106:60419 --> provider: /10.3.1.106:20880, message:RpcInvocation [methodName=queryOrderSysDic, parameterTypes=[class com.shiqiao.order.trade.dto.req.sys.QueryOrderSysDicReq], arguments=[QueryOrderSysDicReq(sysCode=null, orgCode=null, codeType=null)], attachments={path=com.shiqiao.order.trade.api.sysdic.OrderSysDicService, input=388, dubbo=2.0.2, interface=com.shiqiao.order.trade.api.sysdic.OrderSysDicService, version=0.0.0}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: com.shiqiao.order.trade.api.sysdic.OrderSysDicService:20880 in [com.shiqiao.order.trade.api.AuditResultService:1.0.0:20880, com.shiqiao.order.trade.api.sysdic.OrderSysDicService:1.0.0:20880, com.shiqiao.order.trade.api.CancelOrderService:1.0.0:20880, com.shiqiao.order.trade.api.QueryOrderService:1.0.0:20880, com.shiqiao.order.trade.api.OrderFundContractRecordService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseMortgageService:1.0.0:20880, com.shiqiao.order.trade.asset.appservice.IGpsInfoService:20880, com.shiqiao.order.trade.api.IBfsService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseGpsInfoService:1.0.0:20880, com.shiqiao.order.trade.api.GetDataCheckService:1.0.0:20880, com.shiqiao.order.trade.api.BlackListService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectContractService:1.0.0:20880, com.shiqiao.order.trade.api.OrderEnterpriseCertInfoService:1.0.0:20880, com.shiqiao.order.trade.api.PayOrderService:1.0.0:20880, com.shiqiao.order.trade.flow.IFLowCommService:20880, com.shiqiao.order.trade.api.LendingService:1.0.0:20880, com.shiqiao.order.trade.flow.api.FlowInitiateService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectFilesCheckService:1.0.0:20880, com.shiqiao.order.trade.api.FileCfgConditionService:1.0.0:20880, com.shiqiao.order.trade.api.FinancialQuotationService:1.0.0:20880, com.shiqiao.order.trade.api.OrderLeaseInfoService:1.0.0:20880, com.shiqiao.order.trade.api.OrderBankInfoService:1.0.0:20880, com.shiqiao.order.trade.api.IFinancialInsService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseGpsApplyService:1.0.0:20880, com.shiqiao.order.trade.api.PlaceLeaseOrderService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseCertificateService:1.0.0:20880, com.shiqiao.order.trade.api.FinancialPayTableService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectFileService:1.0.0:20880, com.shiqiao.order.trade.api.InsurancePolicyService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseLicenseAgenciesService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseVehicleLicenseService:1.0.0:20880, com.shiqiao.order.trade.api.LeaseInvoiceService:1.0.0:20880, com.shiqiao.order.trade.api.OrderPayTableService:1.0.0:20880, com.shiqiao.order.trade.api.IFlowNodeTaskService:1.0.0:20880, com.shiqiao.order.trade.api.OrderRouteService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectCustomerService:1.0.0:20880, com.shiqiao.order.trade.api.ProjectLinkCompanyService:1.0.0:20880], may be version or group mismatch , channel: consumer: /10.3.1.106:60419 --> provider: /10.3.1.106:20880, message:RpcInvocation [methodName=queryOrderSysDic, parameterTypes=[class com.shiqiao.order.trade.dto.req.sys.QueryOrderSysDicReq], arguments=[QueryOrderSysDicReq(sysCode=null, orgCode=null, codeType=null)], attachments={path=com.shiqiao.order.trade.api.sysdic.OrderSysDicService, input=388, dubbo=2.0.2, interface=com.shiqiao.order.trade.api.sysdic.OrderSysDicService, version=0.0.0}]
经过查看日志
发现请求过去的连接没有带版本号,本地服务找不到请求的那个服务
但是自己配置是带了版本号的
经过查看dubbo服务导出源码
配置url直连的情况下,协议不为registry的情况下,
在org.apache.dubbo.rpc.cluster.support.ClusterUtils#mergeUrl这个方法中,将version,group等参数移除了
导致导入的直连的服务,配置的一些版本号参数无效。
如果想调通的话需要服务端也不配置版本号。
标签:直连,dubbo,20880,trade,api,com,order,调试,shiqiao 来源: https://blog.csdn.net/project_shuai/article/details/120675457