Port 8080 is not open on localhost, could not start Firestore Emulator. (How to terminate Firebase emulator)

error: port 5000 is not open, could not start functions emulator
firebase emulators:start --inspect-functions       
Debugger listening on ws://127.0.0.1:55442/7f867690-a2b9-4197-9a00-5c588a9fc6e7
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
i emulators: Starting emulators: functions, firestore, hosting
⚠ functions: You are running the functions emulator in debug mode (port=9229). This means that functions will execute in sequence rather than in parallel.
⚠ functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: database, pubsub
⚠ Your requested "node" version "10" doesn't match your global version "14"
i emulators: Shutting down emulators.
i functions: Stopping Functions Emulator
i hub: Stopping emulator hub
⚠ firestore: Port 8080 is not open on localhost, could not start Firestore Emulator.
⚠ firestore: To select a different host/port, specify that host/port in a firebase.json config file:
{
// ...
"emulators": {
"firestore": {
"host": "HOST",
"port": "PORT"
}
}
}
i emulators: Shutting down emulators.
Error: Could not start Firestore Emulator, port taken.Having trouble? Try firebase [command] --help
Waiting for the debugger to disconnect...

Solution

~ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 5676 fredriccliver 129u IPv6 0xfff21bfd3e63ceb1 0t0 TCP localhost:http-alt (LISTEN)
java 5676 fredriccliver 138u IPv6 0xfff21bfd41959211 0t0 TCP localhost:65262->localhost:http-alt (ESTABLISHED)
java 5676 fredriccliver 139u IPv6 0xfff21bfd3f8195d1 0t0 TCP localhost:http-alt->localhost:65262 (ESTABLISHED)
~ ps ax | grep 5676
5676 ?? Ss 0:07.26 /usr/bin/java -Duser.language=en -jar /Users/fredriccliver/.cache/firebase/emulators/cloud-firestore-emulator-v1.11.7.jar --host localhost --port 8080 --functions_emulator localhost:5001
10537 s003 S+ 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn 5676
~ kill 5676
~ ps ax | grep 5676
10657 s003 S+ 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn 5676

Collapsing into one command

~ lsof -ti tcp:8080 | xargs kill

--

--

--

Majored in Physics, self-taught and worked in the IT industry as a Dev/Design/Planning for 11 years. And I had run my Startup for 3 years. I fancy a ☔️ 🇬🇧

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building Retro style Horror game that stand out using GameBoy Effects in Unity 🎨

Verify given string is palindrome or not with rearrange form?

Arithmetic vs Log Stock Returns in Python

Relationships in Ruby = 1, Soccer = nil

Create Voiceover With A Free AI Voice Generator

Getting started with AWS

Progressive Web Apps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fredric Cliver

Fredric Cliver

Majored in Physics, self-taught and worked in the IT industry as a Dev/Design/Planning for 11 years. And I had run my Startup for 3 years. I fancy a ☔️ 🇬🇧

More from Medium

How to use Angel Broking Smart API Web Socket in Flutter || How to Decode Angel Broking Smart API…

Simple restream clone using liquidsoap

Automatic/One-Tap SMS Verification with the Google’s SMS Retriever API/ SMS User Consent API (Part…

Flutter 3.0 Released By Google: Top 10 New Features You Should Know