You need to get process id of program using tcp port 3000. To get process id
lsof -i tcp:3000 -t
And then using that process id, simply kill process using ubuntu kill command.
kill -9 pid
Or just run below mentioned combine command. It will first fetch pid and then kill that process.
kill -9 $(lsof -i tcp:3000 -t)