Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
#ERN/USDT analysis :
#ERN is currently in an uptrend, trading above the 200 Exponential Moving Average (EMA). The price has recently bounced back and broken out above the trendline, suggesting a potential continuation of the uptrend. The price is anticipated to move upside and test the swing high level.
TF : 30min
Entry : $1.704
Target : $1.992
SL : $1.620
#ERN/USDT analysis :
#ERN is currently in a bearish trend, characterized by a series of lower lows (LLs) and lower highs (LHs) while adhering to the trendline. The price is anticipated to continue this direction, testing lower levels in the near future.
TF : 1D
Entry : $2.230
Target : $1.610
SL : $2.608
#ERN/USDT analysis :
#ERN has broken out above the 200 EMA and is currently consolidating above it. The price is expected to sustain its bullish momentum and is likely to continue its upward trajectory.
TF : 4h
Entry : $2.277
Target : $2.554
SL : $2.088