Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

listen EADDRINUSE: address already in use :::8081

netstat -ano | findstr :<PORT>
taskkill //PID <PID> //F
OR
taskkill /PID <PID> /F
Comment

Error: listen EADDRINUSE: address already in use

//Run this command in cmd
taskkill /F /IM node.exe
Comment

Error: listen EADDRINUSE: address already in use

Find server pid:
	lsof -i tcp:5000 (the 5000 is the port number)
kill the server:
	kill -9 111119 (the 111119 is the pid)
Comment

error listen EADDRINUSE: address already in use :::8081.

First, you would want to know which process is using port 8081

sudo lsof -i :8081

this will list all PID listening on this port, once you have the PID you can terminate it with the following:

kill -9 {PID}     (in my case it was the 5182)
Comment

Error: listen EADDRINUSE: address already in use :::3001

NODE PORT
Comment

Error: listen EADDRINUSE: address already in use :::8080

For windows open Task Manager and find node.exe processes. 
Kill all of them with End Task.
Comment

Error: listen EADDRINUSE: address already in use

process.stdin.resume();//so the program will not close instantly

function exitHandler(options, exitCode) {
    if (options.cleanup) console.log('clean');
    if (exitCode || exitCode === 0) console.log(exitCode);
    if (options.exit) process.exit();
}

//do something when app is closing
process.on('exit', exitHandler.bind(null,{cleanup:true}));

//catches ctrl+c event
process.on('SIGINT', exitHandler.bind(null, {exit:true}));

// catches "kill pid" (for example: nodemon restart)
process.on('SIGUSR1', exitHandler.bind(null, {exit:true}));
process.on('SIGUSR2', exitHandler.bind(null, {exit:true}));

//catches uncaught exceptions
process.on('uncaughtException', exitHandler.bind(null, {exit:true}));
Comment

PREVIOUS NEXT
Code Example
Shell :: check my localhost command 
Shell :: configure git diff tool vscode 
Shell :: node sass generate css 
Shell :: how to setup blackeye 
Shell :: linux how to check version of package 
Shell :: last login linux 
Shell :: Linux Mint reset xfce-panel 
Shell :: parameter powershell 
Shell :: no matching manifest for linux/arm64/v8 in the manifest list entries mac 
Shell :: how to set environment variable in linux permanently 
Shell :: git upload folder 
Shell :: install activitywatch ubunut 
Shell :: E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? 
Shell :: extract audio from video ffmpeg 
Shell :: linux create user with home directory 
Shell :: kill all process linux 
Shell :: list all files by size 
Shell :: linux commands 
Shell :: bash show contents of file 
Shell :: git clone repo with name 
Shell :: stop port 
Shell :: start kafka locally 
Shell :: linux speed up video 
Shell :: install vlc on ubuntu 20.04 
Shell :: How To Install the Apache Web Server on Ubuntu 18.04 
Shell :: gh create github repo 
Shell :: docker-compose ps 
Shell :: $() vs `` bash 
Shell :: how to install unsigned drivers on windows 10 
Shell :: how to check if helm is installed 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =