You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "TNTdesigner (via GitHub)" <gi...@apache.org> on 2025/12/04 14:27:06 UTC
[I] SFTP syntax issues when using cron trait [camel-k]
TNTdesigner opened a new issue, #6392:
URL: https://github.com/apache/camel-k/issues/6392
### Bug description
I'm creating an integration and running in to issues with the syntax when using the cron trait
The following integration works as expected when having the from uri as one big string:
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: integration-job
namespace: camel-mft
spec:
flows:
- from:
uri: "sftp://user@server1:22/testcamel/job/in/\
?privateKeyFile=/etc/camel/keys/id_rsa\
&strictHostKeyChecking=false\
&knownHostsFile=/dev/null\
&localWorkDirectory=/tmp\
&streamDownload=true\
&delete=true"
steps:
- to:
uri: sftp
parameters:
host: server2
port: "22"
username: user
directoryName: /testcamel/job/out/
privateKeyFile: /etc/camel/keys/id_rsa
strictHostKeyChecking: false
knownHostsFile: /dev/null
localWorkDirectory: /tmp
streamDownload: true
- log: "Successfully transferred file ${header.CamelFileName} (${header.CamelFileLength} bytes)"
- onException:
exception: java.lang.Exception
steps:
- log: "Failed to transfer file ${header.CamelFileName}: ${exception.message}"
traits:
mount:
resources:
- "secret:rsync-secret/id_rsa@/etc/camel/keys/id_rsa"
configuration:
configs:
- configmap:integration-job-config/application.properties@/etc/camel/conf.d/_resources/application.properties
cron:
enabled: true
schedule: "*/2 * * * *"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: integration-job-config
namespace: camel-mft
data:
application.properties: |
camel.main.durationMaxMessages=10
camel.main.durationMaxSeconds=120
camel.main.durationMaxIdleSeconds=10
When formatting this uri in the same way as the target:
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: integration-job
namespace: camel-mft
spec:
flows:
- from:
uri: sftp
parameters:
host: server1
port: "22"
username: user
directoryName: /testcamel/job/in/
privateKeyFile: /etc/camel/keys/id_rsa
strictHostKeyChecking: false
knownHostsFile: /dev/null
localWorkDirectory: /tmp
streamDownload: true
steps:
- to:
uri: sftp
parameters:
host: server2
port: "22"
username: user
directoryName: /testcamel/job/out/
privateKeyFile: /etc/camel/keys/id_rsa
strictHostKeyChecking: false
knownHostsFile: /dev/null
localWorkDirectory: /tmp
streamDownload: true
- log: "Successfully transferred file ${header.CamelFileName} (${header.CamelFileLength} bytes)"
- onException:
exception: java.lang.Exception
steps:
- log: "Failed to transfer file ${header.CamelFileName}: ${exception.message}"
traits:
mount:
resources:
- "secret:secret/id_rsa@/etc/camel/keys/id_rsa"
configuration:
configs:
- configmap:integration-job-config/application.properties@/etc/camel/conf.d/_resources/application.properties
cron:
enabled: true
schedule: "*/2 * * * *"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: integration-job-config
namespace: camel-mft
data:
application.properties: |
camel.main.durationMaxMessages=10
camel.main.durationMaxSeconds=120
camel.main.durationMaxIdleSeconds=10
I get the following error:
2025-12-04 13:20:27,487 INFO org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 3.15.3
2025-12-04 13:20:27,490 INFO org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Apache Camel Quarkus 3.15.3 is starting
2025-12-04 13:20:27,492 INFO org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 4.8.5 is starting
2025-12-04 13:20:27,584 INFO org.apa.cam.mai.BaseMainSupport] (main) Cloud properties location: Optional[/etc/camel/conf.d/_resources/application.properties]
2025-12-04 13:20:27,681 INFO org.apa.cam.k.sup.SourcesSupport] (main) Loading routes from: SourceDefinition{name='camel-k-embedded-flow', language='yaml', type='source', location='file:/etc/camel/sources/camel-k-embedded-flow.yaml', }
2025-12-04 13:20:28,193 ERROR org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[sftp] -> [OnException[[java.lang.Exceptio... because of No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:92)
at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:726)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:592)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2433)
at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:195)
at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2068)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2087)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:91)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:137)
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:793)
at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:739)
at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:66)
at org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:199)
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:106)
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:86)
... 30 more
2025-12-04 13:20:28,381 ERROR io.qua.run.Application] (main) Failed to start application: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[sftp] -> [OnException[[java.lang.Exceptio... because of No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:47)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
... 13 more
Caused by: java.lang.RuntimeException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[sftp] -> [OnException[[java.lang.Exceptio... because of No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:65)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
... 15 more
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[sftp] -> [OnException[[java.lang.Exceptio... because of No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:92)
at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:726)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:592)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2433)
at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:195)
at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2068)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2087)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:91)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:137)
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
... 16 more
Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: sftp, please check your classpath contains the needed Camel component jar.
at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:793)
at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:739)
at org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:66)
at org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:199)
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:106)
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:86)
... 30 more
### Camel K or runtime version
3.15.3
--
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] SFTP syntax issues when using cron trait [camel-k]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #6392: SFTP syntax issues when using cron trait
URL: https://github.com/apache/camel-k/issues/6392
--
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