fabric报错events.js:183 throw er; // Unhandled ‘error’ event
报错信息如下:
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::4000
at Server.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at Server.listen (net.js:1485:7)
at Object.<anonymous> (/home/cielo/go/src/github.com/hyperledger/fabric/fabric-samples/balance-transfer/app.js:92:37)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
原因
node没有关闭
解决方案
查看当前进程,找node的进程号
lsof -i
关闭进程
kill -9 [进程号]
如下图所示