Docker Compose Errors On Startup
=====================================
Preflight Checklist
Before we dive into the issue, let's make sure we have covered all the necessary steps to troubleshoot the problem.
I could not find a solution in the existing issues, docs, nor discussions.
- We have searched the existing issues, documentation, and discussions related to the problem.
- We have tried to reproduce the issue and understand the root cause.
I agree to follow this project's Code of Conduct.
- We agree to follow the project's Code of Conduct and contribute to the community in a respectful and professional manner.
I have read and am following this repository's Contribution Guidelines.
- We have read and followed the repository's Contribution Guidelines to ensure that our contribution is in line with the project's standards.
I have joined the Ory Community Slack.
- We have joined the Ory Community Slack to stay updated with the latest news and discussions related to the project.
I am signed up to the Ory Security Patch Newsletter.
- We are signed up to the Ory Security Patch Newsletter to receive important security updates and patches.
Ory Network Project
Unfortunately, we did not receive any response from the Ory Network Project.
Describe the Bug
We tried to follow the quickstart guide, but we encountered errors during the startup process. The errors are related to the configuration file, specifically the urls
section.
Error Message
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | urls: map[consent:http://127.0.0.1:3000/consent device:map[success:http://127.0.0.1:3000/device/success verification:http://127.0.0.1:3000/device/verify] login:http://127.0.0.1:3000/login logout:http://127.0.0.1:3000/logout self:map[issuer:http://127.0.0.1:4444]]
hydra-1 | ^-- additionalProperties "device" not allowed
Reproducing the Bug
To reproduce the bug, follow these steps:
-
Clone the Ory Hydra repository using the following command:
git clone https://github.com/ory/hydra.git
2. Navigate to the cloned repository using the following command:
```bash
cd hydra
-
Run the following command to start the Docker Compose:
docker compose -f quickstart.yml -f quickstart-postgres.yml up
## Relevant Log Output
----------------------
The relevant log output is as follows:
hydra-1 |
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | urls: map[consent:http://127.0.0.1:3000/consent device:map[success:http://127.0.0.1:3000/device/success verification:http://127.0.0.1:3000/device/verify] login:http://127.0.0.1:3000/login logout:http://127.0.0.1:3000/logout self:map[issuer:http://127.0.0.1:4444]]
hydra-1 | ^-- additionalProperties "device" not allowed
hydra-1 |
hydra-1 | time=2025-03-09T16:57:26Z level=error msg=Unable to instantiate configuration. audience=application error=map[message:I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed] service_name=Ory Hydra service_version=v2.3.0
hydra-1 | Error: I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 | Usage:
hydra-1 | hydra serve all [flags]
hydra-1 |
hydra-1 | Flags:
hydra-1 | -h, --help help for all
hydra-1 |
hydra-1 | Global Flags:
hydra-1 | -c, --config strings Path to one or more .json, .yaml, .yml, .toml config files. Values are loaded in the order provided, meaning that the last config file overwrites values from the previous config file.
hydra-1 | --dev Disables critical security checks to improve local development experience. Do not use in production.
hydra-1 | --sqa-opt-out Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa
hydra-1 |
hydra-1 | I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 |
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | urls: map[consent:http://127.0.0.1:3000/consent device:map[success:http://127.0.0.1:3000/device/success verification:http://127.0.0.1:3000/device/verify] login:http://127.0.0.1:3000/login logout:http://127.0.0.1:3000/logout self:map[issuer:http://127.0.0.1:4444]]
hydra-1 | ^-- additionalProperties "device" not allowed
hydra-1 |
hydra-1 | time=2025-03-09T16:57:28Z level=error msg=Unable to instantiate configuration. audience=application error=map[message:I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed] service_name=Ory Hydra service_version=v2.3.0
hydra-1 | Error: I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 | Usage:
hydra-1 | hydra serve all [flags]
hydra-1 |
hydra-1 | Flags:
hydra-1 | -h, --help help for all
hydra-1 |
hydra-1 | Global Flags:
hydra-1 | -c, --config strings Path to one or more .json, .yaml, .yml, .toml config files. Values are loaded in the order provided, meaning that the last config file overwrites values from the previous config file.
hydra-1 | --dev Disables critical security checks to improve local development experience. Do not use in production.
hydra-1 | --sqa-opt-out Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa
hydra-1 |
hydra-1 | I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 |
hydra-1 | The configuration contains values or keys which are invalid:
hydra-1 | urls: map[consent:http://127.0.0.1:3000/consent device:map[success:http://127.0.0.1:3000/device/success verification:http://127.0.0.1:3000/device/verify] login:http://127.0.0.1:3000/login logout:http://127.0.0.1:3000/logout self:map[issuer:http://127.0.0.1:4444]]
hydra-1 | ^-- additionalProperties "device" not allowed
hydra-1 |
hydra-1 | time=2025-03-09T16:57:31Z level=error msg=Unable to instantiate configuration. audience=application error=map[message:I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed] service_name=Ory Hydra service_version=v2.3.0
hydra-1 | Error: I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 | Usage:
hydra-1 | hydra serve all [flags]
hydra-1 |
hydra-1 | Flags:
hydra-1 | -h, --help help for all
hydra-1 |
hydra-1 | Global Flags:
hydra-1 | -c, --config strings Path to one or more .json, .yaml, .yml, .toml config files. Values are loaded in the order provided, meaning that the last config file overwrites values from the previous config file.
hydra-1 | --dev Disables critical security checks to improve local development experience. Do not use in production.
hydra-1 | --sqa-opt-out Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa
hydra-1 |
hydra-1 | I[#/urls] S[#/properties/urls/additionalProperties] additionalProperties "device" not allowed
hydra-1 |
hydra
=====================================
Q: What is the error message indicating?
A: The error message is indicating that the configuration file contains values or keys which are invalid. Specifically, the urls
section is causing the issue.
Q: What is the cause of the error?
A: The cause of the error is that the device
key is not allowed in the urls
section. This is because the device
key is not a valid property for the urls
section.
Q: How can I fix the error?
A: To fix the error, you need to remove the device
key from the urls
section. You can do this by editing the configuration file and removing the following lines:
device:
success: http://127.0.0.1:3000/device/success
verification: http://127.0.0.1:3000/device/verify
Q: What is the correct format for the urls
section?
A: The correct format for the urls
section is as follows:
urls:
consent: http://127.0.0.1:3000/consent
login: http://127.0.0.1:3000/login
logout: http://127.0.0.1:3000/logout
self:
issuer: http://127.0.0.1:4444
Q: Can I use a different configuration file?
A: Yes, you can use a different configuration file. However, you need to make sure that the configuration file is in the correct format and does not contain any invalid values or keys.
Q: How can I troubleshoot the issue further?
A: To troubleshoot the issue further, you can try the following:
- Check the configuration file for any errors or invalid values.
- Verify that the
urls
section is in the correct format. - Try running the Docker Compose with the
--verbose
flag to get more detailed output.
Q: What is the version of the Docker Compose file?
A: The version of the Docker Compose file is oryd/hydra:v2.3.0
.
Q: On which operating system are you observing this issue?
A: This issue is observed on a Docker Compose environment.
Q: In which environment are you deploying?
A: This issue is observed in a Docker Compose environment.
Q: Additional Context
A: Unfortunately, we did not receive any additional context from the Ory Network Project.
By following these steps and troubleshooting the issue, you should be able to resolve the Docker Compose errors on startup. If you have any further questions or need additional assistance, please don't hesitate to ask.