Comments (6)
No need to apologize. 😄
It seems like you're running in a container but that the path you're providing in the env variable is actually the absolute path on the host, not the path from within the container. When you spun up the container and added a volume for the config file, where did you mount it?
When using Docker, you can just mount the config file to the default location directly. That way you don't have to set the env variable at all. Here's what I typically do in the example compose file. https://github.com/ViViDboarder/bitwarden_rs_ldap/blob/master/docker-compose.yml#L8
If you're running on the command line, it'd be something more like:
docker run -d -v $(pwd)/config.toml:/usr/src/bitwarden_rs_ldap/config.toml:ro vividboarder/bitwarden_rs_ldap
If you don't like that location in the container, you can pass anything and set the env var. Eg.
docker run -d -v $(pwd)/config.toml:/container/path/config.toml:ro -e CONFIG_FILE=/container/path/config.toml vividboarder/bitwarden_rs_ldap
Key being that the destination path matches the env var, not the source path.
from vaultwarden_ldap.
Hi mate,
Thanks heaps for the fast reply and being understanding! I'm still a little bit confused though, I'm unsure what to put in for the container, or does it not matter as long as the config_path variable matches?
https://pasteboard.co/IGyJqO6.png
Edit:
Just tried /config:/mnt/nfs/synology/bitwardenldap and CONFIG_FILE=/config/config.toml and same error;
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.,
thread 'main' panicked at 'Failed to open config file at config.toml', src/config.rs:25:9
from vaultwarden_ldap.
Enabled backtrace;
2019-11-15T02:17:09.741965803Z 14: _start
2019-11-15T02:17:13.546717783Z thread 'main' panicked at 'Failed to open config file at config.toml', src/config.rs:25:9
2019-11-15T02:17:13.554265864Z stack backtrace:
2019-11-15T02:17:13.554345228Z 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
2019-11-15T02:17:13.570052717Z at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
2019-11-15T02:17:13.570074374Z 1: std::sys_common::backtrace::_print
2019-11-15T02:17:13.570082600Z at src/libstd/sys_common/backtrace.rs:70
2019-11-15T02:17:13.570089905Z 2: std::panicking::default_hook::{{closure}}
2019-11-15T02:17:13.570098971Z at src/libstd/sys_common/backtrace.rs:58
2019-11-15T02:17:13.570106266Z at src/libstd/panicking.rs:200
2019-11-15T02:17:13.570113197Z 3: std::panicking::default_hook
2019-11-15T02:17:13.570120953Z at src/libstd/panicking.rs:215
2019-11-15T02:17:13.570127987Z 4: std::panicking::rust_panic_with_hook
2019-11-15T02:17:13.570135833Z at src/libstd/panicking.rs:478
2019-11-15T02:17:13.570143726Z 5: std::panicking::continue_panic_fmt
2019-11-15T02:17:13.570176715Z at src/libstd/panicking.rs:385
2019-11-15T02:17:13.570205002Z 6: std::panicking::begin_panic_fmt
2019-11-15T02:17:13.570215521Z at src/libstd/panicking.rs:340
2019-11-15T02:17:13.570222928Z 7: bitwarden_rs_ldap::main
2019-11-15T02:17:13.570267459Z 8: std::rt::lang_start::{{closure}}
2019-11-15T02:17:13.570278074Z 9: std::panicking::try::do_call
2019-11-15T02:17:13.570285261Z at src/libstd/rt.rs:49
2019-11-15T02:17:13.570292264Z at src/libstd/panicking.rs:297
2019-11-15T02:17:13.570315887Z 10: __rust_maybe_catch_panic
2019-11-15T02:17:13.570427953Z at src/libpanic_unwind/lib.rs:92
2019-11-15T02:17:13.570440740Z 11: std::rt::lang_start_internal
2019-11-15T02:17:13.570448210Z at src/libstd/panicking.rs:276
2019-11-15T02:17:13.570455214Z at src/libstd/panic.rs:388
2019-11-15T02:17:13.570472186Z at src/libstd/rt.rs:48
2019-11-15T02:17:13.570480283Z 12: main
2019-11-15T02:17:13.570487295Z 13: __libc_start_main
from vaultwarden_ldap.
Yea. Make sure path in container matches the variable that you set.
from vaultwarden_ldap.
Hi mate,
I tried this;
docker run -d -v /config.toml:/mnt/nfs/synology/bitwardenldap/config.toml:ro vividboarder/bitwarden_rs_ldap
and I'm still getting the "failed to open config.toml" error :(
from vaultwarden_ldap.
You have your source and destination swapped. I'm assuming the file is actually sitting at /mnt/nfs/synology/bitwardenldap/config.toml
. If so, you'll want to do:
docker run -d -v /mnt/nfs/synology/bitwardenldap/config.toml:/usr/src/bitwarden_rs_ldap/config.toml:ro vividboarder/bitwarden_rs_ldap
from vaultwarden_ldap.
Related Issues (20)
- Crashing when encountering users without an email address HOT 3
- ldap login problem HOT 1
- Clarify documentation on intent of application HOT 2
- Unable to Sync Users with Vaultwarden instance HOT 1
- Enable environment variable with the ID of the organization to which users are to be invited HOT 1
- LDAP Sync Problem HOT 2
- Cannot open admin portal on http://localhost:8001 HOT 1
- vividboarder/vaultwarden_ldap:alpine image not updated HOT 4
- Do not use "restart = unless stopped" (docker-compose) and "ldap_sync_loop = false" (config.toml) ! HOT 1
- Request a feature HOT 1
- Disable users that vanished from LDAP HOT 7
- Proper communication with LDAP HOT 2
- Group / organization support? HOT 2
- LDAP login authentication failure HOT 6
- Anonymous bind enabled? HOT 1
- Can support ldap group members HOT 3
- Help translating ldapsearch query into working config HOT 1
- LDAP Synchronization with Microsoft Active Directory LDAP not working HOT 1
- The data will be cleared if to execute `docker-compose up` HOT 6
- Bind DN to authenticate is empty when using Authentik LDAP HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaultwarden_ldap.