egg-sofa-rpc
egg-sofa-rpc copied to clipboard
SOFARPC plugin for egg
我在参照[自定义服务发现](https://github.com/eggjs/egg-sofa-rpc/wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9C%8D%E5%8A%A1%E5%8F%91%E7%8E%B0%E5%AE%9E%E7%8E%B0)对接Nacos注册中心,报了如下错误: 2021-01-20 11:36:18,583 ERROR 65967 [-/::1/0a0a6a311611113778559100165967/23ms GET /] nodejs.RpcSocketCloseError: The socket was closed. (address: address => bolt://127.0.0.1:8848) at RpcConnection._cleanRequest (/Users/question/code/company/demo-app-service/node_modules/sofa-rpc-node/lib/client/connection/rpc.js:257:13) at RpcConnection._handleClose (/Users/question/code/company/demo-app-service/node_modules/sofa-rpc-node/lib/client/connection/rpc.js:277:10) at Socket. (/Users/question/code/company/demo-app-service/node_modules/sofa-rpc-node/lib/client/connection/rpc.js:86:45) at Object.onceWrapper (events.js:422:26) at...
我看到您的文档中给出了下面这段例子来说明如何定义rpc server: ```javascript // 3. Implemenation the RPC Interface // Put your implementation code under ${app_root}/app/rpc folder // ${app_root}/app/rpc/ProtoService.js exports.echoObj = async function(req) { return { code: 200, message: 'hello...
should invoke ProtoService: **TypeError: app.rpcRequest is not a function** ``` import mm from 'egg-mock'; describe('test/app/rpc/ProtoService.test.ts', () => { let app; before(async function() { app = mm.app({ baseDir: 'app/rpcserver', }); await...
上面说错了。应该是在config.default.js中 应该是config.rpc 而不是config.sofaRpc `config.rpc = { registry: { address: '127.0.0.1:2181', // zk 地址指向本地 2181 端口 }, };`
我看到服务在zookeeper中注册的默认端口是12200,请问要在哪里设置为其他端口呢?感谢。