Giter Site home page Giter Site logo

Comments (7)

ViViDboarder avatar ViViDboarder commented on May 14, 2024 1

Glad you’ve got it working! Your issue was that your config path was a path to a directory and not to the toml file.

from vaultwarden_ldap.

ViViDboarder avatar ViViDboarder commented on May 14, 2024

Could you share the rest of the logs? That error would only come after failing to load the config file at all. If it fails to load the config from file, it falls back to attempting to load it using environment variables. The error you got is saying that it’s not finding that key in the environment, which makes sense because you’re trying to load a config file.

from vaultwarden_ldap.

twobombs avatar twobombs commented on May 14, 2024

Thank you for your reply. Below is the full log. And the enviroment variables passed.

Screenshot 2021-11-16 at 09 09 36

16/11/2021 09:06:03Failed to open config file at /data
16/11/2021 09:06:03thread 'main' panicked at 'Error parsing config from env: missing value for field vaultwarden_url', src/config.rs:29:29
16/11/2021 09:06:03stack backtrace:
16/11/2021 09:06:03 0: backtrace::backtrace::libunwind::trace
16/11/2021 09:06:03 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
16/11/2021 09:06:03 1: backtrace::backtrace::trace_unsynchronized
16/11/2021 09:06:03 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
16/11/2021 09:06:03 2: std::sys_common::backtrace::_print_fmt
16/11/2021 09:06:03 at src/libstd/sys_common/backtrace.rs:78
16/11/2021 09:06:03 3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
16/11/2021 09:06:03 at src/libstd/sys_common/backtrace.rs:59
16/11/2021 09:06:03 4: core::fmt::write
16/11/2021 09:06:03 at src/libcore/fmt/mod.rs:1076
16/11/2021 09:06:03 5: std::io::Write::write_fmt
16/11/2021 09:06:03 at src/libstd/io/mod.rs:1537
16/11/2021 09:06:03 6: std::sys_common::backtrace::_print
16/11/2021 09:06:03 at src/libstd/sys_common/backtrace.rs:62
16/11/2021 09:06:03 7: std::sys_common::backtrace::print
16/11/2021 09:06:03 at src/libstd/sys_common/backtrace.rs:49
16/11/2021 09:06:03 8: std::panicking::default_hook::{{closure}}
16/11/2021 09:06:03 at src/libstd/panicking.rs:198
16/11/2021 09:06:03 9: std::panicking::default_hook
16/11/2021 09:06:03 at src/libstd/panicking.rs:217
16/11/2021 09:06:03 10: std::panicking::rust_panic_with_hook
16/11/2021 09:06:03 at src/libstd/panicking.rs:526
16/11/2021 09:06:03 11: rust_begin_unwind
16/11/2021 09:06:03 at src/libstd/panicking.rs:437
16/11/2021 09:06:03 12: std::panicking::begin_panic_fmt
16/11/2021 09:06:03 at src/libstd/panicking.rs:391
16/11/2021 09:06:03 13: vaultwarden_ldap::main
16/11/2021 09:06:03 14: std::rt::lang_start::{{closure}}
16/11/2021 09:06:03 15: std::rt::lang_start_internal::{{closure}}
16/11/2021 09:06:03 at src/libstd/rt.rs:52
16/11/2021 09:06:03 16: std::panicking::try::do_call
16/11/2021 09:06:03 at src/libstd/panicking.rs:348
16/11/2021 09:06:03 17: std::panicking::try
16/11/2021 09:06:03 at src/libstd/panicking.rs:325
16/11/2021 09:06:03 18: std::panic::catch_unwind
16/11/2021 09:06:03 at src/libstd/panic.rs:394
16/11/2021 09:06:03 19: std::rt::lang_start_internal
16/11/2021 09:06:03 at src/libstd/rt.rs:51
16/11/2021 09:06:03 20: main
16/11/2021 09:06:03 21: __libc_start_main
16/11/2021 09:06:03 22: _start
16/11/2021 09:06:03note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

from vaultwarden_ldap.

twobombs avatar twobombs commented on May 14, 2024

I've got the container running now because you mentioned the use of enviroment variables.
Errors in that sort of deployment are reported in the Docker logs and are easier to correct.
Thank you.

from vaultwarden_ldap.

itiser avatar itiser commented on May 14, 2024

i've got a similar problem, although i think i configured the path correct...

note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
thread 'main' panicked at 'Error parsing config from env: missing value for field vaultwarden_url', src/config.rs:29:29
stack backtrace:
Failed to parse config file at /data/config.toml: expected newline, found an identifier at line 2 column 46
0: rust_begin_unwind
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
1: std::panicking::begin_panic_fmt
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:460:5
2: vaultwarden_ldap::config::Config::from_file
3: vaultwarden_ldap::main
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

<<

docker-compose.yml (part of it)

volumes:
- /var/lib/docker/containers/vaultwarden_ldap/data:/data

 (with - /var/lib/docker/containers/vaultwarden_ldap/data/config.toml:/data/config.toml - same issue)

environment:
CONFIG_PATH: /data/config.toml
RUST_BACKTRACE: 1

config.toml

vaultwarden_url = "https://vault.domain.tld:443"
vaultwarden_admin_token = "verylongadmintoken"
ldap_host = "dc01.domain.tld"
ldap_bind_dn = "cn=administrator,dc=domain,dc=tld"
ldap_bind_password = "password"
ldap_sync_interval_seconds = 14400

Any Idea?

from vaultwarden_ldap.

itiser avatar itiser commented on May 14, 2024

the actually used admin token is not the above mentioned but contains the special character " - could this be the root cause?

from vaultwarden_ldap.

itiser avatar itiser commented on May 14, 2024

OK. I changed the admin token and removed special characters like " / \ and '. The problem is gone.

Now I have an issue with certificates mentioned in #39 ... :-)

from vaultwarden_ldap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.