You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/12/28 18:44:49 UTC

[GitHub] [camel-k] ikwattro opened a new issue #1871: Cannot load Knative configuration from file or env variable

ikwattro opened a new issue #1871:
URL: https://github.com/apache/camel-k/issues/1871


   Hi,
   
   Camel K version : 
   
   ```
   $ kamel version
   Camel K Client 1.2.1
   ```
   
   I'm trying to bind a current knative broker along with an integration.
   
   The following integration : 
   
   ```
   from('knative:event/hire')
     .to('log:DEBUG')
   ```
   
   Fails with the following output : 
   
   ```
   $ kamel run knative/listener.groovy --dev
   // building logs removed for brevity
   [1] 2020-12-28 18:39:10,881 INFO  [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.5.0
   [1] 2020-12-28 18:39:10,904 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
   [1] 2020-12-28 18:39:10,976 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='listener', language='groovy', location='file:/etc/camel/sources/i-source-000/listener.groovy', }
   [1] 2020-12-28 18:39:12,952 INFO  [org.apa.cam.com.kna.KnativeComponent] (main) found knative transport: org.apache.camel.component.knative.http.KnativeHttpTransport@256bb5be for protocol: http
   [1] 2020-12-28 18:39:12,958 INFO  [org.apa.cam.mai.MainLifecycleStrategy] (main) CamelContext: camel-1 has been shutdown, triggering shutdown of the JVM.
   [1] 2020-12-28 18:39:12,959 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[knative:event/hire] -> [To[log:DEBUG]]] because of Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:118)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:830)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:582)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2680)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:468)
   [1] 	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2452)
   [1] 	at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2469)
   [1] 	at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:75)
   [1] 	at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
   [1] 	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:120)
   [1] 	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   [1] 	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   [1] 	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
   [1] 	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
   [1] 	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:664)
   [1] 	at io.quarkus.runtime.Application.start(Application.java:90)
   [1] 	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
   [1] 	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
   [1] Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:888)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:777)
   [1] 	at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
   [1] 	at org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177)
   [1] 	at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:250)
   [1] 	at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:112)
   [1] 	... 22 more
   [1] Caused by: java.lang.IllegalStateException: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.component.knative.KnativeComponent.getKnativeConfiguration(KnativeComponent.java:277)
   [1] 	at org.apache.camel.component.knative.KnativeComponent.createEndpoint(KnativeComponent.java:223)
   [1] 	at org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:240)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:855)
   [1] 	... 27 more
   [1]
   [1] 2020-12-28 18:39:12,960 ERROR [io.qua.application] (main) Failed to start application (with profile prod): java.lang.RuntimeException: java.lang.RuntimeException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[knative:event/hire] -> [To[log:DEBUG]]] because of Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:47)
   [1] 	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
   [1] 	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
   [1] 	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:664)
   [1] 	at io.quarkus.runtime.Application.start(Application.java:90)
   [1] 	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   [1] 	at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
   [1] 	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
   [1] Caused by: java.lang.RuntimeException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[knative:event/hire] -> [To[log:DEBUG]]] because of Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:65)
   [1] 	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   [1] 	... 9 more
   [1] Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[knative:event/hire] -> [To[log:DEBUG]]] because of Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:118)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:830)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.startRouteDefinitions(FastCamelContext.java:582)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2680)
   [1] 	at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:468)
   [1] 	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2452)
   [1] 	at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2469)
   [1] 	at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:75)
   [1] 	at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
   [1] 	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:120)
   [1] 	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   [1] 	... 10 more
   [1] Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: knative://event/hire due to: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:888)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:777)
   [1] 	at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
   [1] 	at org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177)
   [1] 	at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:250)
   [1] 	at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:112)
   [1] 	... 22 more
   [1] Caused by: java.lang.IllegalStateException: Cannot load Knative configuration from file or env variable
   [1] 	at org.apache.camel.component.knative.KnativeComponent.getKnativeConfiguration(KnativeComponent.java:277)
   [1] 	at org.apache.camel.component.knative.KnativeComponent.createEndpoint(KnativeComponent.java:223)
   [1] 	at org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:240)
   [1] 	at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:855)
   [1] 	... 27 more
   [1]
   Condition "Ready" is "False" for Integration listener
   ```
   
   The knative eventing config is basically from the knative getting started guide : 
   
   ```
   apiVersion: eventing.knative.dev/v1
   kind: broker
   metadata:
    name: default
    namespace: default
   ---
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: hello-display
   spec:
     replicas: 1
     selector:
       matchLabels: &labels
         app: hello-display
     template:
       metadata:
         labels: *labels
       spec:
         containers:
           - name: event-display
             image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display
   
   ---
   
   kind: Service
   apiVersion: v1
   metadata:
     name: hello-display
   spec:
     selector:
       app: hello-display
     ports:
     - protocol: TCP
       port: 80
       targetPort: 8080
   ---
   
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: goodbye-display
   spec:
     replicas: 1
     selector:
       matchLabels: &labels
         app: goodbye-display
     template:
       metadata:
         labels: *labels
       spec:
         containers:
           - name: event-display
             # Source code: https://github.com/knative/eventing-contrib/tree/master/cmd/event_display
             image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display
   
   ---
   
   kind: Service
   apiVersion: v1
   metadata:
     name: goodbye-display
   spec:
     selector:
       app: goodbye-display
     ports:
     - protocol: TCP
       port: 80
       targetPort: 8080
   ---
   apiVersion: eventing.knative.dev/v1
   kind: Trigger
   metadata:
     name: hello-display
   spec:
     broker: default
     filter:
       attributes:
         type: greeting
     subscriber:
       ref:
        apiVersion: v1
        kind: Service
        name: hello-display
   ---
   apiVersion: eventing.knative.dev/v1
   kind: Trigger
   metadata:
     name: goodbye-display
   spec:
     broker: default
     filter:
       attributes:
         source: sendoff
     subscriber:
       ref:
        apiVersion: v1
        kind: Service
        name: goodbye-display
   ```
   
   Informations about the camel k operator : 
   
   ```
   $ kubectl describe po camel-k-operator-6fb77886fc-qtdx8
   Name:         camel-k-operator-6fb77886fc-qtdx8
   Namespace:    default
   Priority:     0
   Node:         minikube/172.17.0.3
   Start Time:   Mon, 28 Dec 2020 14:19:26 +0100
   Labels:       app=camel-k
                 camel.apache.org/component=operator
                 name=camel-k-operator
                 pod-template-hash=6fb77886fc
   Annotations:  <none>
   Status:       Running
   IP:           172.18.0.13
   IPs:
     IP:           172.18.0.13
   Controlled By:  ReplicaSet/camel-k-operator-6fb77886fc
   Containers:
     camel-k-operator:
       Container ID:  docker://fdccde5bbc51abfbdbbbe32c39cb8f6bba8f8b58a88f5497d70f0475277fa716
       Image:         docker.io/apache/camel-k:1.2.1
       Image ID:      docker-pullable://apache/camel-k@sha256:924d468ca2921d5b24138399dc672402e143cdd659c061f0c4c27c05fb33e6f7
       Port:          <none>
       Host Port:     <none>
       Command:
         kamel
         operator
       State:          Running
         Started:      Mon, 28 Dec 2020 14:20:29 +0100
       Ready:          True
       Restart Count:  0
       Environment:
         WATCH_NAMESPACE:  default (v1:metadata.namespace)
         OPERATOR_NAME:    camel-k
         POD_NAME:         camel-k-operator-6fb77886fc-qtdx8 (v1:metadata.name)
         NAMESPACE:        default (v1:metadata.namespace)
       Mounts:
         /var/run/secrets/kubernetes.io/serviceaccount from camel-k-operator-token-9vdpp (ro)
   ```


----------------------------------------------------------------
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



[GitHub] [camel-k] ikwattro closed issue #1871: Cannot load Knative configuration from file or env variable

Posted by GitBox <gi...@apache.org>.
ikwattro closed issue #1871:
URL: https://github.com/apache/camel-k/issues/1871


   


----------------------------------------------------------------
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



[GitHub] [camel-k] ikwattro commented on issue #1871: Cannot load Knative configuration from file or env variable

Posted by GitBox <gi...@apache.org>.
ikwattro commented on issue #1871:
URL: https://github.com/apache/camel-k/issues/1871#issuecomment-752938819


   Was resolved by the 1.3.0 release 👍 


----------------------------------------------------------------
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