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

初始化成功 配置完 interface 后 访问dependencies下接口方法抛出异常 #97

Open
iakoug opened this issue Dec 25, 2018 · 5 comments

Comments

@iakoug
Copy link

iakoug commented Dec 25, 2018

'use strict'
const ZookeeperDubbo = require('node-zookeeper-dubbo')

const Dubbo = new ZookeeperDubbo({
  application: { name: 'maldives' },
  registry: '10.81.68.173:2181',
  dubboVer: '2.6.2',
  // root: 'dubbo',
  dependencies: {
    provider:{
      interface: 'com.yupaopao.activity.ypp.dto.service.SoundCardService',
      // version: 'TEST',
      // group: 'maldivesdubbotest',
      timeout: 6000
    }
  }
})

Dubbo.on('service:changed', event => console.log(event))

// 初始化成功后 init done

Dubbo.provider.upload() // 抛出异常

// php调的通 这个方法已经访问的到 但是在 node里面 会报 找不到服务

(node:97667) UnhandledPromiseRejectionWarning: com.alibaba.dubbo.remoting.RemotingException: Not found exported service: com.yupaopao.activity.ypp.dto.service.SoundCardService:20884 in [com.yupaopao.activity.ypp.dto.service.HelloService:TEST:20884, com.yupaopao.activity.ypp.dto.service.SoundCardService:TEST:20884, com.yupaopao.activity.ypp.dto.service.CommentService:TEST:20884], may be version or group mismatch , channel: consumer: /192.168.16.32:63270 --> provider: /10.111.3.54:20884, message:RpcInvocation [methodName=upload, parameterTypes=[], arguments=[], attachments={path=com.yupaopao.activity.ypp.dto.service.SoundCardService,input=227, dubbo=2.6.2, interface=com.yupaopao.activity.ypp.dto.service.SoundCardService, version=null, timeout=6000}]
com.alibaba.dubbo.remoting.RemotingException: Not found exported service: com.yupaopao.activity.ypp.dto.service.SoundCardService:20884 in [com.yupaopao.activity.ypp.dto.service.HelloService:TEST:20884, com.yupaopao.activity.ypp.dto.service.SoundCardService:TEST:20884, com.yupaopao.activity.ypp.dto.service.CommentService:TEST:20884], may be version or group mismatch , channel: consumer: /192.168.16.32:63270 --> provider: /10.111.3.54:20884, message:RpcInvocation [methodName=upload, parameterTypes=[], arguments=[], attachments={path=com.yupaopao.activity.ypp.dto.service.SoundCardService, input=227, dubbo=2.6.2, interface=com.yupaopao.activity.ypp.dto.service.SoundCardService, version=null, timeout=6000}]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:212)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:78)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:96)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:172)
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:80)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

(node:97667) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:97667) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@iakoug iakoug changed the title 初始化成功 配置完 interface 后 访问不到dependencies下自定义的名称 初始化成功 配置完 interface 后 访问dependencies下接口方法抛出异常 Dec 25, 2018
@omnip620
Copy link
Owner

Dubbo.provider.upload().then(console.log).catch(console.error);
打印一下看看

@xiaojinhe2
Copy link

楼主你说的那个问题有没解决啊

@iakoug
Copy link
Author

iakoug commented Apr 2, 2019

楼主你说的那个问题有没解决啊

当时没解决 提了issues和给owner发了邮件没回,后改用拿java的jar包,node用eggjs相关配合egg-dubbbo-rpc、egg-rpc-generator等插件自行解析的jar包方法使用

@iakoug
Copy link
Author

iakoug commented Apr 2, 2019

楼主你说的那个问题有没解决啊

当时没解决 提了issues和给owner发了邮件没回,后改用拿java的jar包,node用eggjs相关配合egg-dubbbo-rpc、egg-rpc-generator等插件自行解析的jar包方法使用

如果不由node层自行解析jar包而该仓库使用过程有问题的话可以尝试使用zoodubbo这个包,我这里是可用的,我使用相关具体的在这: https://github.com/rollawaypoint/node-zoodubbo-rpc

@yxy9022
Copy link

yxy9022 commented Nov 8, 2019

我也出现了这个问题,有解决的吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants