Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDavid Ryan
Courses Plus Student 14,981 PointsMongoDB installation
What does this mean?
Davids-MacBook-Pro-2:~ davidryan$ mongod
2018-10-11T18:15:30.591-0300 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] MongoDB starting : pid=41160 port=27017 dbpath=/data/db 64-bit host=Davids-MacBook-Pro-2.local
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] db version v4.0.2
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] allocator: system
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] modules: none
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] build environment:
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] distarch: x86_64
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] target_arch: x86_64
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] options: {}
2018-10-11T18:15:30.606-0300 I STORAGE [initandlisten] exception in initAndListen: IllegalOperation: Attempted to create a lock file on a read-only directory: /data/db, terminating
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] now exiting
2018-10-11T18:15:30.606-0300 I CONTROL [initandlisten] shutting down with code:100
4 Answers
David Ryan
Courses Plus Student 14,981 PointsI am so lost on this... I have literally followed the instructions and uninstalled and reinstalled the whole thing
KRIS NIKOLAISEN
54,971 PointsI found this on stack overflow that might help
Ken Alger
Treehouse TeacherIt means you need to adjust the permissions on the data/db
directory so that the mongod instance can read and write to it.
David Ryan
Courses Plus Student 14,981 PointsHow would I go about that?
Ken Alger
Treehouse TeacherIt really depends on your operating system. But search for the data/db
directory on your hard drive and then make sure that you set the permissions to allow reads and writes to it.
David Ryan
Courses Plus Student 14,981 PointsFixed it with: mongod --port 27018