当我尝试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)
我实际上正在做关于如何设置超级账本多组织网络的粗略课程。
答案 0 :(得分:2)
错误显示端口3000
处于繁忙状态。
EADDRINUSE
表示该端口上已在运行某些进程。
您可以使用以下命令找到该过程:
sudo ss -lptn 'sport = :3000'
它将返回您的进程ID,然后可以通过以下方法将其杀死:
sudo kill -9 process_id
答案 1 :(得分:0)
问题是端口3000上正在运行某些进程。此命令已将其修复。
fuser -n tcp -k 3000