Ubuntu: mongodb won’t start [FIXED]

So you decided to change the default location of your mongodb data path on mongodb.conf but mongo won’t start and you get an error similar to this

Wed May 23 04:17:35 [initandlisten] MongoDB starting : pid=1214 port=27017 dbpath=/media/ebs/data 64-bit host=domU-12-31-38-00-78-DB
Wed May 23 04:17:35 [initandlisten] db version v2.0.4, pdfile version 4.5
Wed May 23 04:17:35 [initandlisten] git version: nogitversion
Wed May 23 04:17:35 [initandlisten] build info: Linux yellow 2.6.24-29-server #1 SMP Tue Oct 11 15:57:27 UTC 2011 x86_64 BOOST_LIB_VERSION=1_46_1
Wed May 23 04:17:35 [initandlisten] options: { bind_ip: "", config: "/etc/mongodb.conf", dbpath: "/media/ebs/data", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", port: 27017 }
Wed May 23 04:17:36 [initandlisten] journal dir=/media/ebs/data/journal
Wed May 23 04:17:36 [initandlisten] recover : no journal files present, no recovery needed
Wed May 23 04:17:36 [initandlisten] waiting for connections on port 27017
Wed May 23 04:17:36 [websvr] admin web console waiting for connections on port 28017
Wed May 23 04:17:38 [initandlisten] connection accepted from #1
Wed May 23 04:17:40 [conn1] end connection
Wed May 23 04:18:36 [clientcursormon] mem (MB) res:15 virt:624 mapped:0
Wed May 23 04:19:39 got kill or ctrl c or hup signal 15 (Terminated), will terminate after current cmd ends
Wed May 23 04:19:39 [interruptThread] now exiting

Just make sure the ownership of the directory is the same as the user ubuntu tries to start mongodb with (it’s not root, even if you’re doing sudo service mongodb start, it’s “mongodb”)

Extra points for whoever tells me how the hell to change the default user to something else.
Ubuntu/Mongo’s documentation says that for upstart based systems you can do this at /etc/init.d/mongodb.conf, but such file doesn’t exist for Ubuntu 12.04.

hope this helps

How to use environment variables in your Eclipse project Run Configuration

Say you have some environment variables that you’d love to use as arguments of an executable in your project.

1. Go to “Run Configurations”

2. Click on the “Environment” tab.

3. Click the “Select” button.

4. A list with all of your environment variables will be shown. Choose the environment variables you need for this project/executable.

5. Use the variable using the following syntax ${env_var:MY_ENVIRONMENT_VARIABLE_HERE}

Dear Facebook, “Liking” is not “Following”

Facebook plays it really shady with it’s “Like” button on their inner “Pages”.

Everywhere on the net their like buttons just help quantify empathy towards content, however, when it comes to “Liking” a Facebook page, what you’re doing is really “Following”.

Don’t be surprised if you get more “followers” on Facebook, yet the rate of losing them is also faster. It’s all based on user experience deception. C’mon Zuck, of all companies Facebook doesn’t need to be so cheap.

It’s quite worrying what is going to happen to Facebook once it goes public if it’s already acting so cheap.