-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to mount configuration.yml #1053
Comments
Hello @dylanh50, can you please give us a pointer to what docker-compose exactly you're referring to? If you followed a documentation, can you also please tell us which one so that we can fix it? On my side, I've just tested against the master branch and it seems to work. |
Sure, I've cloned the Git-Repository and removed the Traefik container, because I'm already running an instance of Traefik (which works actually fine with my other containers).
I hope you can help me. Thanks in advanced. |
I suggest you follow the documentation and move step by step from there: https://docs.authelia.com/getting-started. |
I removed everything an tried again, step by step. Still the same error. I really have no clue how to debug this error too |
Can you run the following command against the container name of your Authelia instance when it's running: docker exec cat /etc/authelia/configuration.yml |
This produces
this error message |
So I've tried everything again on another fresh server with freshly installed docker, docker-compose and traefik. Still produces the same error message. This is the compose file for traefik:
The compose file for authelia:
The configuration file:
Both, the compose and configuration is in /home/user/docker/authelia, owned by the user have read/write permission for owner and group, read permission for others. Maybe this helps anyone to find an error |
Thanks for the additional info, makes sense that my previous command would fail. Do the following inside the authelia docker-compose dir: mkdir config - ./configuration.yml:/etc/authelia/configuration.yml:ro
- ./users_database.yml:/etc/authelia/users_database.yml becomes - ./config:/etc/authelia |
I did that, but no changes at all. Tried it on both server and both gave the same error message. Also downloadable via my nextcloud instance from here |
Just to make sure there's no artifacts that are hanging back can you try the following:
From what I can see in both your compose file and the configuration you shouldn't be experiencing that issue. |
Still no changes, still the same error. Is this maybe a problem with docker itself or an permission problem? But I tried everything with my admin and my root. The |
I'd suggest your best bet to try and get this resolved would be to jump on Matrix and one of the team members can actively work with you to determine what's going on and how to fix it. Between now and then, could you please provide the output to |
What is matrix? Can you give me a link or something? Here is the output of the inspect
|
I have exactly same issue right now. Hopefully, someone can help |
My problem was resolved. In my case this line "disable_startup_check: false" under notifier in config file was causing issue. I removed that and it works right now. @dylanh50 try using this for storage and notifier on your config file to see if it works for you: storage: notifier: |
Per our README.md: Matrix. |
@vmoalemi Thanks for the tip. I've tried but unfortunately it didn't change anything. I still get the error message and authelia isn't starting. |
I've started having issues as well. It looks like a rogue volume is being created and mounted at /etc/authelia and thats overwriting my mounts for my config at /etc/authelia/configuration.yml |
What version of Docker are you guys running? An additional volume will be created if you are mounting in the For example here's my definition of the Authelia container: authelia:
image: authelia/authelia:master
container_name: authelia
volumes:
- /srv/docker/.ldap/authelia:/var/lib/authelia
- /srv/docker/.ldap/authelia/config.yml:/etc/authelia/configuration.yml:ro
networks:
- net
dns:
- 172.18.0.254
- 10.10.10.254
expose:
- 9091
restart: unless-stopped
environment:
- TZ=Australia/Melbourne Docker created a volume to host If you look deeper into the location of your volume:
Notice how the file is 0 bytes? It's actually just a pointer to the configuration which is explicitly bind mounted in from your other location on the host. |
docker info
docker version
Ok, that makes sense. Its strange, It has been working fine for the last 48 hours. I'm not sure what changed to cause it to stop reading the config file. |
Based on the information provided, the Even the inspect seems to suggest that the bind mount is successful so it's really a matter of why that doesn't seem to work. If any of you guys can jump on Matrix I'm happy to walk through and debug some stuff with you. However, If you're comfortable enough to do it yourself try set the entrypoint/command of the container to something like |
Same issue here as well and all my files are identical to the OP.
my config file doesn't have this line tho :/
Yeah, the files are correctly placed (and their content, ofc) inside the container. |
What happens when you run |
This:
Now I'm thinking that it might be something with permissions? But they seem just fine |
Can you paste your full I’ll have a look at it first thing in the morning. I don’t think it’s permissions related, the container runs as root so it should be able to read whatever you throw at it. |
First of all, thank you so much @nightah for your support! |
I encountered this problem as well. After some trial-and-error, what fixed the missing configs issue was to enclose all domain names in
Hope this helps someone. |
Thanks @ppatrzyk I just got up and found the same thing in my testing when replicating everyones setups. Also it's only domains starting with the |
Will give it a go and report back in a couple days. |
This worked for me. I enclosed all domains with quotes and so Authelia started prefectly fine. Thanks @james-d-elliott |
Got some time this morning. All domains in quotes and Authelia started no issues. Thanks @james-d-elliott and @ppatrzyk |
If the configuration yaml is poorly indented or special values are not appropriately escaped Authelia attempts to load said configuration and fails. This attempts to unmarshal the config into an empty interface to catch and warn on malformed yaml. Using the example from issue #1053 (comment) ```yaml host: 0.0.0.0 port: 9091 log_level: debug jwt_secret: RUtG9TnbXrOl1XLLmDgySw1DGgx9QcrtepIf1uDDBlBVKFZxkVBruYKBi32PvaU default_redirection_url: example.com totp: issuer: example.com period: 30 skew: 1 authentication_backend: file: path: /etc/authelia/users_database.yml access_control: default_policy: deny rules: - domain: example.com policy: bypass - domain: "*.example.com" policy: one_factor session: name: authelia_session secret: TVPMIcDFbBwhnW3kLJzKhdjeHhtqisr7m28FgRY8oLh2A4lwuV2jV2ZGdGbh4aa expiration: 3600 inactivity: 300 domain: example.com regulation: max_retries: 3 find_time: 120 ban_time: 300 storage: mysql: host: example.com port: 3306 database: authelia username: authelia password: example.com notifier: smtp: username: example.com password: example.com host: smtp.gmail.com port: 465 sender: example.com ``` We would actually get a more meaningful error which helps pinpoint the issue: `Error malformed yaml: line 23: did not find expected alphabetic or numeric character`
If the configuration yaml is poorly indented or special values are not appropriately escaped Authelia attempts to load said configuration and fails. This attempts to unmarshal the config into an empty interface to catch and warn on malformed yaml. Using the example from issue #1053 (comment) ```yaml host: 0.0.0.0 port: 9091 log_level: debug jwt_secret: RUtG9TnbXrOl1XLLmDgySw1DGgx9QcrtepIf1uDDBlBVKFZxkVBruYKBi32PvaU default_redirection_url: example.com totp: issuer: example.com period: 30 skew: 1 authentication_backend: file: path: /etc/authelia/users_database.yml access_control: default_policy: deny rules: - domain: example.com policy: bypass - domain: "*.example.com" policy: one_factor session: name: authelia_session secret: TVPMIcDFbBwhnW3kLJzKhdjeHhtqisr7m28FgRY8oLh2A4lwuV2jV2ZGdGbh4aa expiration: 3600 inactivity: 300 domain: example.com regulation: max_retries: 3 find_time: 120 ban_time: 300 storage: mysql: host: example.com port: 3306 database: authelia username: authelia password: example.com notifier: smtp: username: example.com password: example.com host: smtp.gmail.com port: 465 sender: example.com ``` We would actually get a more meaningful error which helps pinpoint the issue: `Error malformed yaml: line 23: did not find expected alphabetic or numeric character`
If the configuration yaml is poorly indented or special values are not appropriately escaped Authelia attempts to load said configuration and fails. This attempts to unmarshal the config into an empty interface to catch and warn on malformed yaml. Using the example from issue #1053 (comment) ```yaml host: 0.0.0.0 port: 9091 log_level: debug jwt_secret: RUtG9TnbXrOl1XLLmDgySw1DGgx9QcrtepIf1uDDBlBVKFZxkVBruYKBi32PvaU default_redirection_url: example.com totp: issuer: example.com period: 30 skew: 1 authentication_backend: file: path: /etc/authelia/users_database.yml access_control: default_policy: deny rules: - domain: example.com policy: bypass - domain: "*.example.com" policy: one_factor session: name: authelia_session secret: TVPMIcDFbBwhnW3kLJzKhdjeHhtqisr7m28FgRY8oLh2A4lwuV2jV2ZGdGbh4aa expiration: 3600 inactivity: 300 domain: example.com regulation: max_retries: 3 find_time: 120 ban_time: 300 storage: mysql: host: example.com port: 3306 database: authelia username: authelia password: example.com notifier: smtp: username: example.com password: example.com host: smtp.gmail.com port: 465 sender: example.com ``` We would actually get a more meaningful error which helps pinpoint the issue: `Error malformed yaml: line 23: did not find expected alphabetic or numeric character`
If the configuration yaml is poorly indented or special values are not appropriately escaped Authelia attempts to load said configuration and fails. This attempts to unmarshal the config into an empty interface to catch and warn on malformed yaml. Using the example from issue #1053 (comment) ```yaml host: 0.0.0.0 port: 9091 log_level: debug jwt_secret: RUtG9TnbXrOl1XLLmDgySw1DGgx9QcrtepIf1uDDBlBVKFZxkVBruYKBi32PvaU default_redirection_url: example.com totp: issuer: example.com period: 30 skew: 1 authentication_backend: file: path: /etc/authelia/users_database.yml access_control: default_policy: deny rules: - domain: example.com policy: bypass - domain: "*.example.com" policy: one_factor session: name: authelia_session secret: TVPMIcDFbBwhnW3kLJzKhdjeHhtqisr7m28FgRY8oLh2A4lwuV2jV2ZGdGbh4aa expiration: 3600 inactivity: 300 domain: example.com regulation: max_retries: 3 find_time: 120 ban_time: 300 storage: mysql: host: example.com port: 3306 database: authelia username: authelia password: example.com notifier: smtp: username: example.com password: example.com host: smtp.gmail.com port: 465 sender: example.com ``` We would actually get a more meaningful error which helps pinpoint the issue: `Error malformed yaml: line 23: did not find expected alphabetic or numeric character`
If the configuration yaml is poorly indented or special values are not appropriately escaped Authelia attempts to load said configuration and fails. This attempts to unmarshal the config into an empty interface to catch and warn on malformed yaml. Using the example from issue #1053 (comment) ```yaml host: 0.0.0.0 port: 9091 log_level: debug jwt_secret: RUtG9TnbXrOl1XLLmDgySw1DGgx9QcrtepIf1uDDBlBVKFZxkVBruYKBi32PvaU default_redirection_url: example.com totp: issuer: example.com period: 30 skew: 1 authentication_backend: file: path: /etc/authelia/users_database.yml access_control: default_policy: deny rules: - domain: example.com policy: bypass - domain: "*.example.com" policy: one_factor session: name: authelia_session secret: TVPMIcDFbBwhnW3kLJzKhdjeHhtqisr7m28FgRY8oLh2A4lwuV2jV2ZGdGbh4aa expiration: 3600 inactivity: 300 domain: example.com regulation: max_retries: 3 find_time: 120 ban_time: 300 storage: mysql: host: example.com port: 3306 database: authelia username: authelia password: example.com notifier: smtp: username: example.com password: example.com host: smtp.gmail.com port: 465 sender: example.com ``` We would actually get a more meaningful error which helps pinpoint the issue: `Error malformed yaml: line 23: did not find expected alphabetic or numeric character`
I tried to install authelia with docker-compose but on startup authelia isn't able to find the configuration.yml. Especially it is impossible to mount the "/var/lib/authelia" volumen and on build the container automatically mounts /etc/authelia (where the configuration files are in. But even on changing the PUID or PGID to root or change the configuration-files in the (unexpected) volumen, authelia still goes in panic mode and logs missing configuration.
I even copied your docker-compose.yml and still the same error. So either I'm doing something stupidly wrong (probably) or there is a bug (unlikely).
The text was updated successfully, but these errors were encountered: