2017-01-31 34 views
1
Alexs-MacBook-Pro:build alexnordhausen$ gulp server:start 
[21:11:22] Using gulpfile ~/Documents/Kanvasroom_Support/kanvasroom/build/gulpfile.js 
[21:11:22] Starting 'env:dev'... 
Application loaded using the "development" environment configuration 

[21:11:22] Finished 'env:dev' after 6.25 ms 
[21:11:22] Starting 'server:start'... 
[21:11:22] Finished 'server:start' after 1.95 ms 
[21:11:22] [nodemon] 1.11.0 
[21:11:22] [nodemon] to restart at any time, enter `rs` 
[21:11:22] [nodemon] watching: *.* 
[21:11:22] [nodemon] starting `node --debug=5858 --trace-warnings server.js` 
Server started, be sure the user content server is also running with gulp user-content 
Live-build the client with gulp web:dist 

Debugger listening on 127.0.0.1:5858 
[Busy] Launching SocketCluster 
Error: listen EADDRINUSE 127.0.0.1:5858 
at Object.exports._errnoException (util.js:1022:11) 
at exports._exceptionWithHostPort (util.js:1045:20) 
at Agent.Server._listen2 (net.js:1262:14) 
at listen (net.js:1298:10) 
at doListening (net.js:1397:7) 
at _combinedTickCallback (internal/process/next_tick.js:77:11) 
at process._tickCallback (internal/process/next_tick.js:98:9) 

沒有任何運行的幽靈進程...這工作得很好,直到我做了一個新的npm安裝整個項目。思考?錯誤:Mac上的EADDRINUSE - 即使沒有使用端口?

回答

4

根據日誌,您正在使用羣集。您可能試圖在同一個端口上偵聽每個子進程,這會在發生第二個子進程時拋出錯誤。

+0

我以前不需要這麼做嗎? – Alex

+0

@Alex您應該在主進程中偵聽,並嘗試使用其他方式管理具有子進程的任務。 – Vikas

+0

但是,這又是30分鐘前的工作。除了從我的回購中提取一組新代碼之外,我什麼也沒有改變。 – Alex

0

當多於兩個應用程序使用單個portno時,會出現此錯誤。

Use this command 
1) `netstat -tulpn` (Commans for show all the process on server) 
2) then kill the process with the process number. like kill 2043 
0

我可以在自己的日誌中看到:

你的主服務器開始127.0.0.1:5858。

然後SocketCluster嘗試開始於127.0.0.1:5858

所以,如果你在一臺服務器已經是5858端口,那麼如何才能其它服務器使用的5858?

因此,請更換解決問題的端口。

相關問題