[GH-ISSUE #524] Code panic - DNS resolution error not catched #331

Closed
opened 2026-03-03 01:28:04 +03:00 by kerem · 7 comments
Owner

Originally created by @Pandry on GitHub (Jul 4, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/524

Hello,
I am installing bitwarden_rs and I had this issue while installing it:
thread '<unnamed>' panicked at 'called Result::unwrap()on anErr value: Io(Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" })', src/libcore/result.rs:999:5
This issue was faced when inviting a user to the bitwarden_rs server via mail address, and I believe that bitwarden_rs cannot resolve the mail server address...
The issue was due to an issue in my docker installation but I believe that the issue should be catched from the application, instead of prompting and Unknown error.
Tomorrow (or in the weekend in case) if I'll find some time I'll try to solve the issue by myself.

Best regards,
Andrea

Originally created by @Pandry on GitHub (Jul 4, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/524 Hello, I am installing bitwarden_rs and I had this issue while installing it: `thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" })', src/libcore/result.rs:999:5` This issue was faced when inviting a user to the bitwarden_rs server via mail address, and I believe that bitwarden_rs cannot resolve the mail server address... The issue was due to an issue in my docker installation but I believe that the issue should be catched from the application, instead of prompting and `Unknown error`. Tomorrow (or in the weekend in case) if I'll find some time I'll try to solve the issue by myself. Best regards, Andrea
kerem closed this issue 2026-03-03 01:28:04 +03:00
Author
Owner

@dani-garcia commented on GitHub (Jul 5, 2019):

Is there more to that error message? You can set RUST_BACKTRACE=1 before starting the server and you might get a more specific error.

<!-- gh-comment-id:508796764 --> @dani-garcia commented on GitHub (Jul 5, 2019): Is there more to that error message? You can set `RUST_BACKTRACE=1` before starting the server and you might get a more specific error.
Author
Owner

@Pandry commented on GitHub (Jul 10, 2019):

I'll try to reproduce the issue later on making sure that the environment variable will be setted

<!-- gh-comment-id:510005310 --> @Pandry commented on GitHub (Jul 10, 2019): I'll try to reproduce the issue later on making sure that the environment variable will be setted
Author
Owner

@darcato commented on GitHub (Sep 20, 2019):

I have the same error, here is the full backtrace:

[2019-09-20 19:18:30][rocket::rocket][INFO] POST /api/accounts/password-hint application/json; charset=utf-8:
[2019-09-20 19:18:30][_][INFO] Matched: POST /api/accounts/password-hint (password_hint)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" })', src/libcore/result.rs:1084:5
stack backtrace:
 0: 0x549c5a98 - backtrace::backtrace::libunwind::trace::he8b122396753abc9
                     at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/libunwind.rs:88
 1: 0x549c5a98 - backtrace::backtrace::trace_unsynchronized::h4e994d61f067c55b
                     at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/mod.rs:66
 2: 0x549c5a98 - std::sys_common::backtrace::_print::hf2304b8d18b9a7b5
                     at src/libstd/sys_common/backtrace.rs:47
 3: 0x549c5a98 - std::sys_common::backtrace::print::h6db7463b6375a9cb
                     at src/libstd/sys_common/backtrace.rs:36
 4: 0x549c5a98 - std::panicking::default_hook::{{closure}}::hffa1ee36e6b8aa0d
                     at src/libstd/panicking.rs:200
 5: 0x549c567c - std::panicking::default_hook::heed9e44625b23256
                     at src/libstd/panicking.rs:214
 6: 0x549c6204 - std::panicking::rust_panic_with_hook::h2ce4c11cbb9ab2db
                     at src/libstd/panicking.rs:477
 7: 0x549c5e04 - std::panicking::continue_panic_fmt::h055f48850a0e8691
                     at src/libstd/panicking.rs:384
 8: 0x549c5cfc - rust_begin_unwind
                     at src/libstd/panicking.rs:311
 9: 0x549e0798 - core::panicking::panic_fmt::hd39929f6b65962b9
                     at src/libcore/panicking.rs:85
10: 0x549e0884 - core::result::unwrap_failed::hba83d9a1c7cbeac2
                     at src/libcore/result.rs:1084
11: 0x54194ee0 - bitwarden_rs::mail::send_email::h77b4fed1f64b6b95
12: 0x541902cc - bitwarden_rs::mail::send_password_hint::h365f80b0f2373356
13: 0x5421e8c0 - bitwarden_rs::api::core::accounts::rocket_route_fn_password_hint::hd85b5fe3dcb45906
14: 0x54866c64 - <F as rocket::handler::Handler>::handle::h96be1febeeb8bde2
15: 0x548581f4 - rocket::rocket::Rocket::route_and_process::h9bf7cb6b07e95efc
16: 0x54856970 - <rocket::rocket::Rocket as hyper::server::Handler>::handle::h4daefc21224a7b4b
17: 0x5486f85c - hyper::server::Worker<H>::handle_connection::hb9dadb7aa3000fb0
18: 0x548346a4 - hyper::server::listener::spawn_with::{{closure}}::h27fd920d535e1424
19: 0x548321f8 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4e15dfa81419bc4e
20: 0x5481fed4 - std::panicking::try::do_call::h29e8000d0195d5ba
21: 0x549ce0fc - __rust_maybe_catch_panic
                     at src/libpanic_unwind/lib.rs:80
22: 0x548399b4 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5aad7da524e1d7d8
23: 0x549b59b0 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h1cfb87d2dc96d0da
                     at /rustc/9b91b9c10e3c87ed333a1e34c4f46ed68f1eee06/src/liballoc/boxed.rs:922
24: 0x549cd5a8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h8a39c4cca4535a67
                     at /rustc/9b91b9c10e3c87ed333a1e34c4f46ed68f1eee06/src/liballoc/boxed.rs:922
25: 0x549cd5a8 - std::sys_common::thread::start_thread::h7e329a65d8bf3a8f
                     at src/libstd/sys_common/thread.rs:13
26: 0x549cd5a8 - std::sys::unix::thread::Thread::new::thread_start::he1b02aff11360f23
                     at src/libstd/sys/unix/thread.rs:79

I hope this helps to better handle the error!

Moreover, @Pandry how did you fix the problem?

<!-- gh-comment-id:533683390 --> @darcato commented on GitHub (Sep 20, 2019): I have the same error, here is the full backtrace: ``` [2019-09-20 19:18:30][rocket::rocket][INFO] POST /api/accounts/password-hint application/json; charset=utf-8: [2019-09-20 19:18:30][_][INFO] Matched: POST /api/accounts/password-hint (password_hint) thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" })', src/libcore/result.rs:1084:5 stack backtrace: 0: 0x549c5a98 - backtrace::backtrace::libunwind::trace::he8b122396753abc9 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/libunwind.rs:88 1: 0x549c5a98 - backtrace::backtrace::trace_unsynchronized::h4e994d61f067c55b at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/mod.rs:66 2: 0x549c5a98 - std::sys_common::backtrace::_print::hf2304b8d18b9a7b5 at src/libstd/sys_common/backtrace.rs:47 3: 0x549c5a98 - std::sys_common::backtrace::print::h6db7463b6375a9cb at src/libstd/sys_common/backtrace.rs:36 4: 0x549c5a98 - std::panicking::default_hook::{{closure}}::hffa1ee36e6b8aa0d at src/libstd/panicking.rs:200 5: 0x549c567c - std::panicking::default_hook::heed9e44625b23256 at src/libstd/panicking.rs:214 6: 0x549c6204 - std::panicking::rust_panic_with_hook::h2ce4c11cbb9ab2db at src/libstd/panicking.rs:477 7: 0x549c5e04 - std::panicking::continue_panic_fmt::h055f48850a0e8691 at src/libstd/panicking.rs:384 8: 0x549c5cfc - rust_begin_unwind at src/libstd/panicking.rs:311 9: 0x549e0798 - core::panicking::panic_fmt::hd39929f6b65962b9 at src/libcore/panicking.rs:85 10: 0x549e0884 - core::result::unwrap_failed::hba83d9a1c7cbeac2 at src/libcore/result.rs:1084 11: 0x54194ee0 - bitwarden_rs::mail::send_email::h77b4fed1f64b6b95 12: 0x541902cc - bitwarden_rs::mail::send_password_hint::h365f80b0f2373356 13: 0x5421e8c0 - bitwarden_rs::api::core::accounts::rocket_route_fn_password_hint::hd85b5fe3dcb45906 14: 0x54866c64 - <F as rocket::handler::Handler>::handle::h96be1febeeb8bde2 15: 0x548581f4 - rocket::rocket::Rocket::route_and_process::h9bf7cb6b07e95efc 16: 0x54856970 - <rocket::rocket::Rocket as hyper::server::Handler>::handle::h4daefc21224a7b4b 17: 0x5486f85c - hyper::server::Worker<H>::handle_connection::hb9dadb7aa3000fb0 18: 0x548346a4 - hyper::server::listener::spawn_with::{{closure}}::h27fd920d535e1424 19: 0x548321f8 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4e15dfa81419bc4e 20: 0x5481fed4 - std::panicking::try::do_call::h29e8000d0195d5ba 21: 0x549ce0fc - __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:80 22: 0x548399b4 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h5aad7da524e1d7d8 23: 0x549b59b0 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h1cfb87d2dc96d0da at /rustc/9b91b9c10e3c87ed333a1e34c4f46ed68f1eee06/src/liballoc/boxed.rs:922 24: 0x549cd5a8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h8a39c4cca4535a67 at /rustc/9b91b9c10e3c87ed333a1e34c4f46ed68f1eee06/src/liballoc/boxed.rs:922 25: 0x549cd5a8 - std::sys_common::thread::start_thread::h7e329a65d8bf3a8f at src/libstd/sys_common/thread.rs:13 26: 0x549cd5a8 - std::sys::unix::thread::Thread::new::thread_start::he1b02aff11360f23 at src/libstd/sys/unix/thread.rs:79 ``` I hope this helps to better handle the error! Moreover, @Pandry how did you fix the problem?
Author
Owner

@dani-garcia commented on GitHub (Sep 23, 2019):

It seems like bitwarden_rs can't resolve the SMTP server for some reason, does the server respond correctly if you ping it?

<!-- gh-comment-id:534218674 --> @dani-garcia commented on GitHub (Sep 23, 2019): It seems like bitwarden_rs can't resolve the SMTP server for some reason, does the server respond correctly if you ping it?
Author
Owner

@darcato commented on GitHub (Sep 23, 2019):

Yes, there was a problem with the network created by docker-compose, the DNS was not working properly as I could ping 8.8.8.8 but not google.com from any container attached to that network. Recreating it solved the issue.

Still, displaying a meaningful error to the user would be a good idea.

Thanks for the great project!

<!-- gh-comment-id:534221421 --> @darcato commented on GitHub (Sep 23, 2019): Yes, there was a problem with the network created by docker-compose, the DNS was not working properly as I could ping `8.8.8.8` but not `google.com` from any container attached to that network. Recreating it solved the issue. Still, displaying a meaningful error to the user would be a good idea. Thanks for the great project!
Author
Owner

@Pandry commented on GitHub (Sep 29, 2019):

Moreover, @Pandry how did you fix the problem?

If I remember correctly, I just inserted the correct address in the field.
This issue is about catching the DNS resolve query and throw an error like "impossible to resolve the DNS address, check the name and the DNS".
About the possible solutions, there are quite

  1. Setting the address in the host file
  2. Setting the DNS server in the definition of the service
  3. Setting a DNS server the docker's deamon.json configuration file

I will walk you briefly by the steps:

  1. Setting the address in the host file
    In the definion of the service, add the IP of your mail server
service:
  bitwarden_rs:
    image: bitwardenrs/server
    volumes:
      - /bw-data/:/data/
    extra_hosts:
      - "mailserver.fqdn:169.182.54.45"
  1. Set the DNS server of the service
service:
  bitwarden_rs:
    image: bitwardenrs/server
    volumes:
      - /bw-data/:/data/
    dns:
      - 192.168.1.2
      - 192.168.1.3
      - 1.1.1.1
  1. Edit the file /etc/docker/daemon.json (or, more probably, create it).
    Then add the DNS servers in a JSON-encoded manner; This should be how the file should look if you created it:
{
  "dns": ["192.168.1.2", "192.168.1.3", "1.1.1.1" ]
}

Also, sorry about the delay, unfortunately, lately, I don't open github anymore that ofter

I'll look to fix the issue by myself of I manage to find time today

Best regards,
@Pandry

<!-- gh-comment-id:536261561 --> @Pandry commented on GitHub (Sep 29, 2019): > Moreover, @Pandry how did you fix the problem? If I remember correctly, I just inserted the correct address in the field. This issue is about catching the DNS resolve query and throw an error like "impossible to resolve the DNS address, check the name and the DNS". About the possible solutions, there are quite 1. [Setting the address in the host file](https://docs.docker.com/compose/compose-file/#extra_hosts) 2. [Setting the DNS server](https://docs.docker.com/compose/compose-file/#dns) in the definition of the service 3. [Setting a DNS server](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) the docker's deamon.json configuration file I will walk you briefly by the steps: 1. [Setting the address in the host file](https://docs.docker.com/compose/compose-file/#extra_hosts) In the definion of the service, add the IP of your mail server ``` service: bitwarden_rs: image: bitwardenrs/server volumes: - /bw-data/:/data/ extra_hosts: - "mailserver.fqdn:169.182.54.45" ``` 2. Set the DNS server of the service ``` service: bitwarden_rs: image: bitwardenrs/server volumes: - /bw-data/:/data/ dns: - 192.168.1.2 - 192.168.1.3 - 1.1.1.1 ``` 3. Edit the file `/etc/docker/daemon.json` (or, more probably, create it). Then add the DNS servers in a JSON-encoded manner; This should be how the file should look if you created it: ``` { "dns": ["192.168.1.2", "192.168.1.3", "1.1.1.1" ] } ``` Also, sorry about the delay, unfortunately, lately, I don't open github anymore that ofter I'll look to fix the issue by myself of I manage to find time today Best regards, @Pandry
Author
Owner

@dani-garcia commented on GitHub (May 13, 2020):

Closed due to inactivity.

<!-- gh-comment-id:628276082 --> @dani-garcia commented on GitHub (May 13, 2020): Closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#331
No description provided.