我安装并启动了我的业务网络。现在我想做composer-rest-server -c admin@test-network
,但得到以下输出:
Discovering types from business network definition ...
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 (/home/dany/.nvm/versions/node/v8.15.0/lib/node_modules/composer-rest-server/cli.js:143:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
有趣的是,以前一切正常。然后,我重新启动结构并重新安装了bna文件,现在出现此错误。谢谢您的帮助
答案 0 :(得分:1)
看来您没有正确停止脚本,这就是为什么会出现此错误。当您的端口已被占用,并且您尝试在同一端口上启动某些操作时,将发生此错误。因此,您可以在该端口上终止进程,然后它应该可以正常工作。
如果您使用的是Linux OS,那么此命令可能会对您有所帮助。
fuser -n tcp -k 3000