Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://resource-provider.localhost.yarf.nl/ gives 502 Bad Gateway #33

Open
cegg opened this issue Dec 16, 2019 · 4 comments
Open

https://resource-provider.localhost.yarf.nl/ gives 502 Bad Gateway #33

cegg opened this issue Dec 16, 2019 · 4 comments

Comments

@cegg
Copy link

cegg commented Dec 16, 2019

Build containers following the instructions:

$ docker ps
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                                      NAMES
e3d65615c34d        nginx:stable-alpine          "nginx -g 'daemon of…"   11 minutes ago      Up 11 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   example_nginx_1
04e3fe90eda7        postgres:latest              "docker-entrypoint.s…"   About an hour ago   Up 11 minutes       5432/tcp                                   example_postgres_1
87567c08ea2b        jboss/keycloak:3.4.3.Final   "/opt/jboss/docker-e…"   About an hour ago   Up 11 minutes       8080/tcp

Can access keycloak admin: https://identity.localhost.yarf.nl/ , login, configure users, etc.
Can not access https://resource-provider.localhost.yarf.nl/ (provider), gives

502 Bad Gateway nginx/1.16.1

docker-compose logs contains this, might be relevant:

keycloak_1 | 10:11:10,424 WARN [org.keycloak.events] (default task-17) type=LOGIN_ERROR, realmId=master, clientId=security-admin-console, userId=null, ipAddress=172.18.0.1, error=user_not_found, auth_method=openid-connect, auth_type=code, redirect_uri=https://identity.localhost.yarf.nl/auth/admin/master/console/?redirect_fragment=%2Frealms%2Fexample%2Fusers%2F483bfd18-32fb-4666-9fed-48cabc376498, code_id=8954f33b-d791-4c14-8d46-2aeeab8c5bac, username=testuser
keycloak_1 | 10:11:40,815 WARN [org.keycloak.events] (default task-22) type=LOGIN_ERROR, realmId=master, clientId=security-admin-console, userId=null, ipAddress=172.18.0.1, error=user_not_found, auth_method=openid-connect, auth_type=code, redirect_uri=https://identity.localhost.yarf.nl/auth/admin/master/console/?redirect_fragment=%2Frealms%2Fexample%2Fusers%2F483bfd18-32fb-4666-9fed-48cabc376498, code_id=8954f33b-d791-4c14-8d46-2aeeab8c5bac, username=testuser

example_resource-provider_1 exited with code 1

@Peter-Slump
Copy link
Owner

Looking at your docker ps output the resource-provider and the resource-provider-api aren't started. Please look in the docker-compose output to find out why they are not started.

@robinzachmann
Copy link

I'm facing the same problem. This is the relevant output from docker-compose (for resource-provider):

resource-provider_1      | Obtaining file:///usr/src/django-keycloak
resource-provider_1      | Requirement already satisfied: python-keycloak-client>=0.2.2 in /usr/local/lib/python3.8/site-packages (from django-keycloak==0.1.2.dev0) (0.2.2)
resource-provider_1      | Requirement already satisfied: Django>=1.11 in /usr/local/lib/python3.8/site-packages (from django-keycloak==0.1.2.dev0) (3.0.3)
resource-provider_1      | Requirement already satisfied: python-jose in /usr/local/lib/python3.8/site-packages (from python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (3.1.0)
resource-provider_1      | Requirement already satisfied: requests in /usr/local/lib/python3.8/site-packages (from python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (2.22.0)
resource-provider_1      | Requirement already satisfied: sqlparse>=0.2.2 in /usr/local/lib/python3.8/site-packages (from Django>=1.11->django-keycloak==0.1.2.dev0) (0.3.0)
resource-provider_1      | Requirement already satisfied: asgiref~=3.2 in /usr/local/lib/python3.8/site-packages (from Django>=1.11->django-keycloak==0.1.2.dev0) (3.2.3)
resource-provider_1      | Requirement already satisfied: pytz in /usr/local/lib/python3.8/site-packages (from Django>=1.11->django-keycloak==0.1.2.dev0) (2019.3)
resource-provider_1      | Requirement already satisfied: rsa in /usr/local/lib/python3.8/site-packages (from python-jose->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (4.0)
resource-provider_1      | Requirement already satisfied: ecdsa<1.0 in /usr/local/lib/python3.8/site-packages (from python-jose->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (0.15)
resource-provider_1      | Requirement already satisfied: pyasn1 in /usr/local/lib/python3.8/site-packages (from python-jose->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (0.4.8)
resource-provider_1      | Requirement already satisfied: six<2.0 in /usr/local/lib/python3.8/site-packages (from python-jose->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (1.14.0)
resource-provider_1      | Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (2019.11.28)
resource-provider_1      | Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (1.25.8)
resource-provider_1      | Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (2.8)
resource-provider_1      | Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.8/site-packages (from requests->python-keycloak-client>=0.2.2->django-keycloak==0.1.2.dev0) (3.0.4)
resource-provider_1      | Installing collected packages: django-keycloak
resource-provider_1      |   Attempting uninstall: django-keycloak
resource-provider_1      |     Found existing installation: django-keycloak 0.1.2.dev0
resource-provider_1      |     Uninstalling django-keycloak-0.1.2.dev0:
resource-provider_1      |       Successfully uninstalled django-keycloak-0.1.2.dev0
resource-provider_1      |   Running setup.py develop for django-keycloak
resource-provider_1      | Successfully installed django-keycloak
resource-provider_1      | ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /usr/src/python-keycloak-client
resource-provider_1      | ERROR: ./../django-dynamic-fixtures/ is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
resource-provider_1      | Application already initialized.
resource-provider_1      | grep: /usr/local/lib/python3.7/site-packages/certifi/cacert.pem: No such file or directory
resource-provider_1      | docker/entrypoint-dev.sh: line 24: can't create /usr/local/lib/python3.7/site-packages/certifi/cacert.pem: nonexistent directory
resource-provider_1      | Add CA to trusted pool
example_resource-provider_1 exited with code 1

For resource-provider-api it looks just the same.

@Peter-Slump
Copy link
Owner

Peter-Slump commented Feb 11, 2020 via email

@robinzachmann
Copy link

Yes, that's it.

I adjusted the Python versions in:

  • resource-provider/docker/entrypoint-dev.sh
  • resource-provider-api/docker/entrypoint-dev.sh

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants