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

HTTP 500: ClassCastException during report generation #767

Closed
andrewazores opened this issue Dec 1, 2021 · 4 comments
Closed

HTTP 500: ClassCastException during report generation #767

andrewazores opened this issue Dec 1, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@andrewazores
Copy link
Member

https://github.com/cryostatio/cryostat/runs/4388180314?check_suite_focus=true#step:9:1081

SEVERE: HTTP 500: class java.io.IOException cannot be cast to class io.cryostat.net.reports.SubprocessReportGenerator$ReportGenerationException (java.io.IOException is in module java.base of loader 'bootstrap'; io.cryostat.net.reports.SubprocessReportGenerator$ReportGenerationException is in unnamed module of loader 'app')
io.vertx.ext.web.handler.impl.HttpStatusException: Internal Server Error
Caused by: java.lang.ClassCastException: class java.io.IOException cannot be cast to class io.cryostat.net.reports.SubprocessReportGenerator$ReportGenerationException (java.io.IOException is in module java.base of loader 'bootstrap'; io.cryostat.net.reports.SubprocessReportGenerator$ReportGenerationException is in unnamed module of loader 'app')
	at io.cryostat.net.web.http.api.v1.TargetReportGetHandler.targetRecordingNotFound(TargetReportGetHandler.java:134)
	at io.cryostat.net.web.http.api.v1.TargetReportGetHandler.handleAuthenticated(TargetReportGetHandler.java:124)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:90)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:65)
	at io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)
[INFO] Running itest.ReportJwtDownloadIT
Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.388 s <<< FAILURE! - in itest.ReportJwtDownloadIT
Error:  testDownloadRecordingUsingJwt  Time elapsed: 10.387 s  <<< ERROR!
java.util.concurrent.ExecutionException: java.lang.Exception: HTTP 500
	at itest.ReportJwtDownloadIT.testDownloadRecordingUsingJwt(ReportJwtDownloadIT.java:68)
Caused by: java.lang.Exception: HTTP 500

https://github.com/cryostatio/cryostat/blob/d486871f35479b18c1a44360fe4e18697bee58ff/src/main/java/io/cryostat/net/web/http/api/v1/TargetReportGetHandler.java#L132 / https://github.com/cryostatio/cryostat/blob/d486871f35479b18c1a44360fe4e18697bee58ff/src/main/java/io/cryostat/net/web/http/api/beta/TargetReportGetHandler.java#L139

This log seems strange. The itest client-side logs show that it was ReportJwtDownloadIT that failed, which should be calling through the beta JWT asset download path, so perhaps this test is written incorrectly and is making the request through the original /api/v1 handler.

Either way, the ClassCastException on the server-side logs reveal a problem that appears to be present in both the v1 and beta handlers since the beta implementation here is a copy-paste of the v1 implementation.

@andrewazores andrewazores added the bug Something isn't working label Dec 1, 2021
@andrewazores andrewazores changed the title ClassCastException during report generation HTTP 500: ClassCastException during report generation Dec 1, 2021
@andrewazores
Copy link
Member Author

Could this be caused by #758? Only thing that went in recently that seems like it might affect this.

@andrewazores
Copy link
Member Author

Funny that this happens to occur so often in CI right now. I can't get it to happen locally at all.

@hareetd
Copy link
Contributor

hareetd commented Dec 2, 2021

That's been my experience with #666 as well, have yet to see that error happen locally.

@andrewazores
Copy link
Member Author

Haven't seen this in a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants