composer-rest-server未处理的“错误”事件

时间:2019-02-12 10:05:16

标签: hyperledger hyperledger-composer

当我尝试composer-rest-server -c acme-admin@test-bna时,得到以下输出:

Discovering the Returning Transactions..
Discovered types from business network definition
Generating schemas for all types in business network definition ...
Generated schemas for all types in business network definition
Adding schemas for all types to Loopback ...
Added schemas for all types to Loopback
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Server.setupListenHandle [as _listen2] (net.js:1360:14)
    at listenInCluster (net.js:1401:12)
    at Server.listen (net.js:1485:7)
    at module.exports.promise.then.then (/usr/local/lib/node_modules/composer-rest-server/cli.js:143:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

我实际上正在做关于如何设置超级账本多组织网络的粗略课程。

2 个答案:

答案 0 :(得分:2)

错误显示端口3000处于繁忙状态。

EADDRINUSE表示该端口上已在运行某些进程。

您可以使用以下命令找到该过程:

sudo ss -lptn 'sport = :3000'

它将返回您的进程ID,然后可以通过以下方法将其杀死:

sudo kill -9 process_id

答案 1 :(得分:0)

问题是端口3000上正在运行某些进程。此命令已将其修复。

fuser -n tcp -k 3000