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

Can't bridge two Knative channels with new component #163

Closed
nicolaferraro opened this issue Oct 16, 2019 · 2 comments · Fixed by #166
Closed

Can't bridge two Knative channels with new component #163

nicolaferraro opened this issue Oct 16, 2019 · 2 comments · Fixed by #166

Comments

@nicolaferraro
Copy link
Member

I'm writing this integration:

from('knative:channel/messages')
  .transform().simple('transformed ${body}')
  .log('${body}')
  .to('knative:channel/words')

The messages channel is fed by another integration (from('timer:tick').setBody().constant("message").to('knative:channel/messages')).

When the integration doing the bridge receives the message, it goes in error:

knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration 2019-10-16 15:53:15.596 INFO  [vert.x-eventloop-thread-0] route1 - transformed message
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration 2019-10-16 15:53:15.601 WARN  [vert.x-eventloop-thread-0] KnativeHttpConsumer - Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: null to the required type: byte[] with value null]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: null to the required type: byte[] with value null
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:139) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:130) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.component.knative.http.KnativeHttpConsumer.computeResponseBody(KnativeHttpConsumer.java:218) ~[org.apache.camel.k.camel-knative-http-1.0.5-SNAPSHOT.jar:1.0.5-SNAPSHOT]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.component.knative.http.KnativeHttpConsumer.lambda$null$0(KnativeHttpConsumer.java:102) ~[org.apache.camel.k.camel-knative-http-1.0.5-SNAPSHOT.jar:1.0.5-SNAPSHOT]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.impl.engine.DefaultReactiveExecutor$2.run(DefaultReactiveExecutor.java:103) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:185) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.impl.engine.DefaultReactiveExecutor.schedule(DefaultReactiveExecutor.java:67) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.processor.Pipeline.lambda$doProcess$3(Pipeline.java:104) ~[org.apache.camel.camel-base-3.0.0-RC1.jar:3.0.0-RC1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at org.apache.camel.component.knative.http.KnativeHttpProducer.lambda$process$0(KnativeHttpProducer.java:159) ~[org.apache.camel.k.camel-knative-http-1.0.5-SNAPSHOT.jar:1.0.5-SNAPSHOT]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.handleDispatchResponse(HttpContext.java:308) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:295) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:270) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:69) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:32) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:267) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:277) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.dispatchResponse(HttpContext.java:238) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.ext.web.client.impl.HttpContext.lambda$null$2(HttpContext.java:367) ~[io.vertx.vertx-web-client-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369) ~[io.vertx.vertx-core-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38) ~[io.vertx.vertx-core-3.8.1.jar:3.8.1]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [io.netty.netty-common-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:416) [io.netty.netty-common-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:515) [io.netty.netty-transport-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) [io.netty.netty-common-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [io.netty.netty-common-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty.netty-common-4.1.39.Final.jar:4.1.39.Final]
knativemultihop2-cvfxj-deployment-868df47c-srpj8 integration    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]

@nicolaferraro
Copy link
Member Author

For completeness, here's the exchange before it goes in error (log with showHeaders=true):

knativemultihop2-68fl9-deployment-6854d7d66b-hp5bw integration 2019-10-16 21:02:44.294 INFO  [vert.x-eventloop-thread-0] info - Exchange[ExchangePattern: InOut, Headers: {Accept-Encoding=gzip, CamelHttpMethod=POST, CamelHttpPath=, CamelHttpQuery=null, CamelHttpUri=/, Ce-Knativehistory=messages-kn-channel.default.svc.cluster.local, Content-Length=7, Forwarded=for=172.17.0.18;proto=http, Host=knativemultihop2.default.svc.cluster.local, User-Agent=Go-http-client/1.1, X-B3-Parentspanid=5c2461d2cf110fb1, X-B3-Sampled=0, X-B3-Spanid=26c8336c27f91d46, X-B3-Traceid=aae915ed39a10a55044014e1e25f271d, X-Envoy-Decorator-Operation=knativemultihop2-68fl9.default.svc.cluster.local:80/*, X-Envoy-Expected-Rq-Timeout-Ms=600000, X-Envoy-Internal=true, X-Forwarded-For=172.17.0.18, 172.17.0.9, X-Forwarded-Proto=http, X-Request-Id=9dff4a19-4d18-9528-b96c-3b68b729c3f1}, BodyType: String, Body: message]

cc: @lburgazzoli

@nicolaferraro
Copy link
Member Author

But I guess it's related to the reply expected by the consumer, that is missing when you contact a channel (replies with 204, no content).

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

Successfully merging a pull request may close this issue.

1 participant