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

Daemon not detected when directly started from hyperspace #51

Open
DieracDelta opened this issue Aug 21, 2021 · 5 comments
Open

Daemon not detected when directly started from hyperspace #51

DieracDelta opened this issue Aug 21, 2021 · 5 comments

Comments

@DieracDelta
Copy link

DieracDelta commented Aug 21, 2021

When I start hypercore with hyperspace --storage $STORAGE --host $HOST --port $PORT, then run:

❯ ps -aux | rg hyp
jrestivo 1067902  0.1  0.0 635796 54572 ?        SLsl 11:08   0:00 /nix/store/5kkjf5wvfvclqj76k9f69c95gw5mfbhc-nodejs-14.17.4/bin/node /nix/store/if04chi2qyhxr5mvifmq9wfhswydj3ms-hyperspace/bin/hyperspace --storage ~/.hyperspace --host hyperspace --port 0
jrestivo 1069029  0.0  0.0   9644  6232 pts/11   S+   11:11   0:00 rg hyp
flakes [$!+?]
❯ hyp info
The daemon is not active. Please run:

  hyp daemon start
❯ hyp daemon status
Hyperspace v3.19.0
Hyperspace API v1.15.1
Your address:  (Not Hole-punchable)

This is preventing me from using any of the hyp commands. Any advice? Both hyp info and hyp daemon start connect to the daemon, as it prints out:

Remote client opened
Remote client closed
@DieracDelta DieracDelta changed the title Daemon not detected when directly started from hypercore Daemon not detected when directly started from hyperspace Aug 21, 2021
@pfrazee
Copy link
Contributor

pfrazee commented Aug 21, 2021

If you're using a --host other than the default, you'll need to pass that param to hyp daemon status too

@DieracDelta
Copy link
Author

I've added --host to both invocations. Same output:

❯ hyp --host hyperspace info
The daemon is not active. Please run:

  hyp daemon start
❯ hyp --host hyperspace daemon status
Hyperspace v3.19.0
Hyperspace API v1.15.1
Your address:  (Not Hole-punchable)

@pfrazee
Copy link
Contributor

pfrazee commented Aug 21, 2021

Ah, it looks like the hyp CLI isn't respecting this config: https://github.com/hypercore-protocol/cli/blob/master/lib/hyper/index.js#L16 and https://github.com/hypercore-protocol/cli/blob/master/lib/commands/daemon/status.js#L20 (and a few other spots)

We should either add a CLI flag or an env var. Any thoughts on which?

cc @andrewosh @mafintosh

@DieracDelta
Copy link
Author

What would the CLI flag/env var be specifying? From a usability standpoint, either sounds fine on my end as a user.

@EternalDeiwos
Copy link

I tried making some local modifications to this for testing and I would also mention that the hyperspace-mirroring-service is also a daemon that needs to be running for the CLI to work. I've been trying for the last while to get that running in a Docker container and I can't make sense of it; its pretty ambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants