bolkedebruin / rdpgw

Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes
Apache License 2.0
758 stars 119 forks source link

Docker-compose demo keycloak exits on startup. #34

Closed alphabet5 closed 2 years ago

alphabet5 commented 2 years ago

Running

git clone https://github.com/bolkedebruin/rdpgw.git
cd rdpgw/dev/docker
docker-compose build
docker-compose up

Gives this output.

Attaching to docker_xrdp_1, docker_keycloak_1, docker_rdpgw_1
xrdp_1      | 
xrdp_1      | Current default time zone: 'Europe/Amsterdam'
xrdp_1      | Local time is now:      Thu Mar 10 20:45:59 CET 2022.
xrdp_1      | Universal Time is now:  Thu Mar 10 19:45:59 UTC 2022.
xrdp_1      | 
xrdp_1      | Username: admin, Password: admin , Sudo: Y
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
xrdp_1      | 2022-03-10 20:46:00,190 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
xrdp_1      | 2022-03-10 20:46:00,190 INFO Included extra file "/etc/supervisor/conf.d/xrdp.conf" during parsing
xrdp_1      | 2022-03-10 20:46:00,199 INFO RPC interface 'supervisor' initialized
xrdp_1      | 2022-03-10 20:46:00,199 CRIT Server 'unix_http_server' running without any HTTP authentication checking
xrdp_1      | 2022-03-10 20:46:00,199 INFO supervisord started with pid 75
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
keycloak_1  | Keycloak - Open Source Identity and Access Management
keycloak_1  | 
keycloak_1  | Find more information at: https://www.keycloak.org/docs/latest
keycloak_1  | 
keycloak_1  | Usage:
keycloak_1  | 
keycloak_1  | kc.sh [OPTIONS] [COMMAND]
keycloak_1  | 
keycloak_1  | Use this command-line tool to manage your Keycloak cluster.
keycloak_1  | Make sure the command is available on your "PATH" or prefix it with "./" (e.g.:
keycloak_1  | "./kc.sh") to execute from the current folder.
keycloak_1  | 
keycloak_1  | Options:
keycloak_1  | 
keycloak_1  | -cf, --config-file <file>
keycloak_1  |                      Set the path to a configuration file. By default, configuration properties are
keycloak_1  |                        read from the "keycloak.conf" file in the "conf" directory.
keycloak_1  | -h, --help           This help message.
keycloak_1  | -v, --verbose        Print out error details when running this command.
keycloak_1  | -V, --version        Show version information
keycloak_1  | 
keycloak_1  | Commands:
keycloak_1  | 
keycloak_1  |   build                   Creates a new and optimized server image.
keycloak_1  |   start                   Start the server.
keycloak_1  |   start-dev               Start the server in development mode.
keycloak_1  |   export                  Export data from realms to a file or directory.
keycloak_1  |   import                  Import data from a directory or a file.
keycloak_1  |   show-config             Print out the current configuration.
keycloak_1  |   tools                   Utilities for use and interaction with the server.
keycloak_1  |     completion            Generate bash/zsh completion script for kc.sh.
keycloak_1  | 
keycloak_1  | Examples:
keycloak_1  | 
keycloak_1  |   Start the server in development mode for local development or testing:
keycloak_1  | 
keycloak_1  |       $ kc.sh start-dev
keycloak_1  | 
keycloak_1  |   Building an optimized server runtime:
keycloak_1  | 
keycloak_1  |       $ kc.sh build <OPTIONS>
keycloak_1  | 
keycloak_1  |   Start the server in production mode:
keycloak_1  | 
keycloak_1  |       $ kc.sh start <OPTIONS>
keycloak_1  | 
keycloak_1  |   Enable auto-completion to bash/zsh:
keycloak_1  | 
keycloak_1  |       $ source <(kc.sh tools completion)
keycloak_1  | 
keycloak_1  |   Please, take a look at the documentation for more details before deploying in
keycloak_1  | production.
keycloak_1  | 
keycloak_1  | Use "kc.sh start --help" for the available options when starting the server.
keycloak_1  | Use "kc.sh <command> --help" for more information about other commands.
docker_rdpgw_1 exited with code 1
docker_keycloak_1 exited with code 0
xrdp_1      | 2022-03-10 20:46:01,201 INFO spawned: 'xrdp' with pid 77
xrdp_1      | 2022-03-10 20:46:01,202 INFO spawned: 'xrdp-sesman' with pid 78
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
xrdp_1      | 2022-03-10 20:46:02,203 INFO success: xrdp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
xrdp_1      | 2022-03-10 20:46:02,203 INFO success: xrdp-sesman entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:03 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:03 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:05 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:03 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:05 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:09 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:03 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:05 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:09 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:15 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
docker_rdpgw_1 exited with code 1
rdpgw_1     | 2022/03/10 19:45:59 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:00 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp 172.18.0.2:8080: connect: connection refused
rdpgw_1     | 2022/03/10 19:46:01 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:02 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:03 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:05 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:09 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:15 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
rdpgw_1     | 2022/03/10 19:46:29 Cannot get oidc provider: Get "http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration": dial tcp: lookup keycloak on 127.0.0.11:53: server misbehaving
alphabet5 commented 2 years ago

Modifying the docker-compose to specify container_name, and keycloak env added KEYCLOAK_ADMIN, KEYCLOAK_ADMIN_PASSWORD, and startup command start-dev let keycloak start.

After importing the realm-export.json as rdpgw realm, I am getting this message.

rdpgw       | 2022/03/10 20:15:50 Cannot get oidc provider: 404 Not Found: {"error":"RESTEASY003210: Could not find resource for full path: http://keycloak:8080/auth/realms/rdpgw/.well-known/openid-configuration"}
alphabet5 commented 2 years ago

After changing the rdpgw.yaml it is starting.

openId:
 providerUrl: http://keycloak:8080/realms/rdpgw
alphabet5 commented 2 years ago

Let me know if you would be open to a pull request to update docker-compose.yml and the readme with some additional information.

bolkedebruin commented 2 years ago

@alphabet5 of course I am open to receiving a PR for that!

cocakohler commented 2 years ago

Let me know if you would be open to a pull request to update docker-compose.yml and the readme with some additional information.

Would be interested in a fix as well. I'm having similar issues

bolkedebruin commented 2 years ago

This is fixed on master