FATALポート4000 has been used.Try other pot instead.
1240 ワード
最近ブログを作る時:hexo sブログを見る時、4000ポートの問題を提示します。
サイト下のファイル_config.ymlには下記のコードを加えてhexo-server運転時のポート番号を変更します。
$ hexo server
FATAL Port 4000 has been used. Try other port instead.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do
Error: listen EADDRINUSE 0.0.0.0:4000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
FATAL listen EADDRINUSE 0.0.0.0:4000
Error: listen EADDRINUSE 0.0.0.0:4000
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at net.js:1403:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
ソリューション:サイト下のファイル_config.ymlには下記のコードを加えてhexo-server運転時のポート番号を変更します。
server:
port: 4001 # , 4000
compress: true
header: true
もう一つはサービス開始にスローガンをつけることです。hexo server -p 4001