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 2022/12/13 09:46:12 UTC

[GitHub] [camel-k] christophd opened a new issue, #3896: Kamelet http-sink not working

christophd opened a new issue, #3896:
URL: https://github.com/apache/camel-k/issues/3896

   The http-sink Kamelet raises errors during trait customization such as:
   
   ```
   component not found for uri \"{{url}}\" in camel catalog runtime version 1.16.0
   ```
   
   Error details
   ```
   {"level":"error","ts":1670923780.0970173,"logger":"controller.integration-controller","msg":"Reconciler error","reconciler group":"camel.apache.org","reconciler kind":"Integration","name":"aws-s3-to-http","namespace":"yaks-demo","error":"error during trait customization: component not found for uri \"{{url}}\" in camel catalog runtime version 1.16.0","errorVerbose":"component not found for uri \"{{url}}\" in camel catalog runtime version 1.16.0\nerror during trait customization\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:59\ngithub.com/apache/camel-k/pkg/controller/integration.(*initializeAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/initialize.go:54\ngithub.com/apache/camel-k/pkg/controller/integration.(*reconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:349\ngithub.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile\n\tgith
 ub.com/apache/camel-k/pkg/util/monitoring/controller.go:70\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227\nruntime.goexit\n\truntime/asm_arm64.s:1172","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runti
 me/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.11.2/pkg/internal/controller/controller.go:227"}
   ```
   
   The Kamelet uses a `to: {{url}}` where `url` is specified as Kamelet property
   
   This has been working with prior Camel K versions. I have encountered this with with v1.11.0


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Kamelet http-sink not working [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #3896:
URL: https://github.com/apache/camel-k/issues/3896#issuecomment-1808004610

   Thanks for reporting. I think it's a bug in the `IsResolvable` func, where we are expecting the variable to start and end with `{{` and `}}` whereas here it's not the case as there are added parameters. I'm opening a new issue for that.


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] christophd commented on issue #3896: Kamelet http-sink not working

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

   @tadayosi could you please have a look. I think there were some changes related to non resolved components/dependencies during inspection


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Kamelet http-sink not working [camel-k]

Posted by "mwmahlberg (via GitHub)" <gi...@apache.org>.
mwmahlberg commented on issue #3896:
URL: https://github.com/apache/camel-k/issues/3896#issuecomment-1806220012

   @oscerd Working on it ;)
   
   There is still something not quite working out. I run into the following errors for the http-secured-source with camel-k version s 1.12.10, 2.0.1 and 2.1.0. Below you will find the log for Camel K Client 2.1.0 & Camel K Operator 2.1.0, but it looked pretty much the same for all three versions
   
   ```json
   {"level":"error","ts":"2023-11-10T17:37:21Z","msg":"Reconciler error","controller":"integration-controller","controllerGroup":"camel.apache.org","controllerKind":"Integration","Integration":{"name":"http-secured-source-to-minio-sink","namespace":"test"},"namespace":"test","name":"http-secured-source-to-minio-sink","reconcileID":"6ea19c74-dfa3-43a8-aa5a-08a44932abb3","error":"error during trait customization: dependencies trait execution failed: component not found for uri \"{{url}}?authMethod=%7B%7BauthMethod%7D%7D&authPassword=%7B%7BauthPassword%7D%7D&authUsername=%7B%7BauthUsername%7D%7D&authenticationPreemptive=%7B%7BauthenticationPreemptive%7D%7D\" in camel catalog runtime version 3.2.0","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.15.2/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/contr
 oller-runtime@v0.15.2/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.15.2/pkg/internal/controller/controller.go:226"}
   ```
   
   if we look at the url-decoded uri string, it seems to fit:
   
   ```gotmpl
   {{url}}?authMethod={{authMethod}}&authPassword={{authPassword}}&authUsername={{authUsername}}&authenticationPreemptive={{authenticationPreemptive}}
   ```
   
   The Kamelet-Bindings or in this version the Pipe is rather simple:
   
   ```yaml
   apiVersion: camel.apache.org/v1
   kind: Pipe
   metadata:
     annotations:
       camel.apache.org/operator.id: camel-k
     creationTimestamp: null
     name: http-secured-source-to-minio-sink
     namespace: test
   spec:
     sink:
       properties:
         accessKey: <redacted>
         autoCreateBucket: "true"
         bucketName: customer
         endpoint: http://test-hl.test.svc.cluster.local:9000
         secretKey: <redacted>
       ref:
         apiVersion: camel.apache.org/v1
         kind: Kamelet
         name: minio-sink
         namespace: test
     source:
       properties:
         authMethod: Basic
         authPassword: <redacted>
         authUsername: <redacted>
         url: http://demo.<redacted>.sslip.io
       ref:
         apiVersion: camel.apache.org/v1
         kind: Kamelet
         name: http-secured-source
         namespace: test
   status: {}
   ```
   
   One of my assumptions was that this was a problem with eager loading and the sslip.io address, which turned out to be wrong: The address resolves within the cluster and I did change it to the according IP.
   
   
   Now one thing I noticed is that in the error string, the `{{` and `}}` are url encoded for the query string, but not for the url:
   
   ```
   "{{url}}?authMethod=%7B%7BauthMethod%7D%7D&authPassword=%7B%7BauthPassword%7D%7D&authUsername=%7B%7BauthUsername%7D%7D&authenticationPreemptive=%7B%7BauthenticationPreemptive%7D%7D"
   ```
   
   I'd assume that the problem is somewhere located about this... incsonsistency, because sure enough, `IsResolvable` fails:
   https://go.dev/play/p/C5kPnCliqmw
   
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez closed issue #3896: Kamelet http-sink not working

Posted by GitBox <gi...@apache.org>.
squakez closed issue #3896: Kamelet http-sink not working
URL: https://github.com/apache/camel-k/issues/3896


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Kamelet http-sink not working [camel-k]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #3896:
URL: https://github.com/apache/camel-k/issues/3896#issuecomment-1806232043

   Thanks for the detailed report. Cc @christophd @squakez @gansheer @claudio4j let's have a look next week if feasible


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Kamelet http-sink not working [camel-k]

Posted by "mwmahlberg (via GitHub)" <gi...@apache.org>.
mwmahlberg commented on issue #3896:
URL: https://github.com/apache/camel-k/issues/3896#issuecomment-1806104235

   Same is true at least for the http-secured-source.


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Kamelet http-sink not working [camel-k]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on issue #3896:
URL: https://github.com/apache/camel-k/issues/3896#issuecomment-1806106534

   > Same is true at least for the http-secured-source.
   
   Commenting on a closed PR won't help. What is version? What is the error? What is not working? Open another issue and report the problem. A comment won't help reproducing the problem. Also the Kamelets are hosted at https://github.com/apache/camel-kamelets/tree/main/kamelets


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org