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

🔌 Plugin: Keycloak backend plugin fails with Request failed with status code 504 #2147

Closed
2 tasks done
rahulkandru opened this issue Sep 10, 2024 · 1 comment
Closed
2 tasks done

Comments

@rahulkandru
Copy link

🔖 Summary

Hi,

I followed the instructions here to setup the plugin. However, I keep running into the below issue -

 [0] webpack compiled successfully
[1] 2024-09-10T14:57:58.862Z catalog info Reading Keycloak users and groups class=KeycloakOrgEntityProvider taskId=KeycloakOrgEntityProvider:default:refresh taskInstanceId=55cb32b0-76b7-4c56-8b7b-48de0ac3b717
[1] 2024-09-10T14:58:16.224Z catalog error Error while syncing Keycloak users and groups Request failed with status code 504 class=KeycloakOrgEntityProvider taskId=KeycloakOrgEntityProvider:default:refresh taskInstanceId=55cb32b0-76b7-4c56-8b7b-48de0ac3b717 name=Error stack=Error: Request failed with status code 504
[1]     at createError (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/core/createError.js:16:15)
[1]     at settle (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/core/settle.js:17:12)
[1]     at IncomingMessage.handleStreamEnd (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/adapters/http.js:322:11)
[1]     at IncomingMessage.emit (node:events:530:35)
[1]     at endReadableNT (node:internal/streams/readable:1696:12)
[1]     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) status=504
[1] 2024-09-10T15:01:01.283Z catalog info Reading Keycloak users and groups class=KeycloakOrgEntityProvider taskId=KeycloakOrgEntityProvider:default:refresh taskInstanceId=9493a300-a4c9-48a8-b2cc-62bf94637141
[1] 2024-09-10T15:01:18.861Z catalog error Error while syncing Keycloak users and groups Request failed with status code 504 class=KeycloakOrgEntityProvider taskId=KeycloakOrgEntityProvider:default:refresh taskInstanceId=9493a300-a4c9-48a8-b2cc-62bf94637141 name=Error stack=Error: Request failed with status code 504
[1]     at createError (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/core/createError.js:16:15)
[1]     at settle (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/core/settle.js:17:12)
[1]     at IncomingMessage.handleStreamEnd (/home/rakandru/backstage/dev/node_modules/@keycloak/keycloak-admin-client/node_modules/axios/lib/adapters/http.js:322:11)
[1]     at IncomingMessage.emit (node:events:530:35)
[1]     at endReadableNT (node:internal/streams/readable:1696:12)
[1]     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) status=504

My app-config.yaml -

catalog:
  providers:
    keycloakOrg:
      default:
        # Remove the `/auth` if using keycloak 17+
        baseUrl: https://keycloak.domain
        clientId: backstage
        clientSecret: ${CLIENT_SECRET}
        loginRealm: test
        realm: test
        schedule:
          frequency:
            minutes: 30
          timeout:
            minutes: 3  # Customize this to fit your needs
          initialDelay:
            seconds: 15  # Customize this to fit your needs
          userQuerySize: 10
          groupQuerySize: 10

Keycloak version - 23.0.6
Backstage version - 1.30.0

I'm running in a new environment where I created a new app and updated the coded as per instructions - https://janus-idp.io/plugins/keycloak

🌐 Project website (if applicable)

No response

✌️ Context

No response

👀 Have you spent some time to check if this plugin request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

@rahulkandru
Copy link
Author

It was failing due to connection timeouts to Keycloak. We can close this.

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

No branches or pull requests

2 participants