-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Getting 'SSH_FX_NO_SUCH_PATH' SFTP error, even though file exists #9114
Labels
Milestone
Comments
cassis163
added
status: waiting-for-triage
The issue need to be evaluated and its future decided
type: bug
labels
May 4, 2024
Maybe there is supposed to be some permission enabled for such a command? |
Please, take a look here: #9123. |
Looks like this one has to use a Will fix it shortly. |
artembilan
added
in: sftp
(EOL) for: backport-to-6.1.x
(EOL) for: backport-to-6.2.x
and removed
status: waiting-for-triage
The issue need to be evaluated and its future decided
labels
May 7, 2024
spring-builds
pushed a commit
that referenced
this issue
May 7, 2024
Fixes: #9114 If path is not in normalized presentation, the SFTP operation might fail like: ``` Caused by: SFTP error (SSH_FX_NO_SUCH_PATH): The file path does not exist or is invalid. at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:277) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributesResponse(AbstractSftpClient.java:333) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributes(AbstractSftpClient.java:325) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.lstat(AbstractSftpClient.java:1010) at org.springframework.integration.sftp.session.SftpSession.exists(SftpSession.java:191) ``` * Use it now like this `this.sftpClient.lstat(normalizePath(path))` (cherry picked from commit 8b88668)
spring-builds
pushed a commit
that referenced
this issue
May 7, 2024
Fixes: #9114 If path is not in normalized presentation, the SFTP operation might fail like: ``` Caused by: SFTP error (SSH_FX_NO_SUCH_PATH): The file path does not exist or is invalid. at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:277) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributesResponse(AbstractSftpClient.java:333) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributes(AbstractSftpClient.java:325) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.lstat(AbstractSftpClient.java:1010) at org.springframework.integration.sftp.session.SftpSession.exists(SftpSession.java:191) ``` * Use it now like this `this.sftpClient.lstat(normalizePath(path))` (cherry picked from commit 8b88668)
This was referenced May 7, 2024
EddieChoCho
pushed a commit
to EddieChoCho/spring-integration
that referenced
this issue
Jun 26, 2024
Fixes: spring-projects#9114 If path is not in normalized presentation, the SFTP operation might fail like: ``` Caused by: SFTP error (SSH_FX_NO_SUCH_PATH): The file path does not exist or is invalid. at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:277) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributesResponse(AbstractSftpClient.java:333) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkAttributes(AbstractSftpClient.java:325) at org.apache.sshd.sftp.client.impl.AbstractSftpClient.lstat(AbstractSftpClient.java:1010) at org.springframework.integration.sftp.session.SftpSession.exists(SftpSession.java:191) ``` * Use it now like this `this.sftpClient.lstat(normalizePath(path))` **Auto-cherry-pick to `6.2.x` & `6.1.x`**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
In what version(s) of Spring Integration are you seeing this issue?
6.2.4
Describe the bug
During the development of a custom backup advice, I encountered the 'SSH_FX_NO_SUCH_PATH' SFTP error. The strange thing is that when I connect to the SFTP-server locally, it works fine. But it malfunctions when my Spring Boot project runs inside of a Linux Docker container. Yes, it is a classic 'it works on my machine' type of problem, but after quite a bit of debugging, I still have not found the issue.
The path used for checking if the file exists and eventually for its retrieval is
to_wms/orders/15408213_Canonical.json
. Prepending this path with '/' is something that I have also tried.Honestly, I'm not sure if this is actually a bug. It might very well be misconfiguration on my part.
Here are some things that I have tried, but to no avail:
session.readRaw
This is my backup method:
Here is the stack trace:
To Reproduce
Use the SftpRemoteFileTemplate inside of an advice in a Linux Docker container and try to call either the
exists
orget
method.Expected behavior
The file should be retrieved succesfully.
The text was updated successfully, but these errors were encountered: