Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start hab-depot or just confusing error messages #1048

Closed
lilianmoraru opened this issue Jul 10, 2016 · 12 comments
Closed

Can't start hab-depot or just confusing error messages #1048

lilianmoraru opened this issue Jul 10, 2016 · 12 comments
Labels
Documentation Flags an issue / PR for attention by the technical documentation team

Comments

@lilianmoraru
Copy link

lilianmoraru commented Jul 10, 2016

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.

@bookshelfdave
Copy link
Contributor

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.

@lilianmoraru
Copy link
Author

@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).

@bookshelfdave
Copy link
Contributor

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.

@bookshelfdave
Copy link
Contributor

cc @davidwrede

@lilianmoraru
Copy link
Author

lilianmoraru commented Jul 11, 2016

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.

@bookshelfdave
Copy link
Contributor

I'm currently working on the permissions issue via #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.

@smith smith added Discussing and removed Deciding labels Jul 11, 2016
@lilianmoraru
Copy link
Author

@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.

@lilianmoraru
Copy link
Author

lilianmoraru commented Jul 13, 2016

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/

@bookshelfdave
Copy link
Contributor

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.

@josb-mi
Copy link

josb-mi commented Jul 13, 2016

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

@smith
Copy link
Contributor

smith commented Jul 14, 2016

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

@bscott bscott self-assigned this Jul 15, 2016
@eeyun
Copy link
Contributor

eeyun commented Nov 17, 2016

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 #1060 for the Issue regarding documentation of running a depot.

@eeyun eeyun closed this as completed Nov 17, 2016
@christophermaier christophermaier added the Documentation Flags an issue / PR for attention by the technical documentation team label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Flags an issue / PR for attention by the technical documentation team
Projects
None yet
Development

No branches or pull requests

8 participants