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

Could not setup db: timed out waiting for connection #65

Closed
marimes opened this issue May 30, 2024 · 7 comments · Fixed by #66
Closed

Could not setup db: timed out waiting for connection #65

marimes opened this issue May 30, 2024 · 7 comments · Fixed by #66

Comments

@marimes
Copy link

marimes commented May 30, 2024

OS: Linux a64 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 GNU/Linux

  • cloned this repo (8a2812f)
  • proceeded according to README, everything compiled well
  • opened new shell
  • ran nix develop and just test

Error outputs:

(nix:nix-shell-env) marius@a64:~/harbor$ just test
cargo test 
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.25s
     Running unittests src/main.rs (target/debug/deps/harbor-38be1f29cffa8cd7)

running 6 tests
test db::tests::test_onchain_receive_db ... FAILED
test db::tests::test_onchain_payment_db ... FAILED
test db::tests::test_insert_new_federation ... FAILED
test db::tests::test_lightning_payment_db ... FAILED
test db::tests::test_lightning_receive_db ... FAILED
test db::tests::test_seed ... FAILED

failures:

---- db::tests::test_onchain_receive_db stdout ----
thread 'db::tests::test_onchain_receive_db' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- db::tests::test_onchain_payment_db stdout ----
thread 'db::tests::test_onchain_payment_db' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection

---- db::tests::test_insert_new_federation stdout ----
thread 'db::tests::test_insert_new_federation' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection

---- db::tests::test_lightning_payment_db stdout ----
thread 'db::tests::test_lightning_payment_db' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection

---- db::tests::test_lightning_receive_db stdout ----
thread 'db::tests::test_lightning_receive_db' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection

---- db::tests::test_seed stdout ----
thread 'db::tests::test_seed' panicked at src/db.rs:426:54:
Could not setup db: timed out waiting for connection


failures:
    db::tests::test_insert_new_federation
    db::tests::test_lightning_payment_db
    db::tests::test_lightning_receive_db
    db::tests::test_onchain_payment_db
    db::tests::test_onchain_receive_db
    db::tests::test_seed

test result: FAILED. 0 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.00s
@benthecarman
Copy link
Contributor

If you change this line from 5 secs to 30 does it fix?

https://github.com/MutinyWallet/harbor/blob/82fc5b2802fb7240d463779168a6b59f29c68dc0/src/db.rs#L25

@marimes
Copy link
Author

marimes commented May 30, 2024

yes, that worked 👍🏻
now just run produces the next error:

(nix:nix-shell-env) marius@a64:~/harbor$ just run
RUST_LOG=harbor=debug,iced_wgpu=error,wgpu_core=error,info cargo run 
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s
     Running `target/debug/harbor`
thread 'main' panicked at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/winit/src/application.rs:153:10:
Create event loop: Os(OsError { line: 81, file: "/home/marius/.cargo/git/checkouts/winit-57d3141eaf559308/8affa52/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoWaylandLib)) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@benthecarman
Copy link
Contributor

You might have to do just run without nix develop beforehand. We're still figuring out how to get it working in nix for every platform

@marimes
Copy link
Author

marimes commented May 30, 2024

Here is the error log of just run:

(nix:nix-shell-env) marius@a64:~/harbor$ just run
RUST_LOG=harbor=debug,iced_wgpu=error,wgpu_core=error,info cargo run 
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s
     Running `target/debug/harbor`
thread 'main' panicked at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/winit/src/application.rs:153:10:
Create event loop: Os(OsError { line: 81, file: "/home/marius/.cargo/git/checkouts/winit-57d3141eaf559308/8affa52/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoWaylandLib)) })
stack backtrace:
   0: rust_begin_unwind
             at /rustc/ef0027897d2e9014766fb47dce9ddbb925d2f540/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/ef0027897d2e9014766fb47dce9ddbb925d2f540/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/ef0027897d2e9014766fb47dce9ddbb925d2f540/library/core/src/result.rs:1654:5
   3: core::result::Result<T,E>::expect
             at /rustc/ef0027897d2e9014766fb47dce9ddbb925d2f540/library/core/src/result.rs:1034:23
   4: iced_winit::application::run
             at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/winit/src/application.rs:151:22
   5: iced::application::Application::run
             at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/src/application.rs:215:12
   6: iced::program::Program<P>::run_with
             at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/src/program.rs:247:9
   7: iced::program::Program<P>::run
             at /home/marius/.cargo/git/checkouts/iced-f01cba4d5e61fd0a/b30d34f/src/program.rs:171:9
   8: harbor::main
             at ./src/main.rs:35:5
   9: core::ops::function::FnOnce::call_once
             at /rustc/ef0027897d2e9014766fb47dce9ddbb925d2f540/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: Recipe `run` failed on line 8 with exit code 101

OK, I exited nix and tried cargo run but that produced a ton or error messages.

@TonyGiorgio
Copy link
Contributor

OK, I exited nix and tried cargo run but that produced a ton or error messages.

Running in nix on linux currently has problems: #7

So the only way to run this on linux at the moment is to build outside of nix. Unfortunately, that means a bunch of required development environment libraries like openssl libraries, crypto libraries, etc. I would imagine these are your errors? Only way through them would be one at a time. If you were able to solve them, it would help to have this documented so we can tell people what to install if outside of nix.

@marimes
Copy link
Author

marimes commented May 31, 2024

Thanks, I see. I do get linker errors like /usr/bin/ld: cannot find -lsqlcipher: No such file or directory
Is there a list of dependencies I need to install to build with cargo directly?

@benthecarman
Copy link
Contributor

You need sqlcypher. You can also just run with --features vendored

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

Successfully merging a pull request may close this issue.

3 participants