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

Internal Server Error: null when trying to access AKHQ #1519

Closed
jheinitz opened this issue Jun 27, 2023 · 4 comments
Closed

Internal Server Error: null when trying to access AKHQ #1519

jheinitz opened this issue Jun 27, 2023 · 4 comments

Comments

@jheinitz
Copy link
Contributor

Good morning,

I just wanted to verify that the html-head config is working in the latest dev docker image, but I cannot even access the login page. All I get in the browser window is Internal Server Error: null. In the log of the docker container I see this:

akhq_1  | 2023-06-27 09:28:47,394 ERROR r-thread-2 o.a.c.ErrorController      null
akhq_1  | java.lang.NullPointerException: null
akhq_1  |       at org.akhq.controllers.AbstractController.getUserGroups(AbstractController.java:56)
akhq_1  |       at org.akhq.controllers.AkhqController.getRights(AkhqController.java:221)
akhq_1  |       at org.akhq.controllers.AkhqController.users(AkhqController.java:144)
akhq_1  |       at org.akhq.controllers.$AkhqController$Definition$Exec.dispatch(Unknown Source)
akhq_1  |       at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invoke(AbstractExecutableMethodsDefinition.java:371)
akhq_1  |       at io.micronaut.context.DefaultBeanContext$4.invoke(DefaultBeanContext.java:594)
akhq_1  |       at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:246)
akhq_1  |       at io.micronaut.web.router.RouteMatch.execute(RouteMatch.java:111)
akhq_1  |       at io.micronaut.http.context.ServerRequestContext.with(ServerRequestContext.java:103)
akhq_1  |       at io.micronaut.http.server.RouteExecutor.lambda$executeRoute$14(RouteExecutor.java:659)
akhq_1  |       at reactor.core.publisher.FluxDeferContextual.subscribe(FluxDeferContextual.java:49)
akhq_1  |       at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62)
akhq_1  |       at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194)
akhq_1  |       at io.micronaut.reactive.reactor.instrument.ReactorInstrumentation.lambda$init$0(ReactorInstrumentation.java:62)
akhq_1  |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
akhq_1  |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
akhq_1  |       at io.micrometer.core.instrument.composite.CompositeTimer.recordCallable(CompositeTimer.java:129)
akhq_1  |       at io.micrometer.core.instrument.Timer.lambda$wrap$1(Timer.java:206)
akhq_1  |       at io.micronaut.scheduling.instrument.InvocationInstrumenterWrappedCallable.call(InvocationInstrumenterWrappedCallable.java:53)
akhq_1  |       at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
akhq_1  |       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
akhq_1  |       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
akhq_1  |       at java.base/java.lang.Thread.run(Unknown Source)
akhq_1  | 2023-06-27 09:28:47,400 WARN  r-thread-3 org.akhq.log.access        [Date: 2023-06-27T09:28:47.195971+02:00] [Duration: 203 ms] [Url: GET /api/me] [Status: 500] [Ip: /10.100.104.197] [User: heinitz]

I removed the html-head: config from my application.yaml but this is not the one to blame.

This is the docker image I use:

[root@kafkacc1test akhq]# docker image ls tchiotludo/akhq
REPOSITORY        TAG       IMAGE ID       CREATED          SIZE
tchiotludo/akhq   dev       39bd3c8c28f3   46 minutes ago   609MB

Please let me know if you need more information.

Thanks and kind regards

Jens

@AlexisSouquiere
Copy link
Collaborator

AlexisSouquiere commented Jun 27, 2023

@jheinitz the permissions model has been rewrited. You need to update the application.yaml file accordingly. Please check the documentation to check how to update your configuration.
If you still have the issue, please paste your application.yaml and I'll check
https://github.com/tchiotludo/akhq/blob/dev/application.example.yml

@jheinitz
Copy link
Contributor Author

Okay, I got it. I was not aware of this change.

After re-configuring my application.yaml, I'm still missing the Nodes tab. The example file does not contain a group for that. However, I found the table in the groups.md file and added a node-read group. Now I can see the Nodes tab, but when I click on it, I get the list of topics instead of the nodes. Can you confirm this behaviour on your side?

Thanks and best regards

Jens

@AlexisSouquiere
Copy link
Collaborator

AlexisSouquiere commented Jun 27, 2023

Thanks for the feedback. You're right the node role and mapping in the groups is missing the application.example.yml. I'll add it.
For the issue regarding the topics list redirection, I think your node-read group is missing the READ_CONFIG action in addition of the READ one. But there is a small issue here, as you shouldn't see the nodes tab because the nodes screen requires READ and READ_CONFIG. I'll fix it too

About the html-head issue, is it working ?

@jheinitz
Copy link
Contributor Author

I think your node-read group is missing the READ_CONFIG action in addition of the READ one.

Yes, after adding READ_CONFIG, I see the nodes instead of the topics.

About the html-head issue, is it working ?

Yes, that's working as expected! Thx!

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

2 participants