linux-on-ibm-z / docs

A collection of instructions and tutorials to help you get your favorite software up and running on Linux on z
147 stars 57 forks source link

Building MongoDB Fails on Build #6

Closed AllenGNg closed 8 years ago

AllenGNg commented 8 years ago

Hello,

I am trying to build MongoDB on a s390x Ubuntu Docker Container. I am following the tutorial for MongoDB 3.0. I followed along, got the V8 libraries installed with the updates as of 7/19/2016, and followed along until the end of Building MongoDB. When I run the final command of scons --opt --use-system-v8 --allocator=system all it goes on for a very long time then at the end, i get this error.

scons: *** [build/linux2/allocator_system/opt_on/use-system-v8/mongo/db/query/index_bounds_test] Error 1

I am unsure where to go from here. I retried it from the beginning but I got the same error. I have included a picture of the error as well. If you require anymore information, feel free to ask!

Thanks, Allen mongodb error

aborkar-ibm commented 8 years ago

Hi Allen,

Yes, mongo build does take a long time (2 -3 hrs). The issue that you see might be related to memory. I have seen similar issue when running on a 2GB/4GB RAM VM. I could build when I moved on to a higher memory VM. Can you let me know your VM configuration (RAM, Disk space) on which you are building the same.

Regards, Amod

AllenGNg commented 8 years ago

Hello Amod,

Thanks for the quick answer! I am running the Docker Container on a LinuxONE Community Cloud Instance. The one I have set there has 2 CPUs, and 2GB of RAM. As for Disk Space I am not to sure, but when I do df -h the largest number I see is 45GB. I can relaunch an Instance this time that can have 4 GB of RAM and try again and see if that works. I do not think I can go above 4GB though since 2 and 4 are the only option.

Thanks, Allen

aborkar-ibm commented 8 years ago

Hi Allen,

4GB RAM might just work. Regarding 45GB, make sure you build in the folder which has than much space. Do let me know the results.

Regards, Amod

MaStr commented 8 years ago

Hey, If you still run out-of-memory, you can use some GB of your disk space as additional swap space and change the over-commitment ratio of the system. That will make the build slower, but probably make it then.

best regards Matthias

AllenGNg commented 8 years ago

Hello All,

I retried building MongoDB on my LinuxONE Community Cloud Instance, but this time with 4GB RAM and it failed again with the same error. Not to sure what to do now. @MaStr I do not think I can do that. Whenever I launch an Instance, it only allows me to change the amount of RAM I have. I have emailed LinuxONE to see if I could get a new instance with more than 4GB of RAM. Hopefully they say yes. :)

(Sorry for the late reply, it took a whole day for my LinuxONE Instance to delete, so I could create a new one with 4 GB of RAM, due to an LinuxONE Cloud Component malfunctioning, had to manually email LinuxONE for them to delete it. Another reason was that the download speeds were very slow. Apt-get Update was taking an hour to complete when it usually took a few seconds. This has been happening for the past few days and is still happening sadly. Here is an example, it took 31 minutes to download 17.6MBs. I was averaging 9570 B/s)

Thanks, Allen

aborkar-ibm commented 8 years ago

Hi Allen,

There is one more option you could try.
Command "scons --opt --use-system-v8 --allocator=system all" builds all components. You could try building them individually. Try building mongo, mongod and mongos individually using the following commands: scons --opt --use-system-v8 --allocator=system mongo scons --opt --use-system-v8 --allocator=system mongod scons --opt --use-system-v8 --allocator=system mongos

Let me know if this works.

Regards, Amod

AllenGNg commented 8 years ago

Hello Amod,

This seemed to have worked! It finished all three without any errors and I have all three as executables.

mongo

Does this mean I am now done with building MongoDB and can move onto building the MongoDB tools? Do I need the MongoDB tools?

Thank you very much for the help so far, Allen

cwsolee commented 8 years ago

Totally depends on what you're planning to do, but https://docs.mongodb.com/manual/tutorial/install-mongodb-on-linux/#run-mongodb is a good starting point.

AllenGNg commented 8 years ago

Hello All,

Thank you very much for help. I am pretty sure I have gotten MongoDB to run. If I run into more problems, which hopefully won't happen, I'll be sure to post them.

Thank you again for the help, I greatly appreciate it, Allen