composer-rest-server未处理的“错误"事件 [英] composer-rest-server Unhandled 'error' event

查看:54
本文介绍了composer-rest-server未处理的“错误"事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I try composer-rest-server -c acme-admin@test-bna I get this output:

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)

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

I am actually doing a udemy course about how to setup a hyperledger multi org network.

推荐答案

错误显示端口3000繁忙.

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

EADDRINUSE means some process is already running on that port.

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

You can find the process by using the following command:

sudo ss -lptn 'sport = :3000'

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

It will return you process id, then you can kill it by:

sudo kill -9 process_id

这篇关于composer-rest-server未处理的“错误"事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆