ruromero / cloudevents-player Goto Github PK
View Code? Open in Web Editor NEWCloudevents Player tool
License: Apache License 2.0
Cloudevents Player tool
License: Apache License 2.0
Running version 1.3 from main
branch, in Knative
mode.
The console fails with errors like:
POST https://cloudevents-player-dmartino-kafka.apps.ocp-dev01.lab.eng.tlv2.redhat.com/messages net::ERR_ABORTED 403 (Forbidden)
On the same environment, no issues with previous version v1.1
(v1.2
instead is affected by the same problem)
I see the following message being posted from the most recent build (12 hours ago):
"root":{
"attributes":{
"datacontenttype":string"application/json",
"id":string"test",
"mediaType":string"application/json",
"source":string"knative.dev/test",
"specversion":string"0.3",
"type":string"test.testing",
},
"data":{
"message":string"Hello CloudEvents!",
},
"extensions":{},
}
Which leads to the following server-side error:
2019-11-18 04:53:10,387 WARN [org.jbo.res.res.i18n] (executor-thread-21) RESTEASY002130: Failed to parse request.: java.lang.IllegalArgumentException: RESTEASY003340: Failure parsing MediaType string: application/json,application/json
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.internalParse(MediaTypeHeaderDelegate.java:113)
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.parse(MediaTypeHeaderDelegate.java:64)
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.fromString(MediaTypeHeaderDelegate.java:29)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:172)
at org.jboss.resteasy.specimpl.ResteasyHttpHeaders.getMediaType(ResteasyHttpHeaders.java:151)
at org.jboss.resteasy.specimpl.ResteasyHttpHeaders.testParsing(ResteasyHttpHeaders.java:69)
at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractHttpHeaders(ServletUtil.java:59)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:226)
at io.quarkus.resteasy.runtime.ResteasyFilter.doFilter(ResteasyFilter.java:30)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:160)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:270)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:59)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:116)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:113)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1$1.call(UndertowDeploymentRecorder.java:469)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:250)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:59)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:82)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:290)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:669)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
The native build must be fixed in order to work on linux/arm64
I met the problem of the trigger. I've asked here
Page cannot load when the page is exposed through a TLS route and the WS endpoint is not secured
The page at https://cloudevents-player.apps.example.com/ was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://cloudevents-player.apps.example.com'. This request has been blocked; this endpoint must be available over WSS.
I try to learn it using minikube@Mac M1, but the image doesn't exist and I tried to rebuild
$ podman build -t quay.io/ruben/cloudevents-player:latest -f src/main/docker/Dockerfile.native . STEP 1/6: FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 Trying to pull registry.access.redhat.com/ubi8/ubi-minimal:8.3... Getting image source signatures Checking if image destination supports signatures Copying blob sha256:56a04d997355c19a50990df9442628967dba3293799b2c058e9e6feae7c00e91 Copying blob sha256:9f2d1a2655b9b1c4e7a454a14b61d91972c2d9c6b5936eca839a994cf6483017 Copying config sha256:161b5eee3a1af34f1f9432ca11debf7abef432824a12418508256c38d1de18fa Writing manifest to image destination Storing signatures STEP 2/6: WORKDIR /work/ --> 0db0961f608 STEP 3/6: COPY target/*-runner /work/application Error: building at STEP "COPY target/*-runner /work/application": checking on sources under "/var/tmp/libpod_builder2131162895/build": Rel: can't make relative to /var/tmp/libpod_builder2131162895/build; copier: stat: ["/target/*-runner"]: no such file or directory
Possible to provide arm image or fix dockerfile for it?
I deployed Knative v0.25.0 with Istio 1.11.2 gateway and network layer, and use kn to create service. I found error in istio-proxy log with status code 400, and in mt broker log, there is a warning on datacontenttype context attribute can't be parsed properly. And I read the code of the broker, with the warning, it'll return 400 and reject the event.
How to fix this?
The cloudevents-player
is mentioned in the latest knative docs however it won't deploy against knative v0.24.0 because the Trigger
CRD moved to v1
from v1beta
.
After running for some time, cludevents-player UI stops working.
The error that is visible in the browser console is the following:
When I check the pod logs, I can see it is full of the following errors:
2023-03-01 14:34:50,799 ERROR [org.jbo.res.res.i18n] (ForkJoinPool.commonPool-worker-9) RESTEASY002020: Unhandled asynchronous exception, sending back 500: java.lang.NullPointerException
at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
at java.util.TimSort.countRunAndMakeAscending(TimSort.java:360)
at java.util.TimSort.sort(TimSort.java:234)
at java.util.Arrays.sort(Arrays.java:1515)
at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:503)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at com.redhat.syseng.tools.cloudevents.service.MessageService.newEvent(MessageService.java:46)
at com.redhat.syseng.tools.cloudevents.service.MessageService.receive(MessageService.java:39)
at com.redhat.syseng.tools.cloudevents.service.MessageService_ClientProxy.receive(MessageService_ClientProxy.zig:213)
at com.redhat.syseng.tools.cloudevents.resources.MessageReceiverResource.lambda$receive$0(MessageReceiverResource.java:45)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:497)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
I am attaching the full log here:
cloudevents-player.log
It would be nice to have support for both content modes.
Rename all packages and artifacts to com.github.ruromero.cloudeventsplayer
The documentation is not up to date with the new packages, versions and references to event content types capabilities.
It would be good to add some badges to show the current build and container statuses
The BROKER_NAME
and BROKER_NAMESPACE
generates a BROKER_URI
http://broker-ingress.knative-eventing.svc.cluster.local/<namespace>/<name>
but this only works for the InMemoryChannel-Broker.
The Kafka broker uses the kafka-broker-ingress
service making this configuration option unusable.
Besides, during deployment it requires an extra step to fetch the BROKER_URI
from the broker and set it to the deployment.
For that reason it would be good to leverage the SinkBinding custom resource for such integration. The SinkBinding injects a K_SINK
environment variable with the broker endpoint to the deployment. That solution will also allow to simplify the Knative Service definition by removing all the environment variables.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.