You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/03/13 14:53:34 UTC
[GitHub] [camel-k] nicolaferraro opened a new issue #553: Can't connect to
kservices
nicolaferraro opened a new issue #553: Can't connect to kservices
URL: https://github.com/apache/camel-k/issues/553
source.groovy
```
from('timer:tick?period=3s')
.setBody().constant("Hello")
.to('knative:endpoint/dest')
```
dest.groovy
```
from('knative:endpoint/default')
.convertBodyTo(String.class)
.log('Recv: ${body}')
```
```
kamel run dest.groovy --dependency=mvn:org.apache.camel.k:camel-k-adapter-camel-2:0.3.2-SNAPSHOT
kamel run source.groovy --dependency=mvn:org.apache.camel.k:camel-k-adapter-camel-2:0.3.2-SNAPSHOT
```
(p.s. why do I have to add the adapter when using snapshots?)
The result is:
```
source-7fb4c9f847-4sklj source 2019-03-13 14:51:27.075 ERROR [Camel Thread #4 - NettyClientTCPWorker] DefaultErrorHandler - Failed delivery for (MessageId: ID-source-7fb4c9f847-4sklj-1552488609017-0-52 on ExchangeId: ID-source-7fb4c9f847-4sklj-1552488609017-0-51). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.netty4.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 404
source-7fb4c9f847-4sklj source Message History
source-7fb4c9f847-4sklj source ---------------------------------------------------------------------------------------------------------------------------------------
source-7fb4c9f847-4sklj source RouteId ProcessorId Processor Elapsed (ms)
source-7fb4c9f847-4sklj source [route1 ] [route1 ] [timer://tick?period=3s ] [ 5]
source-7fb4c9f847-4sklj source [route1 ] [setBody1 ] [setBody[constant{Hello}] ] [ 0]
source-7fb4c9f847-4sklj source [route1 ] [to1 ] [knative:endpoint/dest ] [ 4]
source-7fb4c9f847-4sklj source Stacktrace
source-7fb4c9f847-4sklj source ---------------------------------------------------------------------------------------------------------------------------------------
source-7fb4c9f847-4sklj source org.apache.camel.component.netty4.http.NettyHttpOperationFailedException: Netty HTTP operation failed invoking null with statusCode: 404
source-7fb4c9f847-4sklj source at org.apache.camel.component.netty4.http.NettyHttpHelper.populateNettyHttpOperationFailedException(NettyHttpHelper.java:162) ~[org.apache.camel.camel-netty4-http-2.23.1.jar:2.23.1]
source-7fb4c9f847-4sklj source at org.apache.camel.component.netty4.http.NettyHttpProducer$NettyHttpProducerCallback.done(NettyHttpProducer.java:138) [org.apache.camel.camel-netty4-http-2.23.1.jar:2.23.1]
source-7fb4c9f847-4sklj source at org.apache.camel.component.netty4.NettyProducer$NettyProducerCallback.done(NettyProducer.java:548) [org.apache.camel.camel-netty4-2.23.1.jar:2.23.1]
source-7fb4c9f847-4sklj source at org.apache.camel.component.netty4.handlers.ClientChannelHandler.channelRead0(ClientChannelHandler.java:210) [org.apache.camel.camel-netty4-2.23.1.jar:2.23.1]
source-7fb4c9f847-4sklj source at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) [io.netty.netty-all-4.1.31.Final.jar:4.1.31.Final]
source-7fb4c9f847-4sklj source at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
```
Using knative 0.3.
dump of the source deployment:
```
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
alpha.image.policy.openshift.io/resolve-names: '*'
deployment.kubernetes.io/revision: "1"
creationTimestamp: 2019-03-13T14:50:04Z
generation: 1
labels:
camel.apache.org/generation: "1"
camel.apache.org/integration: source
name: source
namespace: syndesis
ownerReferences:
- apiVersion: camel.apache.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Integration
name: source
uid: 49238a72-459f-11e9-b395-5254004d6350
resourceVersion: "4842049"
selfLink: /apis/extensions/v1beta1/namespaces/syndesis/deployments/source
uid: 492f3d77-459f-11e9-b395-5254004d6350
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
camel.apache.org/integration: source
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
traffic.sidecar.istio.io/includeOutboundIPRanges: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
creationTimestamp: null
labels:
camel.apache.org/integration: source
spec:
containers:
- env:
- name: JAVA_MAIN_CLASS
value: org.apache.camel.k.jvm.Application
- name: CAMEL_K_ROUTES
value: file:/etc/camel/sources/i-source-000/source.groovy?language=groovy
- name: CAMEL_K_CONF
value: /etc/camel/conf/application.properties
- name: CAMEL_K_CONF_D
value: /etc/camel/conf.d
- name: CAMEL_K_DIGEST
value: vOSzIzsN9b0Y-AJoX8Yevk5xuEKslU5Is2mehTn94sxA
- name: CAMEL_KNATIVE_CONFIGURATION
value: '{"services":[{"type":"endpoint","protocol":"http","name":"default","host":"0.0.0.0","port":8080,"metadata":{"service.path":"/"}}]}'
- name: CAMEL_K_VERSION
value: 0.3.1-SNAPSHOT
- name: CAMEL_K_RUNTIME_VERSION
value: 0.3.2-SNAPSHOT
- name: CAMEL_VERSION
value: 2.23.1
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: JAVA_CLASSPATH
value: ./resources:/etc/camel/conf:/etc/camel/resources:/etc/camel/sources/i-source-000:dependencies/com.fasterxml.jackson.core.jackson-annotations-2.9.0.jar:dependencies/com.fasterxml.jackson.core.jackson-core-2.9.8.jar:dependencies/com.fasterxml.jackson.core.jackson-databind-2.9.8.jar:dependencies/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.9.8.jar:dependencies/com.sun.xml.bind.jaxb-core-2.3.0.jar:dependencies/com.sun.xml.bind.jaxb-impl-2.3.0.jar:dependencies/commons-io.commons-io-2.6.jar:dependencies/commons-pool.commons-pool-1.6.jar:dependencies/io.netty.netty-all-4.1.31.Final.jar:dependencies/javax.servlet.javax.servlet-api-3.1.0.jar:dependencies/org.apache.camel.camel-core-2.23.1.jar:dependencies/org.apache.camel.camel-groovy-2.23.1.jar:dependencies/org.apache.camel.camel-http-common-2.23.1.jar:dependencies/org.apache.camel.camel-netty4-2.23.1.jar:dependencies/org.apache.camel.camel-netty4-http-2.23.1.jar:dependencies/org.apache.camel.k.camel-k-adapter-camel-2-0.3.2-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-k-runtime-core-0.3.2-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-k-runtime-groovy-0.3.2-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-k-runtime-jvm-0.3.2-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-knative-0.3.2-SNAPSHOT.jar:dependencies/org.apache.camel.k.camel-knative-http-0.3.2-SNAPSHOT.jar:dependencies/org.apache.commons.commons-collections4-4.3.jar:dependencies/org.apache.commons.commons-lang3-3.8.1.jar:dependencies/org.apache.logging.log4j.log4j-api-2.11.1.jar:dependencies/org.apache.logging.log4j.log4j-core-2.11.1.jar:dependencies/org.apache.logging.log4j.log4j-slf4j-impl-2.11.1.jar:dependencies/org.codehaus.groovy.groovy-2.5.4.jar:dependencies/org.jooq.joor-java-8-0.9.10.jar:dependencies/org.slf4j.slf4j-api-1.7.25.jar
image: 172.30.1.1:5000/syndesis/camel-k-ctx-bi4hg3rm74cjhufnsqu0@sha256:2f15a9f91e35ff0f166d76ea4cdb2ffff8e624aa14982bd3776bc9434be7a1ad
imagePullPolicy: IfNotPresent
name: source
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/camel/sources/i-source-000
name: i-source-000
- mountPath: /etc/camel/conf
name: integration-properties
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: content
path: source.groovy
name: source-source-000
name: i-source-000
- configMap:
defaultMode: 420
items:
- key: application.properties
path: application.properties
name: source-properties
name: integration-properties
status:
availableReplicas: 1
conditions:
- lastTransitionTime: 2019-03-13T14:50:09Z
lastUpdateTime: 2019-03-13T14:50:09Z
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: 2019-03-13T14:50:04Z
lastUpdateTime: 2019-03-13T14:50:09Z
message: ReplicaSet "source-7fb4c9f847" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services