fedimint / fedimint

Federated E-Cash Mint
https://fedimint.org/
MIT License
536 stars 209 forks source link

just mprocs does not work on macOS #3136

Closed joschisan closed 3 months ago

joschisan commented 8 months ago

guardian processes just show this error:

tail: cannot open '/tmp/nix-shell.6RUytq/nix-shell.obbI8b/fm-OUoW/logs/fedimintd-0.log' for reading: No such file or directory

a-moreira commented 8 months ago

@joschisan I have been able to run just mprocs on a macOS M1 yesterday with no problems. How did you install Nix? Did you follow the instructions here? What version of macOS are you using? Is it Apple Silicon or Intel?

dpc commented 8 months ago

tail: cannot open '/tmp/nix-shell.6RUytq/nix-shell.obbI8b/fm-OUoW/logs/fedimintd-0.log' for reading: No such file or directory

This might be expected. Possibly devimint did not start fedimintd yet. Check what devimint tab is showing.

joschisan commented 8 months ago

tail: cannot open '/tmp/nix-shell.6RUytq/nix-shell.obbI8b/fm-OUoW/logs/fedimintd-0.log' for reading: No such file or directory

This might be expected. Possibly devimint did not start fedimintd yet. Check what devimint tab is showing.

2023-09-12T12:13:17.526238Z INFO devimint: Test setup in "/tmp/nix-shell.6RUytq/nix-shell.obbI8b/nix-shell.ymmLPM/fm-iF8U/cfg" 2023-09-12T12:13:17.528868Z WARN devimint::external: Failed to create wallet ... retrying JSON-RPC error: transport error: Couldn't connect to host: Connection refused (os error 61) LOG_DEVIMINT="devimint" 2023-09-12T12:13:38.445280Z INFO devimint::util: sending SIGKILL to bitcoind and waiting for it to exit LOG_DEVIMINT="devimint" 2023-09-12T12:13:38.462070Z WARN devimint: Main process failed with JSON-RPC error: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 35), will shutdown Error: JSON-RPC error: transport error: Couldn't connect to host: Resource temporarily unavailable (os error 35)

dpc commented 8 months ago

2023-09-12T12:13:38.445280Z INFO devimint::util: sending SIGKILL to bitcoind and waiting for it to exit LOG_DEVIMINT="devimint"

This doesn't look good. Is there a chance you have a regtest bitcoind already running?

joschisan commented 8 months ago

This doesn't look good. Is there a chance you have a regtest bitcoind already running?

If so only if it could have been started in an earlier test of my pr and somehow was not killed. Never started anything explicitly.

justinmoon commented 8 months ago

I was just debugging this with @joschisan a bit. I also have an m2 mac and I tried just mprocs on exactly the same commit today and had no issues. It doesn't seem like the issue is some daemon continuing to run in the background because he restarted his computer and had same issue. I don't think he's running bitcoind or lnd or anything else like that outside of fedimint dev environment which might conflict.

It seems like devimint is trying to do json-rpc with bitcoind, that fails because bitcoind hasn't started up, and devimint just exits. But not sure because 2023-09-12T12:13:17.528868Z WARN devimint::external: Failed to create wallet ... retrying JSON-RPC error: transport error: Couldn't connect to host: Connection refused (os error 61) LOG_DEVIMINT="devimint" log doesn't contain enough context to know exactly what is trying to do json-rpc. Another thing that's weird is that the next line in the logs says it's sending SIGKILL to bitcoind, but bitc oind continues to run in his mprocs UI.

dpc commented 8 months ago

Try in nix develop --ignore-environment shell BTW.

dpc commented 8 months ago

@joschisan Did it ever got resolved?

joschisan commented 8 months ago

@joschisan Did it ever got resolved?

@justinmoon wanted to look into it

justinmoon commented 8 months ago

I couldn't replicate. Don't understand what's wrong.

dpc commented 8 months ago

Can you capture the $FM_DATA_DIR, tar it and send it to me?

justinmoon commented 6 months ago

@joschisan Did we resolve this?

joschisan commented 6 months ago

@joschisan Did we resolve this?

no, I can not run most tests locally because of this.

dpc commented 6 months ago

Can you capture the $FM_DATA_DIR, tar it and send it to me?

:point_up: @joschisan

justinmoon commented 3 months ago

@joschisan told me this works now