Failed to run tutorial example

Hello!
I`m trying to run tutorial sample in bare metal, but always get error:

[3][default:/src:0]# hab start nvg/mytutorialapp hab-sup(MN): Starting nvg/mytutorialapp hab-sup(TP): Child process will run as user=hab, group=hab hab-sup(GS): Supervisor 10.0.2.15: 6f9a4bd8-9eb5-4fe2-a9f5-927070c7ff2b hab-sup(GS): Census mytutorialapp.default: f718a68c-250e-4e72-a7cb-cd0edfb614f9 hab-sup(GS): Starting inbound gossip listener hab-sup(GS): Starting outbound gossip distributor hab-sup(GS): Starting gossip failure detector hab-sup(CN): Starting census health adjuster hab-sup(SC): Updated config.json hab-sup(TP): Restarting because the service config was updated via the census hab-sup(PH)[src/package/hooks.rs:121:16]: Hook failed to run: init, 1, Failed

My init hook contains:

#!/bin/sh # ln -sf {{pkg.path}}/package.json {{pkg.svc_path}} ln -sf {{pkg.path}}/server.js {{pkg.svc_path}} ln -sf {{pkg.path}}/node_modules {{pkg.svc_path}}
What am I doing wrong?

1 Like

Hello -

I’ve reproduced this issue locally. The failure is due to permissions changes that were introduced as part of the 0.9.0 release.

Until we have an official fix out, you’ll need to add these to the plan.sh file:

    pkg_svc_user=root
    pkg_svc_group=root

and rebuild the plan.

Dave

I’m tracking this issue here: https://github.com/habitat-sh/habitat/issues/1168

Cheers-
Dave

Thank you very much, Dave!
It works now;)

1 Like