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

keep getting "the daemon is not active" even after running hyp daemon start #52

Open
resession opened this issue Sep 6, 2021 · 18 comments

Comments

@resession
Copy link

resession commented Sep 6, 2021

restarted computer, reinstalled hypercore-cli but i still keep getting "the daemon is not active", any ideas to fix this?

@metanomial
Copy link

Encountering the same issue on two machines. Debian Buster and Windows 10 both running Node.js 16.9.1. I am not encountering this on a third Debian Buster instance running Node 16.9.1, where the daemon starts and is seeding.

PS C:\Users\metanomial> hyp daemon start
Hyperspace daemon started
Mirroring daemon started
Daemon is running.
PS C:\Users\metanomial> hyp daemon status
Daemon not active

@cablehead
Copy link

cablehead commented Sep 30, 2021

I'm seeing this as well on macOS 11.5.2, node 16.9.1. A workaround for me was to install hyperspace directly npm i hyperspace -g and run the daemon directly in the foreground using $ hyperspace

Actually, that fixed hyp daemon status but other commands, hyp info, hyp create drive, still report The daemon is not active.

@Octalbyte
Copy link
Contributor

I am having this same issue. I can't create hyperdrives.

@Octalbyte
Copy link
Contributor

Octalbyte commented Dec 1, 2021

I guess this has something to do with the address not being hole-punchable?
First terminal:
image
Second one:
image
When I tried to hyp create drive, hyp daemon start or hyp daemon status first terminal would log:
Remote client opened
Remote client closed

@ralphtheninja
Copy link

I also had this problem, but downgraded node to v14 and then it worked. Unsure if that was related, but that was something that changed that made it work. Could be worth trying out at least.

@felixdrp
Copy link

I am having this same issue. I can't create hyperdrives.

$ hyp daemon start
Hyperspace daemon started
Mirroring daemon started
Daemon is running.
$ hyp daemon status
Daemon not active
$ node -v 
v17.2.0

@ralphtheninja
Copy link

It would be nice if some of you could try downgrading node to version 14 and see if that helps you.

@specious
Copy link

specious commented Jan 1, 2022

I cloned the git repo to troubleshoot this issue.

It prints The daemon is not active when running anything other than hyp daemon or hyp beam because hyper.setup() fails:

cli/bin/hyp.js

Lines 104 to 114 in cd56bb6

try {
if (!obj.name.startsWith('daemon') && obj.name !== 'beam') {
await hyper.setup()
}
} catch (err) {
console.error('The daemon is not active. Please run:')
console.error('')
console.error(' hyp daemon start')
console.error('')
process.exit(2)
}

Which fails because it fails to connect to either hyperspace or the mirroring service:

cli/lib/hyper/index.js

Lines 15 to 18 in cd56bb6

export async function setup ({canStartDaemon} = {canStartDaemon: false}) {
await setupClient('hyperspace', 'Hyperspace', () => new HyperspaceClient(), canStartDaemon)
await setupClient('hyperspace-mirroring-service', 'Mirroring', () => new MirroringClient(), canStartDaemon)
}

So far, I got it working by simply:

$ npm i -g hyperspace hyperspace-mirroring-service
$ hyperspace
$ hyperspace-mirroring-service

Now it works:

$ hyp info --live
No hypers active.

specious added a commit to specious/cli that referenced this issue Jan 3, 2022
…rocess

The spawned daemon processes don't tend to stay running without this option being provided.

Fixes hypercore-protocol#52
@alexindigo
Copy link

alexindigo commented Jan 9, 2022

Same here, node v16.13.1, macos 12.1.
It should be "auto-connecting", right?

Also BeakerBrowser couldn't connect to hyper:// addresses either, not sure if it's related or not.

@specious
Copy link

specious commented Jan 9, 2022

Check out PR #57 and see if it works.

@robindiddams
Copy link

was on node 17, downgraded to 14 and it worked

@ghost
Copy link

ghost commented Feb 7, 2022

Check out PR #57 and see if it works.

worked for me 👍

@dwehrmann
Copy link

Linux with node v16.13.2 does not work, either. Same behaviour.

@marvinpoo
Copy link

Downgraded to Nodejs v14 after all these comments. Still getting the same response.

$ hyp daemon start
Hyperspace daemon started
Mirroring daemon started
Daemon is running.
$ hyp info --live
The daemon is not active. Please run:

  hyp daemon start

@specious
Copy link

specious commented Mar 4, 2022

If someone could look at PR #57 that would be very helpful.

@pfrazee, could you take a moment?

@pfrazee
Copy link
Contributor

pfrazee commented Mar 4, 2022

@specious I'm sorry, I really can't -- I'm engaged with a new job rn, I have to punt this to the hypercore team

@marvinpoo
Copy link

If someone could look at PR #57 that would be very helpful.

@pfrazee, could you take a moment?

This hotfix seems to solve the problem.
Thank you!

@luandro
Copy link

luandro commented Mar 10, 2022

Solves it 🎉

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