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

问题描述 投票:0回答:2

当我尝试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)

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

hyperledger hyperledger-composer
2个回答
2
投票

错误显示端口3000正忙。

EADDRINUSE意味着某个进程已在该端口上运行。

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

sudo ss -lptn 'sport = :3000'

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

sudo kill -9 process_id

0
投票

问题是某个进程在端口3000上运行。此命令修复了它。

fuser -n tcp -k 3000
© www.soinside.com 2019 - 2024. All rights reserved.