WebFaction
Community site: login faq

Hi, I need to run mongoDB after I close the SSH connection. I tried that solution https://community.webfaction.com/questions/10922/mongodb-as-a-service but I doesn't work for me. I just tried the nohup solution but the console shows me "nohup: ignoring input and appending output to `nohup.out'"

Thanks

asked 02 Jul '15, 22:29

larrotta69
213
accept rate: 0%


Okay, can you please open a support ticket so that we can help troubleshoot this further?

https://my.webfaction.com/open-support-ticket

permanent link

answered 02 Jul '15, 22:34

NickR ♦♦
4165
accept rate: 18%

If you want to run MongoDB as a service, then run it with the --fork option, like this (replace "NNNNN" with your assigned port number, and replace "mongo_db" with your chosen app name):

mongod --dbpath ~/webapps/mongo_db/mongodb/ --port NNNNN --fork \
   --logpath $HOME/logs/user/mongo_db.log

When you need to stop it, run:

mongod --dbpath ~/webapps/mongo_db/mongodb/ --port NNNNN --shutdown

Hope that helps!

permanent link

answered 02 Jul '15, 23:18

seanf
12.2k41836
accept rate: 37%

edited 02 Jul '15, 23:19

Hi seanf, thanks for the help but my mongo isn't still working, I run the following:

/home/MYUSER/webapps/mongo/mongodb-linux-x86_64-3.0.4/bin/mongod --auth --dbpath /home/MYUSER/webapps/mongo/data/ --port MYPORT --logpath /home/MYUSER/logs/mongo_db.log --fork \

and the console just show a ">".

thanks

(03 Jul '15, 14:12) larrotta69

Leave the \ character off of the end - it's in my original example because I have the command spread over two lines. If you're putting the command on a single line, then it's not needed.

(03 Jul '15, 17:23) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×29
×3

question asked: 02 Jul '15, 22:29

question was seen: 1,979 times

last updated: 03 Jul '15, 17:23

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM