Habitat: Can't start hab-depot or just confusing error messages

Created on 10 Jul 2016  Â·  12Comments  Â·  Source: habitat-sh/habitat

Hab version: 0.8.0/20160708161531

I tried to install hab-depot and run it locally(note that I did not run some special config commands, I just copied hab into /usr/local/bin and tried to use it).
I did:

$ hab install core/hab-depot
$ hab pkg binlink --dest /usr/local/bin core/hab-depot hab-depot
$ hab-depot start

It returned:

Starting package Depot at /hab/svc/hab-depot/data
Depot listening on 0.0.0.0:9632
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
...

If this issue is related to not setting up github auth, than this probably should print an error message first.
I could not test if it is related to this issue because I don't know the commands that I have to run to set it up and the site is down right now.

Documentation

Most helpful comment

If you're running with --insecure, you still need to use a HAB_AUTH_TOKEN, but it doesn't matter what it is.

All 12 comments

the connection refused message means you need to have Redis up and running.

On Jul 10, 2016, at 5:29 AM, Lilian Anatolie Moraru [email protected] wrote:

Hab version: 0.8.0/20160708161531

I tried to install hab-depot and run it locally(note that I did not run some special config commands, I just copied hab into /usr/local/bin and tried to use it).
I did:

$ hab install core/hab-depot
$ hab pkg binlink --dest /usr/local/bin core/hab-depot hab-depot
$ hab-depot start
It returned:

Starting package Depot at /hab/svc/hab-depot/data
Depot listening on 0.0.0.0:9632
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
ERROR:r2d2: connection refused: Connection refused (os error 111)
...
If this issue is related to not setting up github auth, than this probably should print an error message first.
I could not test if it is related to this issue because I don't know the commands that I have to run to set it up and the site is down right now.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@metadave I heard of Redis but to be sincere, I don't know much about what it does(something related to caching I think).
I searched through the docs more info on how I could set-up my own depot and I found only these:

From my searches I have not found Redis being mentioned(I should of probably searched through Github).

sorry for my short replies, I'm not at a keyboard at the moment. We definitely need some docs in this area. In the meantime, you can start redis with:

    hab start core/redis &

Cheers,
Dave

On Jul 10, 2016, at 5:59 PM, Lilian Anatolie Moraru [email protected] wrote:

@metadave I heard of Redis but to be sincere, I don't know much about what it does(something related to caching I think).
I searched through the docs more info on how I could set-up my own depot and I found only these:

Under Sharing packages: https://www.habitat.sh/docs/share-packages-overview/ - says However, it is possible to run your own depot by installing and running the core/hab-depot package.
Then I searched what depot was, to find more info about it, and I found this: https://www.habitat.sh/docs/concepts-depot/
Then I though may be I can find something in the package's description: https://app.habitat.sh/#/pkgs/core/hab-depot/0.8.0/20160708162117
From my searches I have not found Redis being mentioned(I should of probably searched through Github).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

cc @davidwrede

hab-sup(MN): Starting core/redis
hab-sup(GS): Supervisor 192.168.100.3: 2775310a-58f3-4fd7-8eeb-72316adbb190
hab-sup(GS): Census redis.default: a81e31be-f34d-49e5-b9bb-77cd43b92344
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(ER)[src/error.rs:328:8]: Failed to set permissions

I think I've seen this before(there was an issue for that too).

Edit:
Yes, I had it here #951 and it was first reported here #755.
I'll read through the suggested link and try that when I get back home.

I'm currently working on the permissions issue via https://github.com/habitat-sh/habitat/pull/1012, you'll need to either
a) run as root
-or-
b) make sure the hab user exists and that it has read/write/execute permissions on /hab.

@metadave I get the messages when running the command with sudo.
But I tried right now running it under root(sudo -s and from root trying to execute the command) and the result is the same.
I guess the only solution is b), I'll try that when I get back at home.

I tried it right now and the b) option worked.
Also, hab-depot start worked after redis was started.

hab-depot start
Starting package Depot at /hab/svc/hab-depot/data
Depot listening on 0.0.0.0:9632

I am in a bit of confusion how I could use my local depot right now but I'll play around with it.

I still think the issue is relevant(at least for documenting this).

Edit:
I found that I can use this https://www.habitat.sh/docs/reference/habitat-cli/#hab-pkg-install with -u to indicate to use a specific depot.
Ow, and HAB_DEPOT_URL: https://www.habitat.sh/docs/reference/environment-vars/

yes indeed, HAB_DEPOT_URL is what you need to set. Something like this should do the trick:

    export HAB_DEPOT_URL=http://127.0.0.1:9632/v1

You may also want to try:

    hab start core/hab-depot start --insecure

The --insecure flag will allow you to upload packages and public keys without authenticating to Github.

Fwiw, I used export HAB_AUTH_TOKEN=mysecret, where mysecret was the token that hab setup asks for.

If you're running with --insecure, you still need to use a HAB_AUTH_TOKEN, but it doesn't matter what it is.

Appears from the backscroll that this issue was resolved. Closing this out for now. If we feel like this was closed in error, please leave a comment. Please https://github.com/habitat-sh/habitat/issues/1060 for the Issue regarding documentation of running a depot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juliandunn picture juliandunn  Â·  3Comments

bodymindarts picture bodymindarts  Â·  4Comments

ryankeairns picture ryankeairns  Â·  4Comments

christophermaier picture christophermaier  Â·  5Comments

baumanj picture baumanj  Â·  3Comments