Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
b2plane63951yIMMEDIATELY AS SOON AS I FUCKING POSTED THIS RANT I TRIED ADDING 1 MORE LINE OF CODE AND NOW IT FUCKING SOMEHOW WORKED FOR SOME FUCKING REASON AND I DONT UNDERSTAND WHY IT FUCKING WORKS
-
b2plane63951y@ostream NO I DONT BELIEVE IT WORKS. LET ME TRY TO CHANGE SOME SHIT AND SEE IF IT STILL WORKS
-
b2plane63951y@ostream doesnt work
But now i know whats causing it
But i dont know how to fix it yet
Basicay mounting a volume on postgres container makes the keycloak container fail to boot with that error message
NOT mounting a volume on postgres container makes the microservice fail to boot because it cant connect to the postgres db.
.... -
b2plane63951y@ostream brainwreck bro
I think i fixed this bullshit
Now both keycloak postgres and microservice work
Chatgpt is my Lord 🙏🙏🙏🙏🙏🙏🙏🙏☦️☦️☦️☦️☦️✝️✝️✝️✝️ -
b2plane63951y@ostream please explain me why the FUCK does this fix the issue:
✅:
...
postgres:
...
volumes:
- postgres-data:/data/postgres
...
...
volumes:
postgres-data:
❌:
...
postgres:
...
volumes:
- db:/data/postgres
...
...
volumes:
db:
---
????? -
When you mount an existing volume, that already contains an admin user, you can't add an admin user.
When you change the volume name, you create a new clean one.
Your containers are assuming they are starting with fresh volumes. To validate this, retry with db. I bet it worked the first time and fails every other time. -
OR... If it is building that json dynamically from the database on startup, and you are persisting both with volumes, it could be trying to generate a file that's already generated.
Do you persist that config folder or json file as well? -
b2plane63951y@lungdart no. keycloak creates it successfully as soon as it starts and then after 10 seconds of booting up it appears it tries adding it again causing the bug and crashes leading the container to fail to boot up. Only when i put postgres-data as root mnt volume it works
Thats 1 out of 4 pieces that solved this problem. But thats the biggest one -
You're explanation doesn't line up with the configuration you've given.
I have a few minutes, if you want to post a link to the full working docker commands and failing docker compose yaml. -
It's highly likely that the volume just contained something that caused the error. Have you ever tried to delete it between runs?
PLEASE
Im trying to start keycloak via docker compose
It works when i start the container via docker
But fucking fails when docker compose SAME.EXACT COMMAND
Keeps crashing with logs
2023-10-13 11:34:40 User with username 'admin' already added to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json'
WHY
rant