user2176576
user2176576

Reputation: 756

WSO2APIM error when adding Keycloak as key manager when both running in separate docker containers on localhost

Keycloak is running in docker container via wsl (ubuntu) on localhost, and WSO2APIM is running in a separate container on localhost too and I am trying to import http://localhost:8080/realms/MyRealm/.well-known/openid-configuration/ into Well Known URL for adding keycloak as keymanager for WSO2 APIM on this portal https://localhost:9443/admin/settings/key-managers/create

It gives the below error -

The server encountered an internal error. Please contact administrator. However I can access the link in my browser.

PS, 1) Have already exported the keystore.crt into wso2apim directory on docker container - /wso2am-4.0.0/repository/resources/security 2) Have setup wso2apim as a client in keycloak with required details 3) Have configured KEycloak as Service provider and identity provider on /carbon portal

Am I missing something?

New to docker, keycloak and wso2apim. Any help would be greatly appreciated. Thanks!

Upvotes: 0

Views: 83

Answers (1)

user2176576
user2176576

Reputation: 756

The reason was both docker containers run in isolation. So I did the following to get wsl network ip address -

wsl ifconfig get something like this as output -

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet <IP_ADDRESS_REQUIRED> netmask broadcast

http://IP_ADDRESS_REQUIRED:8080/realms/MyRealm/.well-known/openid-configuration/

and it worked, atleast imported the urls that I would have otherwise had to do manually that too with a suspect of it being able to connect to keycloak or not.

Thanks!

Upvotes: 0

Related Questions