[keycloak-user] Cannot log in as admin when using docker image 2.0.0 mysql

Jagannadha Rekala jarekala at axway.com
Wed Aug 17 13:02:51 EDT 2016


There needs to be an admin user created while Keycloak being started. So, you need to pass the environment variables to the docker container. Without passing the environment variables Keycloak will not have an admin user unless you use the previous database of Keycloak that had admin user already. Try adding these two variables in your compose file and let us know.

    - KEYCLOAK_USER=admin
    - KEYCLOAK_PASSWORD=password-here

Thanks,
Jagan Rekala

From: keycloak-user-bounces at lists.jboss.org [mailto:keycloak-user-bounces at lists.jboss.org] On Behalf Of Kevin Thorpe
Sent: Wednesday, August 17, 2016 9:48 AM
To: keycloak-user <keycloak-user at lists.jboss.org>
Subject: [keycloak-user] Cannot log in as admin when using docker image 2.0.0 mysql

I'm trying to use Keycloak 2.0.0 from the docker image using mysql and I can't log in once running. It all starts up ok and it creates the initial schema ok. When I try to log in to the admion console it can't find the admin user. What am I doing wrong? I thought it was my modifications to the image to add https that were wrong but it doesn't work from the published image anyway.

lots snipped....
keycloak_1 | 2016-08-17T16:39:58.280453387Z 16:39:58,280 INFO  [org.jboss.as<http://org.jboss.as>] (Controller Boot Thread) WFLYSRV0025: Keycloak 2.0.0.Final (WildFly Core 2.0.10.Final) started in 29551ms - Started 418 of 800 services (542 services are lazy, passive or on-demand)
keycloak_1 | 2016-08-17T16:40:16.238260785Z 16:40:16,237 WARN  [org.keycloak.events] (default task-7) type=LOGIN_ERROR, realmId=master, clientId=security-admin-console, userId=null, ipAddress=10.20.11.52, error=user_not_found, auth_method=openid-connect, auth_type=code, redirect_uri=http://10.20.13.236:8080/auth/admin/master/console/, code_id=2bde62ed-9b9f-4620-b07f-39d4a282098c, username=admin

docker-compose.yml is:
keycloak:
  image: jboss/keycloak-mysql:2.0.0.Final
#  image: docker.pibenchmark.com/pi-keycloak:2.0.0-01<http://docker.pibenchmark.com/pi-keycloak:2.0.0-01>
  environment:
    MYSQL_PORT_3306_TCP_ADDR: mysql
    MYSQL_PORT_3306_TCP_PORT: 3306
    MYSQL_USERNAME: keycloak
    MYSQL_PASSWORD: xxxxxx
  ports:
    - "8443:8443/tcp"
    - "8080:8080/tcp"
  links:
    - keycloak-db:mysql
#  tty: true
#  stdin_open: true

keycloak-db:
  environment:
    MYSQL_ROOT_PASSWORD: yyyyyy
    MYSQL_DATABASE: keycloak
    MYSQL_USER: keycloak
    MYSQL_PASSWORD: xxxxxx
  image: mysql/mysql-server:5.6
  volumes:
  - keycloak-test-db:/var/lib/mysql
  volume_driver: convoy



Kevin Thorpe
VP Enterprise Platform
[http://i.imgur.com/8UeC1YO.png]
www.p-i.net<http://www.p-i.net/> | @PI_150<https://twitter.com/@PI_150>

T: +44 (0)20 3005 6750<tel:%2B44%20%280%2920%203005%206750>  | F: +44(0)20 7730 2635<tel:%2B44%280%2920%207730%202635>  | T: +44 (0)808 204 0344<tel:%2B44%20%280%29808%20204%200344>
150 Buckingham Palace Road, London, SW1W 9TR, UK
[https://clients.p-i.net/documents/11003/1116416/BSI-UKAS.logo_150.png]     [https://clients.p-i.net/documents/11003/1116416/ISO27001.logo_150.png]      [https://clients.p-i.net/documents/11003/1116416/QMS.logo_150.png]      [https://clients.p-i.net/documents/11003/1116416/pci.logo_150.png]

SAVE PAPER - THINK BEFORE YOU PRINT!

____________________________________________________________________

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160817/2c14ce85/attachment-0001.html 


More information about the keycloak-user mailing list