Comments (7)
Thanks for the report. I haven't seen this before so I'm looking to reproduce it now.
from cryostat.
Hmm. I tried to reproduce this using both the kube-setup.sh
script as well as using the Minishift setup in https://github.com/rh-jmc-team/jmc-robots-demo, and in both cases the report is rendered as HTML as expected, and checking the response headers with cURL shows text/html as well. What kind of Openshift deployment are you using? Proxy rewriting of the response sounds maybe plausible?
from cryostat.
I'm using OpenShift Origin (or, OKD). The cluster is setup with oc cluster up
, where the oc
command is provided by the origin-clients-3.11.1-1.fc30.x86_64
package on Fedora.
$ oc version
oc v3.11.0+8de5c34
kubernetes v1.10.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
I'll try to docker exec
into the actual container and see what the response is before any kind of proxy.
from cryostat.
The following is executed directly inside the container:
$ busybox wget -S -O - localhost:8181/reports/test
Connecting to localhost:8181 (127.0.0.1:8181)
HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Date: Thu, 3 Oct 2019 16:23:39 GMT
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 122357
<!--
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
-->
...
It's still text/plain
. I have no idea what's happening...
from cryostat.
Can you double check the image hash? The latest should be sha256:0afea49f6cd34f09e753a2a1f4014576aa4ee3c6a92135bd5a7d8b7b6675c8fc
, which you can see via docker inspect
and probably somehow with oc
as well.
from cryostat.
I managed to pull the class files out from the container.
$ javap -v -private WebServer.ServerImpl | grep -A30 "Response newReportResponse"
Warning: File ./WebServer$ServerImpl.class does not contain class WebServer.ServerImpl
private fi.iki.elonen.NanoHTTPD$Response newReportResponse(java.lang.String, java.io.InputStream) throws java.io.IOException, org.openjdk.jmc.flightrecorder.CouldNotLoadRecordingException;
descriptor: (Ljava/lang/String;Ljava/io/InputStream;)Lfi/iki/elonen/NanoHTTPD$Response;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=7, args_size=3
0: aload_2
1: astore_3
2: aload_2
3: invokestatic #103 // Method org/openjdk/jmc/flightrecorder/rules/report/html/JfrHtmlRulesReport.createReport:(Ljava/io/InputStream;)Ljava/lang/String;
6: astore 4
8: aload_0
9: aload 4
11: invokevirtual #50 // Method serveTextResponse:(Ljava/lang/String;)Lfi/iki/elonen/NanoHTTPD$Response;
14: astore 5
16: aload 5
18: ldc #80 // String Access-Control-Allow-Origin
20: ldc #81 // String *
22: invokevirtual #82 // Method fi/iki/elonen/NanoHTTPD$Response.addHeader:(Ljava/lang/String;Ljava/lang/String;)V
25: aload_0
26: getfield #6 // Field TRIM_WORKER:Ljava/util/concurrent/ExecutorService;
29: aload_0
30: aload_1
31: invokedynamic #104, 0 // InvokeDynamic #2:run:(Lcom/redhat/rhjmc/containerjfr/net/WebServer$ServerImpl;Ljava/lang/String;)Ljava/lang/Runnable;
36: invokeinterface #105, 2 // InterfaceMethod java/util/concurrent/ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
41: pop
42: aload 5
44: astore 6
46: aload_3
47: ifnull 54
50: aload_3
51: invokevirtual #106 // Method java/io/InputStream.close:()V
The response.setMimeType()
call is missing. I guess I somehow pulled an outdated image.
It seems to be most likely an issue on my side. I'll close the issue once confirmed.
from cryostat.
The kube-setup.sh
on my fork is outdated and is still pulling from quay.io/andrewazores
. Sorry...
I'm closing this issue. I'm really sorry for the confusion.
from cryostat.
Related Issues (20)
- [Bug] Missing log output since #1720 HOT 3
- [Bug] CI startup failure HOT 8
- [Story] Integration with Red Hat Insights for Red Hat customers
- [Bug] Typo in CI workflow
- [Bug] CI `/build_test` does not reflect code quality checks status, only tests
- [Request] Env map forwarded to Agent instances should be configurable
- [Bug] Hang on opening JMX connection HOT 3
- [Meta] CI workflows must request write permissions HOT 1
- [Bug] CI does not have permissions to download `cryostat-core` dependency HOT 5
- [Request] Provide a param that can set the web context root path of cryostat-web HOT 6
- [Task] Add `--tags` flag to `git describe` in `pom.xml` version generation
- [Meta] Drop release drafter action, add GitHub release notes config
- [Bug] javax.naming.ConfigurationException: Environment variable CRYOSTAT_JMX_CREDENTIALS_DB_PASSWORD must be set and non-blank HOT 8
- [Bug] Websocket not working with Cryostat exposed on a specific Path HOT 2
- [Bug] Cryostat should not always assume Kubernetes ports numbered 9091 are JMX
- [Bug] `BUILTIN_DISCOVERY_DISABLED` is ignored if `PLATFORM` is set
- [Bug] Cannot delete custom targets that no longer point to a JVM
- [Bug] Unable to interact with short form custom target HOT 7
- [Bug] Unable to archive recordings for short form custom target HOT 2
- [Bug] GET recording error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryostat.