EmergingTechnologyInstitute / acmeair-netflixoss-dockerlocal

acmeair-netflixoss-dockerlocal
Apache License 2.0
33 stars 11 forks source link

microscaler doesn't build #3

Closed thewmf closed 10 years ago

thewmf commented 10 years ago

I'm following the README and in the ./buildimages.sh step the microscaler doesn't build. Here's the tail end of its build log:

Step 2 : RUN mkdir /tmp/go &&  GOPATH=/tmp/go go get github.com/apcera/gnatsd &&  mv /tmp/go/bin/gnatsd /usr/local/bin &&  rm -Rf /tmp/go
 ---> Running in d26d4f668b4d
 ---> 33527c77de1b
Removing intermediate container d26d4f668b4d
Step 3 : RUN gem install mongo bson_ext
 ---> Running in b7666f01595c
Successfully installed bson-1.10.2
Successfully installed mongo-1.10.2
Building native extensions.  This could take a while...
Successfully installed bson_ext-1.10.2
3 gems installed
Installing ri documentation for bson-1.10.2...
Installing ri documentation for mongo-1.10.2...
Installing ri documentation for bson_ext-1.10.2...
Installing RDoc documentation for bson-1.10.2...
Installing RDoc documentation for mongo-1.10.2...
Installing RDoc documentation for bson_ext-1.10.2...
 ---> 74f4d3ece5af
Removing intermediate container b7666f01595c
Step 4 : RUN sed -i 's/\(bind_ip = \).*/\10.0.0.0/' /etc/mongodb.conf &&  echo "port = 27017" >> /etc/mongodb.conf &&  echo "smallfiles = true" >> /etc/mongodb.conf
 ---> Running in b1e5a0b10b31
 ---> 7b36ed172d27
Removing intermediate container b1e5a0b10b31
Step 5 : RUN sudo -u mongodb /usr/bin/mongod -f /etc/mongodb.conf &  sleep 5 &&  /usr/bin/mongo admin --eval "db.addUser('admin','UdnjgPO5na4In6o7I1iVZvt8JyPjGd8x');" &&  /usr/bin/mongo authdb --eval "db.addUser('auser','ZyV4GuNcacwnMZ1IJWEazCUHJbeTh6kh');" &&  /usr/bin/mongo imdb --eval "db.addUser('imuser','mttEvQY5TmCcxRXRYfQc1EXu2zUQTQ28');" &&  /usr/bin/mongo asgdb --eval "db.addUser('asguser','OWbVpg4VAqRf2PekEi01pyZIEl5PDrvA');" &&  sleep 5 &&  sudo -u mongodb pkill mongod &&  sleep 5
 ---> Running in 47b7b47398e8
warning: bind_ip of 0.0.0.0 is unnecessary; listens on all ips by default
all output going to: /var/log/mongodb/mongodb.log
MongoDB shell version: 2.4.9
connecting to: admin
Tue Jun 24 22:23:32.193 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed
2014/06/24 17:23:33 The command [/bin/sh -c sudo -u mongodb /usr/bin/mongod -f /etc/mongodb.conf &  sleep 5 &&  /usr/bin/mongo admin --eval "db.addUser('admin','UdnjgPO5na4In6o7I1iVZvt8JyPjGd8x');" &&  /usr/bin/mongo authdb --eval "db.addUser('auser','ZyV4GuNcacwnMZ1IJWEazCUHJbeTh6kh');" &&  /usr/bin/mongo imdb --eval "db.addUser('imuser','mttEvQY5TmCcxRXRYfQc1EXu2zUQTQ28');" &&  /usr/bin/mongo asgdb --eval "db.addUser('asguser','OWbVpg4VAqRf2PekEi01pyZIEl5PDrvA');" &&  sleep 5 &&  sudo -u mongodb pkill mongod &&  sleep 5] returned a non-zero code: 1

This error aborts the container build.

I'm not familiar with Mongo, so any idea what's going on here? It looks like maybe mongod is not starting.

tkhinaba commented 10 years ago

I think the MongoDB was not available. This would be similar to #2. I'll fix this.

tkhinaba commented 10 years ago

I made a fix. The fix should fix this issue. In my environment (Ubuntu 14.04, VirtualBox VM with two i7-2760QM cores and mem 3GB on Windows 7 64-bit), MongoDB server started in 243 ms during the image building process.

Wed Jun 25 13:34:51.224 [initandlisten] MongoDB starting : pid=13 port=27017 dbpath=/var/lib/mongodb 64-bit host=1b89aa22e7e2
Wed Jun 25 13:34:51.225 [initandlisten] db version v2.4.9
Wed Jun 25 13:34:51.225 [initandlisten] git version: nogitversion
Wed Jun 25 13:34:51.225 [initandlisten] build info: Linux orlo 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 BOOST_LIB_VERSION=1_54
Wed Jun 25 13:34:51.225 [initandlisten] allocator: tcmalloc
Wed Jun 25 13:34:51.225 [initandlisten] options: { bind_ip: "0.0.0.0", config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", fork: true, journal: "true", logappend: "true", logpath: "/var/log/mongodb/mongodb.log", port: 27017, smallfiles: "true" }
Wed Jun 25 13:34:51.228 [initandlisten] journal dir=/var/lib/mongodb/journal
Wed Jun 25 13:34:51.228 [initandlisten] recover : no journal files present, no recovery needed
Wed Jun 25 13:34:51.324 [FileAllocator] allocating new datafile /var/lib/mongodb/local.ns, filling with zeroes...
Wed Jun 25 13:34:51.325 [FileAllocator] creating directory /var/lib/mongodb/_tmp
Wed Jun 25 13:34:51.395 [FileAllocator] done allocating datafile /var/lib/mongodb/local.ns, size: 16MB,  took 0.067 secs
Wed Jun 25 13:34:51.395 [FileAllocator] allocating new datafile /var/lib/mongodb/local.0, filling with zeroes...
Wed Jun 25 13:34:51.462 [FileAllocator] done allocating datafile /var/lib/mongodb/local.0, size: 16MB,  took 0.066 secs
Wed Jun 25 13:34:51.466 [initandlisten] command local.$cmd command: { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0  reslen:37 141ms
Wed Jun 25 13:34:51.467 [initandlisten] waiting for connections on port 27017
Wed Jun 25 13:34:51.467 [websvr] admin web console waiting for connections on port 28017
thewmf commented 10 years ago

Thanks; I verified that it works now.