Skip to content
cedricss edited this page Aug 22, 2012 · 7 revisions

Troubleshooting

Errors on startup


I have this error when I start my application:

events.js:66
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: listen EADDRINUSE
    at errnoException (net.js:776:11)
    at Server._listen2._connectionKey (net.js:917:26)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

EADDRINUSE basically means the listening port is already used by an other service. Stop the service listening on the port or choose an other one, for example:

./myapp.js --port 9090

By default the http server will listen on the port 8080.


My app doesn't start and is stuck to:

DbGen/Mongo Launching MongoDB with --pidfilepath /tmp/opaMongo.pid --noprealloc --bind_ip 0.0.0.0 --dbpath /home/ubuntu/.opa/mongo/data --fork --logpath /home/ubuntu/.opa/mongo/mongo.log

Try to start your app giving explicitly your mongo database host and port (27017 is the default mongoDB port):

./myapp.js --db-remote localhost:27017

I have this error on startup:

	module.js:340
    throw err;
    ^
Error: Cannot find module 'formidable'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/usr/local/lib/opa/stdlib/server.opp/serverNodeJsPackage.js:98:21)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)

Check if the required node modules are installed, if not:

npm install mongodb formidable nodemailer simplesmtp imap
# use -g option to install those module in a central location

If it still fails to find your modules, define explicitly a node path:

export NODE_PATH=path/to/node_modules

I have this error on startup:

DbGen/Mongo Can not create directory '/home/ubuntu/.opa/mongo'

Try to start your app again or create those directories:

mkdir -p ~/.opa/mongo