ESDLMapEditorESSIM / docker-toolsuite

All information to install, setup and run the ESDL MapEditor and ESSIM toolsuite on your local machine
2 stars 5 forks source link

"User with username 'admin' already added" when starting keycloak #12

Closed stefaneidelloth closed 1 year ago

stefaneidelloth commented 1 year ago

When following the instruction

cd BaseInfrastructure
docker-compose up

I get

image

edwinmatthijssen commented 1 year ago

Hi Stefan,

I guess you're on Windows, right?

Please have a look at https://github.com/ESDLMapEditorESSIM/docker-toolsuite/issues/4 on how to solve this.

It's due to "incorrect" git settings that cause the wrong (Windows-style) line endings in a file that is mounted inside a Linux container. Make sure to take the proper actions described there. Just to be safe, it's a good idea to throw away your volumes and start with a clean system (depending on what other things you do with Docker, you might want to execute a "docker system prune" after you brought all containers down. This will give you a clean system).

BTW. We tried to make clear to pay attention to the line endings in the documentation to. Did you see the statement at the top of step 1:

image

stefaneidelloth commented 1 year ago

Thank you for the fast reply. Yes, I use Windows and I fixed the line endings of BaseInfrastructure/postgres/init-database.sh.

I do have other docker containers running on that machine and do not want to remove them.

edwinmatthijssen commented 1 year ago

If you look up the volumes that are used by the base-infrastructure docker-compose file and remove those, that would work fine too. As you're using docker already, you probably know how it works.

PS. Maybe needless to say, but Notepad++ has easy functionality to convert a file to use UNIX style line endings.

stefaneidelloth commented 1 year ago

I started the command a second time and now it seems to work. Last output is

keycloak | 14:36:23,682 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

Maybe the update of docker from < 4 to to version 4.16.3 helped.

edwinmatthijssen commented 1 year ago

Glad to hear it works now... Don't hesitate to contact us if you have any further questions.

Can you maybe elaborate on what you intend to do with our tooling? What are your plans and expectations?

stefaneidelloth commented 1 year ago

Hm. The step Using you webbrowser, go to http://localhost:8080 to open keycloak did not work. I'll try to remove the containers and volumes and start over.

Can you maybe elaborate on what you intend to do with our tooling?

I work at Fraunhofer ISI (Karlsruhe, Germany) as a software developer and currently get an overview on existing tools to model energy related networks. The map editor might be interesting for that.

edwinmatthijssen commented 1 year ago

What do you mean with "did not work"? What happened? I don't think starting over is a solution now...

Ah nice! I know we collaborate with Fraunhofer in several energy related projects.

stefaneidelloth commented 1 year ago

The solution

docker rm -f keycloak
docker compose up keycloak

from https://stackoverflow.com/questions/59599620/keycloak-8-user-with-username-admin-already-added did the trick for me.

I am now ale to see the keycloak interface at

http://localhost:8080/auth/

edwinmatthijssen commented 1 year ago

Super! good luck