GabriRuflex commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1326117812
> Could you please run your client code with debug logging on and post or
attach the log here?
Put file:
```
sftp> put test.dat
debug3: Looking up test.dat
Uploading test.dat to /test.dat
debug3: Sent message SSH2_FXP_OPEN I:2 P:/test.dat
test.dat
100% 0 0.0KB/s 00:00
debug3: Sent message SSH2_FXP_CLOSE I:3
debug3: SSH2_FXP_STATUS 0
sftp>
```
LS and remove file:
```
sftp> rm tesdebug3: Sending SSH2_FXP_READDIR I:26
debug3: Received reply T:104 I:26
debug3: Received 23 SSH2_FXP_NAME responses
debug3: Sending SSH2_FXP_READDIR I:27
debug3: Received reply T:101 I:27
debug3: Received SSH2_FXP_STATUS 1
debug3: Sent message SSH2_FXP_CLOSE I:28
debug3: SSH2_FXP_STATUS 0
debug3: Sent message fd 3 T:7 I:29
debug3: Received stat reply T:105 I:29
sftp> rm test.dat
debug3: Sent message fd 3 T:7 I:30
debug3: Received stat reply T:105 I:30
Removing /test.dat
debug2: Sending SSH2_FXP_REMOVE "/test.dat"
debug3: Sent message fd 3 T:13 I:31
debug3: SSH2_FXP_STATUS 0
sftp>
```
If I try to remove the file using MINA sshd library, the file is removed but
a BufferException is returned:
```
org.apache.sshd.common.util.buffer.BufferException: Underflow: requested=4,
available=0
at
deployment.hpsa.ear//org.apache.sshd.common.util.buffer.Buffer.ensureAvailable(Buffer.java:635)
at
deployment.hpsa.ear//org.apache.sshd.common.util.buffer.Buffer.getUInt(Buffer.java:281)
at
deployment.hpsa.ear//org.apache.sshd.common.util.buffer.Buffer.getInt(Buffer.java:277)
at
deployment.hpsa.ear//org.apache.sshd.common.util.buffer.ByteArrayBuffer.getString(ByteArrayBuffer.java:240)
at
deployment.hpsa.ear//org.apache.sshd.common.util.buffer.Buffer.getString(Buffer.java:309)
at
deployment.hpsa.ear//org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkResponseStatus(AbstractSftpClient.java:184)
at
deployment.hpsa.ear//org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkCommandStatus(AbstractSftpClient.java:164)
at
deployment.hpsa.ear//org.apache.sshd.sftp.client.impl.AbstractSftpClient.remove(AbstractSftpClient.java:608)
at
deployment.hpsa.ear//org.apache.sshd.sftp.client.fs.SftpFileSystem$Wrapper.remove(SftpFileSystem.java:330)
at
deployment.hpsa.ear//org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.delete(SftpFileSystemProvider.java:593)
at
java.base/java.nio.file.spi.FileSystemProvider.deleteIfExists(FileSystemProvider.java:787)
at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]