Unable to access loaded application, found error in sup-log: Hook failed to run, init


#1

OS: Win10
hab 0.55.0/20180321145450
Docker version 18.03.1-ce, build 9ee9f40

Any clue on this error? After loading .hart file, I am unable to access the application and found the error " Hook failed to run, init, hab-sup(ER)[components/sup/src/error.rs:500:9]: No such file or directory (os error 2)"

hab svc load msreddy-material*-x86_64-linux.hart

sup-log
hab.default(SR): Service restart failed: hab-sup(ER)[components/sup/src/error.rs:512:9]: Unknown: Unable to spawn process, No such file or directory (os error 2)
material.default(SR): Initializing
material.default(HK): Hook failed to run, init, hab-sup(ER)[components/sup/src/error.rs:500:9]: No such file or directory (os error 2)


#2

Can you share the text of your init hook? I usually see that when bash is used on the shebang line without core/bash being declared as a dependency.

(We include busybox on the path for you, so sh will always work, but if you really need bash, you’ll need to declare that explicitly with a dependency)


#3

Another cause of this can be line endings… Windows line endings on Linux can result in problems because \r isn’t a command.

Once https://github.com/habitat-sh/habitat/issues/5004 is implemented, this shouldn’t be a problem anymore.


#4

True, this will help the developers on clueless failure due to CR-LF “\r” in various artifacts.
Thank for cooperation and support.


MS Reddy