running MongoDB with Forever
See original GitHub issueI’m trying to run MongoDB with Forever. I can run mongo by itself with the following command:
/usr/local/bin/mongodb-linux-x86_64-2.0.0/bin/mongod
and it works great. But when I try to run with forever:
forever start /usr/local/bin/mongodb-linux-x86_64-2.0.0/bin/mongo
it doesn’t work.
Here’s the error I see in the forever log:
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:397:25)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at Array.<anonymous> (module.js:421:10)
at EventEmitter._tickCallback (node.js:126:26)
warn: Forever detected script exited with code: 1
Any idea what I may be doing wrong?
Issue Analytics
- State:
- Created 12 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Run Mongodb and Node using forever - Stack Overflow
Dont run mongo using forever,make it as a service. But in case of node server.js you can use forever.. When you start server...
Read more >running MongoDB with Forever · Issue #148 - GitHub
I'm trying to run MongoDB with Forever. I can run mongo by itself with the following command: /usr/local/bin/mongodb-linux-x86_64-2.0.0/bin/ ...
Read more >Manage mongod Processes — MongoDB Manual
Manage mongod Processes ... MongoDB runs as a standard program. You can start MongoDB from a command line by issuing the mongod command...
Read more >What's the best way to keep mongodb running on a remote server ...
I have a node.js server running alongside MongoDB on an EC2 instance. What's the best way to make it run smoothly with Forever.js?...
Read more >MongoDB Compass loading forever on start page - Super User
When I start MongoDB Compass 1.18, it loads forever and never starts. It displays the word "LOADING..." under a logo consisting of two...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround:
Create a shell script file and name it startmongod which contains the following:
Now run mongo via forever by making the -c option /bin/bash, like this:
/usr/local/bin/forever start -c /bin/bash ./startmongod
Still seeing this same issue. Any fix coming soon?