Habitat studio is loading service, but it doesn't run successfully


#1

Hello,

I am entering a fresh studio, doing a hab svc load core/mongodb, and it claims to have successfully loaded the service, but it has a state of down with no error in sight…

[2][default:/src:1]# hab svc load core/mongodb
» Installing core/mongodb
☁ Determining latest version of core/mongodb in the 'stable' channel
↓ Downloading core/mongodb/3.6.4/20180717024452
    659.08 MB / 659.08 MB | [===========================================================================================================================================================] 100.00 % 150.05 TB/s  ☛ Verifying core/mongodb/3.6.4/20180717024452
↓ Downloading core/acl/2.2.52/20180608091922
    90.90 KB / 90.90 KB | [===============================================================================================================================================================] 100.00 % 1.79 GB/s  ☛ Verifying core/acl/2.2.52/20180608091922
↓ Downloading core/attr/2.4.47/20180608091914
    63.02 KB / 63.02 KB | [==============================================================================================================================================================] 100.00 % 14.99 GB/s  ☛ Verifying core/attr/2.4.47/20180608091914
↓ Downloading core/cacerts/2018.03.07/20180608102212
    115.65 KB / 115.65 KB | [============================================================================================================================================================] 100.00 % 20.82 GB/s  ☛ Verifying core/cacerts/2018.03.07/20180608102212
↓ Downloading core/coreutils/8.29/20180608092141
    2.07 MB / 2.07 MB | [===============================================================================================================================================================] 100.00 % 338.64 GB/s  ☛ Verifying core/coreutils/8.29/20180608092141
↓ Downloading core/gcc-libs/7.3.0/20180608091701
    3.23 MB / 3.23 MB | [===============================================================================================================================================================] 100.00 % 529.39 GB/s  ☛ Verifying core/gcc-libs/7.3.0/20180608091701
↓ Downloading core/glibc/2.27/20180608041157
    8.82 MB / 8.82 MB | [=================================================================================================================================================================] 100.00 % 1.87 TB/s  ☛ Verifying core/glibc/2.27/20180608041157
↓ Downloading core/gmp/6.1.2/20180608051426
    365.72 KB / 365.72 KB | [============================================================================================================================================================] 100.00 % 59.33 GB/s  ☛ Verifying core/gmp/6.1.2/20180608051426
↓ Downloading core/libcap/2.25/20180608091936
    31.71 KB / 31.71 KB | [===============================================================================================================================================================] 100.00 % 5.44 GB/s  ☛ Verifying core/libcap/2.25/20180608091936
↓ Downloading core/linux-headers/4.15.9/20180608041107
    951.81 KB / 951.81 KB | [=============================================================================================================================================================] 100.00 % 9.58 GB/s  ☛ Verifying core/linux-headers/4.15.9/20180608041107
↓ Downloading core/openssl/1.0.2n/20180608102213
    2.15 MB / 2.15 MB | [===============================================================================================================================================================] 100.00 % 368.04 GB/s  ☛ Verifying core/openssl/1.0.2n/20180608102213
↓ Downloading core/zlib/1.2.11/20180608050617
    75.23 KB / 75.23 KB | [==============================================================================================================================================================] 100.00 % 17.63 GB/s  ☛ Verifying core/zlib/1.2.11/20180608050617
✓ Installed core/acl/2.2.52/20180608091922
✓ Installed core/attr/2.4.47/20180608091914
✓ Installed core/cacerts/2018.03.07/20180608102212
✓ Installed core/coreutils/8.29/20180608092141
✓ Installed core/gcc-libs/7.3.0/20180608091701
✓ Installed core/glibc/2.27/20180608041157
✓ Installed core/gmp/6.1.2/20180608051426
✓ Installed core/libcap/2.25/20180608091936
✓ Installed core/linux-headers/4.15.9/20180608041107
✓ Installed core/openssl/1.0.2n/20180608102213
✓ Installed core/zlib/1.2.11/20180608050617
✓ Installed core/mongodb/3.6.4/20180717024452
★ Install of core/mongodb/3.6.4/20180717024452 complete with 12 new packages installed.
The core/mongodb service was successfully loaded

[3][default:/src:0]# hab sup status
package                            type        desired  state  elapsed (s)  pid     group
core/mongodb/3.6.4/20180717024452  standalone  up       down   23           <none>  mongodb.default

[4][default:/src:0]# sup-log
--> Tailing the Habitat Supervisor's output (use 'Ctrl+c' to stop)
hab-sup(AG): ✓ Installed core/gcc-libs/7.3.0/20180608091701
hab-sup(AG): ✓ Installed core/glibc/2.27/20180608041157
hab-sup(AG): ✓ Installed core/gmp/6.1.2/20180608051426
hab-sup(AG): ✓ Installed core/libcap/2.25/20180608091936
hab-sup(AG): ✓ Installed core/linux-headers/4.15.9/20180608041107
hab-sup(AG): ✓ Installed core/openssl/1.0.2n/20180608102213
hab-sup(AG): ✓ Installed core/zlib/1.2.11/20180608050617
hab-sup(AG): ✓ Installed core/mongodb/3.6.4/20180717024452
hab-sup(AG): ★ Install of core/mongodb/3.6.4/20180717024452 complete with 12 new packages installed.
hab-sup(AG): The core/mongodb service was successfully loaded

It seems to load the service, but the init hook never gets triggered. I’ve tried everything at this point. Studio with debug log shows nothing. I’ve reinstalled hab and docker, blitzed caches for both, and still nothing.

This is on Mac OS Mojave, Habitat version 0.66.0/20181019234118 and Docker for Mac 18.06.1-ce-mac73 (26764)


#2

Hi Thomas! Thanks for posting on the forums!

First guess here would be that you may not have enough memory allocated to your Docker VM. Try setting Docker options environment variable to something like this, maybe:
HAB_DOCKER_OPTS="-m 4g"

(reference here: https://www.habitat.sh/docs/reference/)

If that doesn’t work, try peeking into your supervisor log by hitting sl in the Hab studio.


#3

Hey Garrett, thanks for the reply.

I’ve set the memory to 4g but the result is still the same:

2][default:/src:1]# hab svc load core/mongodb
» Installing core/mongodb
☁ Determining latest version of core/mongodb in the 'stable' channel
☛ Verifying core/mongodb/3.6.4/20180717024452
☛ Verifying core/acl/2.2.52/20180608091922
☛ Verifying core/attr/2.4.47/20180608091914
☛ Verifying core/cacerts/2018.03.07/20180608102212
☛ Verifying core/coreutils/8.29/20180608092141
☛ Verifying core/gcc-libs/7.3.0/20180608091701
☛ Verifying core/glibc/2.27/20180608041157
☛ Verifying core/gmp/6.1.2/20180608051426
☛ Verifying core/libcap/2.25/20180608091936
☛ Verifying core/linux-headers/4.15.9/20180608041107
☛ Verifying core/openssl/1.0.2n/20180608102213
☛ Verifying core/zlib/1.2.11/20180608050617
✓ Installed core/acl/2.2.52/20180608091922
✓ Installed core/attr/2.4.47/20180608091914
✓ Installed core/cacerts/2018.03.07/20180608102212
✓ Installed core/coreutils/8.29/20180608092141
✓ Installed core/gcc-libs/7.3.0/20180608091701
✓ Installed core/glibc/2.27/20180608041157
✓ Installed core/gmp/6.1.2/20180608051426
✓ Installed core/libcap/2.25/20180608091936
✓ Installed core/linux-headers/4.15.9/20180608041107
✓ Installed core/openssl/1.0.2n/20180608102213
✓ Installed core/zlib/1.2.11/20180608050617
✓ Installed core/mongodb/3.6.4/20180717024452
★ Install of core/mongodb/3.6.4/20180717024452 complete with 12 new packages installed.
The core/mongodb service was successfully loaded

[3][default:/src:0]# hab sup status
package                            type        desired  state  elapsed (s)  pid     group
core/mongodb/3.6.4/20180717024452  standalone  up       down   8            <none>  mongodb.default

Supervisor log output:

[4][default:/src:0]# sl
--> Tailing the Habitat Supervisor's output (use 'Ctrl+c' to stop)
hab-sup(AG): ✓ Installed core/gcc-libs/7.3.0/20180608091701
hab-sup(AG): ✓ Installed core/glibc/2.27/20180608041157
hab-sup(AG): ✓ Installed core/gmp/6.1.2/20180608051426
hab-sup(AG): ✓ Installed core/libcap/2.25/20180608091936
hab-sup(AG): ✓ Installed core/linux-headers/4.15.9/20180608041107
hab-sup(AG): ✓ Installed core/openssl/1.0.2n/20180608102213
hab-sup(AG): ✓ Installed core/zlib/1.2.11/20180608050617
hab-sup(AG): ✓ Installed core/mongodb/3.6.4/20180717024452
hab-sup(AG): ★ Install of core/mongodb/3.6.4/20180717024452 complete with 12 new packages installed.
hab-sup(AG): The core/mongodb service was successfully loaded

#4

Try this: Application Debugging and Feedback

EDIT: Rather, this problem has popped up before, and the solution provided at that link may help.


#5

Thanks so much @christophermaier that has done the trick!