Parse-dashboard: events.js:160 throw er; // Unhandled 'error' event

Created on 6 Jun 2016  路  34Comments  路  Source: parse-community/parse-dashboard

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • [X] You're running version >=2.1.4 of Parse Server.
  • [x] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

Steps to reproduce

Logs/Trace

Note: If you get a browser JS error please run npm run dev. This will provide source maps and a much more useful stack trace.

events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE 0.0.0.0:4040
at Object.exports._errnoException (util.js:1007:11)
at exports._exceptionWithHostPort (util.js:1030:20)
at Server._listen2 (net.js:1253:14)
at listen (net.js:1289:10)
at net.js:1399:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Most helpful comment

That error means you are already running something else on port 4040. Maybe another copy of the dashboard?

All 34 comments

That error means you are already running something else on port 4040. Maybe another copy of the dashboard?

Thanks Drew! EADDRINUSE does say ADDRess IN USE
I changed 8081 in my example to 7878 that I've used before that I knew was open and all is well.

Then how to stop the already running dashboard

killall -9 node

This is interesting because I do have anything that shows that I have another process running on another port. @nickjf89 I've tried to use this command, but there are no processes that can be found. I get this error when I use gulp, "gulp wiredep"

probably port is already in use so try below code
sudo pkill node

Having same problem... events.js:160 throw er; // Unhandled 'error' event
Error: listen EADDRINUSE 127.0.0.1:8000

But when I enter sudo or killall command I get :command not found?

How do I download the proper commands for MinGW64 using the MinGW Installation Manager so I can use these commands? And once downloaded how do I install them so they work in Git-Bash?

run de server on other port

good job, @drew-gross .Thanks a lot

If the running instances belongs to your project then.

Option #1
restart the system.

Option #2
goto command prompt and try the following command.

taskkill /f /im node*

Credits
Thanks to Bageerathan

events.js:160
throw er; // Unhandled 'error' event
^

Error: connection timeout
at Db. (C:UsersuserWebstormProjectsloginappnode_modulesmongooselibdriversnode-mongodb-nativeconnection.js:169:17)
at emitTwo (events.js:106:13)
at Db.emit (events.js:191:7)
at Server.listener (C:UsersuserWebstormProjectsloginappnode_modulesmongoosenode_modulesmongodblibdb.js:1786:14)
at emitOne (events.js:96:13)
at Server.emit (events.js:188:7)
at Server. (C:UsersuserWebstormProjectsloginappnode_modulesmongoosenode_modulesmongodblibserver.js:274:14)
at emitOne (events.js:96:13)
at Server.emit (events.js:188:7)
at Pool. (C:UsersuserWebstormProjectsloginappnode_modulesmongoosenode_modulesmongodb-corelibtopologiesserver.js:334:12)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection. (C:UsersuserWebstormProjectsloginappnode_modulesmongoosenode_modulesmongodb-corelibconnectionpool.js:270:12)
at Connection.g (events.js:291:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket. (C:UsersuserWebstormProjectsloginappnode_modulesmongoosenode_modulesmongodb-corelibconnectionconnection.js:183:10)
at Socket.g (events.js:291:16)
at emitNone (events.js:86:13)
at Socket.emit (events.js:185:7)
at Socket._onTimeout (net.js:339:8)
at ontimeout (timers.js:365:14)

please can anyone help me with this error???????????????????????????????????????????????

Cob007 I had the same issue as you during 5 days, so reading all above resolves then I found npm command killall -9 node proposed by #nickjf89. Then the issue was fixed

events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
This is error occured when run this code
[nodemon server.js ]

Here in this proble We can run the code in another cmd Prompt and run the server successfully but if we want the continue server run then its throw the error while use ing the command in cmd
nodemom server.js

Use this code to kill current port process

sudo lsof -i :8080
sudo kill -9 PID

I am using 8080 and you change it by your port that you are using in your project.

run example

sudo lsof -i :9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Java 716 a 313u IPv6 0x1111111111111 0t0 TCP

then kill it
sudo kill -9 716

i am getting this error
how to resolve this

events.js:160
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND rss.cnn.com rss.cnn.com:80
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

Hi! What about this? anyone knows what's the issue here?

events.js:160
throw er; // Unhandled 'error' event
^
Error: Parse Error: at new HTMLParser (/home/client/node_modules/html-minifier/src/htmlparser.js:236:13)
...
There is more trace code..

just try to listen to your port in only your main .js
the one where you configure all the other routers
in my case
_app.listen(port, hostname, function(){
console.log(Server running at http://${hostname}:${port}/);
});_

will be in my main js. not in the others

Hi, i am having the same error:

events.js:160
throw er; // Unhandled 'error' event

The command killall -9 node returns "node: no process found" and there is nothing using the port 8000, is there a solution?

Ubuntu 14.04
Node v6.11.2
Npm 3.10.10

  • I have enough space on disk
  • removing ~/.npm/tmp didn't work
  • rm -rf node_modules && npm cache clean && npm installdidn't work
  • port is not in use (netstat -nltp)

And restarting doesn't works anymore, i can't run a single example, even in a fresh install

events.js:160
throw er; // Unhandled 'error' event

What is the stack trace for the error?

 I  Your site is running at http://localhost:8000
 I  Your graphql debugger is running at http://localhost:8000/___graphql
 WAIT  Compiling...                                                   4:10:15 PM

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/phantom/workspaces/tutorial-part-one/node_modules/fast-glob/node_modules/extglob/node_modules/to-regex/node_modules/regex-not ENOSPC
    at exports._errnoException (util.js:1020:11)
    at FSWatcher.start (fs.js:1443:19)
    at Object.fs.watch (fs.js:1470:11)
    at createFsWatchInstance (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/phantom/workspaces/tutorial-part-one/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:123:15)

It happends on every project

Not sure where you got your source code, you should probably reach out to the maintainer

I was following the tutorial part 2. It happens when i install this plugin:
npm install --save gatsby-plugin-typography

It happens to me twice. I already solve it deleting the tutorial files, including node_modules, npm cache clean, and restarting the pc :+1: Thanks!

I think this happens you are already running something else on port 8080. Maybe another copy of the dashboard? or change the port number.
config/index.js change the port number.
Thanks :)

@drew-gross Thanks

events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1258:14)
at listen (net.js:1294:10)
at Server.listen (net.js:1390:5)
at EventEmitter.listen (C:UsersDeveloperDocumentspadawan01plural-sightnode-expresslibrarynode_modulesexpresslibapplication.js:618
at Object. (C:UsersDeveloperDocumentspadawan01plural-sightnode-expresslibraryapp.js:10:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)

I麓ve got this issue and I don't know why isn't working... please, help...!

@IlseMagali
maybe port number 3000 is using on your other project. please change the port number.
there are many ways to change it.
for example, npm run dev --port another number
or you can change it in index file in config.

C:UsersAdityaDesktopnotes-node>node app.js remove --title="secrets"
Starting app.js
Starting notes.js
Command: remove
Yargs { _: [ 'remove' ], title: 'secrets', '$0': 'app.js' }
Removing Note secrets

C:UsersAdityaDesktopnotes-node>nodemon app.js
[nodemon] 1.12.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js
events.js:182
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at _errnoException (util.js:1021:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

C:UsersAdityaDesktopnotes-node>

//Please help how to resolve this issue

events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn cmd.exe ENOENT
at exports._errnoException (util.js:1020:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
at onErrorNT (internal/child_process.js:376:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

// please help me how can i fix this
// using of react native..
// react-native run-android

events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at Server._listen2 (net.js:1259:14)
at listen (net.js:1295:10)
at Server.listen (net.js:1391:5)
at EventEmitter.listen (C:Userskhushi throneDesktopMaster Project-Udemy webservernode_modulesexpresslibapplication.js:618:24)
at Object. (C:Userskhushi throneDesktopMaster Project-Udemyw ebserverapp.js:38:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
[nodemon] app crashed - waiting for file changes before starting...

Anyone kindly help me of this
im really sick of this

@khushi84throne Error: listen EADDRINUSE :::3000. The port you're trying to bind to is already in use by another program. Take a look at the comments above so you can clear it or change the port you're binding to.

events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Considering that this issue was already resolved in the particular context of attempting to start the dashboard when the port was already in use I'm locking this. There's been a lot of useful information in this thread, but it seems some of the more recent comments would be better suited as separate issues with further details so we can focus on each one individually.

If you're still having an issue with an unhandled error being thrown please open up another thread with details there. We'll be happy to take a look at it there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattgoldspink picture mattgoldspink  路  3Comments

grassland-curing-cfa picture grassland-curing-cfa  路  6Comments

thphuc picture thphuc  路  4Comments

oligazar picture oligazar  路  7Comments

gianpaj picture gianpaj  路  5Comments