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

JHipster gateway doesn't redirect to appropriate micro-services Not found, infinite loop with keycloak and JhipsterControlCenter not listing anything #27705

Open
k888888888888888888 opened this issue Oct 28, 2024 · 0 comments

Comments

@k888888888888888888
Copy link

k888888888888888888 commented Oct 28, 2024

Gateway unable to do request to microservices
  1. When try to go to entities all I see is Not found when try to list and when try to create, is like is not pointing to the microservice at all.

  2. When I try to locate my services at Instances in Jhipster control center I can't see anything, but I can see logs, configuration: http://localhost:7419/applications/instances this is empty.

  3. Most of the times I got infinite loop using Keycloak when auth to my gateway :

Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found 2024-10-28T10:53:41.482+01:00 ERROR 1729734 --- [ XNIO-1 task-2] c.p.config.SecurityJwtConfiguration : Unknown JWT error An error occurred while attempting to decode the Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found 2024-10-28T10:53:41.864+01:00 ERROR 1729734 --- [ XNIO-1 task-2] c.p.config.SecurityJwtConfiguration : Unknown JWT error An error occurred while attempting to decode the Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found 2024-10-28T10:53:42.210+01:00 ERROR 1729734 --- [ XNIO-1 task-2] c.p.config.SecurityJwtConfiguration : Unknown JWT error An error occurred while attempting to decode the Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found 2024-10-28T10:53:42.598+01:00 ERROR 1729734 --- [ XNIO-1 task-2] c.p.config.SecurityJwtConfiguration : Unknown JWT error An error occurred while attempting to decode the Jwt: Signed JWT rejected: Another algorithm expected, or no matching key(s) found

The page start to auto refresh itself undefinitely.

Motivation for or Use Case

The generated application should be stable and working.

Reproduce the error
  • jhipster jdl microservice.jdl
  • cd microservice1
  • docker compose -f src/main/docker/jhipster-control-center.yml up
  • docker compose -f src/main/docker/jhipster-registry.yml up
  • ./mvnw
  • cd gateway
  • docker compose -f src/main/docker/jhipster-control-center.yml up
  • docker compose -f src/main/docker/keycloak.yml up
  • ./mvnw
  • ./npmw start
  • go to localhost:9000 try to perform something at entities and enjoy the NOT FOUND. And eventually you will experiment the infinite auth loop.
  • go to http://localhost:7419/applications/instances and you will not see anything.
Related issues
Suggest a Fix

Can someone please make a proper test and try to generate the application and verify that everything is working ?

Because currently the project is not stable, just generate something that do not works.

JHipster Version(s)

8.7.1

8.6.0 (tested with both)

JHipster configuration

As alternative you can add a JDL wrapped in below structure

JDL definitions
    application {
  config {
    baseName mygateway
    applicationType gateway
    packageName com.mygateway
    authenticationType oauth2
    prodDatabaseType mysql
    clientFramework angularX
    serviceDiscoveryType eureka
    buildTool maven
    cacheProvider no
    skipClient false
    serverPort 8080
  }
  entities *
}

application {
config {
baseName myService
applicationType microservice
packageName com.myservice
authenticationType jwt
serviceDiscoveryType eureka
prodDatabaseType mysql
buildTool maven
cacheProvider no
serverPort 8082
}
entities MyEntity
}

entity MyEntity {
id UUID
model String
usaLocation Boolean
aeskey String
finished Boolean
}

service all with serviceImpl

paginate MyEntity with pagination

microservice MyEntity with myService

The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.

Browsers and Operating System

Not relevant.

  • [ x] Checking this box is mandatory (this is just to show you read everything)

:D ....

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
@k888888888888888888 and others