[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-29 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1330849650

   Looks like we should also write the file open modes to the log.
   
   Using the file system
   
   - the file will be deleted first if it existed (it didn't, as the stat 
response shows), and
   - the open() call will include the `Exclusive` flag.
   
   I don't know why the server seems to have a problem with the direct open() 
call. I don't really see how I could help here further. AFAIK, the actual 
open() call is in both cases the very same piece of code in Apache MINA sshd. 
So any difference in server behavior must be caused by different request 
parameters (different flags), or a different device state (such as the file 
already existing).


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-25 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1327864918

   @GabriRuflex : a fix for this problem has been merged. If there is still a 
problem with SFTP uploads to that device using the current master branch of 
Apache MINA SSHD, feel free to open a new bug report. (I suspect there might 
be, since the server should respond to an open() call with an SSH_FXP_STATUS 
reply only if it encountered an error. If the open() succeeds, it should send 
back an SSH_FXP_HANDLE response.)


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-25 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1327610522

   >Probably the remote device runs a very old version of SFTP. [Prior to SFTP 
version 
3](https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-09#section-12.4),
 the SSH_FXP_STATUS reply indeed didn't have the error message and language tag 
fields.
   
   Actually, it's a bit worse: the [very first of the SFTP v3 
drafts](https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-00#section-7)
 also did not have these two fields yet. They appeared only in the [second 
SFTPv3 
draft](https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-01#section-6).
   
   Therefore there may indeed be old servers that implement only that very 
early specification, and rightfully claim to implement SFTPv3 but not send 
these fields. In order to support such old SFTPv3 servers, an SFTP client 
_must_ treat the error message and language tag fields in SSH_FXP_STATUS as 
optional.
   
   


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-24 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1326366566

   Thanks. So this is some device using Huawei VRP. (The server identifies as 
SSH-2.0-HUAWEI-1.5.) Indeed the negotiated SFTP version is SFTP v3.
   
   I'll fix this `BufferException: Underflow` and improve SFTP logging, but as 
I wrote above, I don't think this will resolve the problem with this device. 
But maybe with better logging we can then see better what might be going on.
   
   


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-24 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1326145330

   Yes, that is the code. But what about the _debug log_ when you run that 
code? (You should include a logging back-end in your test application, for 
instance slf4j-simple, and then [configure 
it](https://stackoverflow.com/questions/14544991/how-to-configure-slf4j-simple) 
to produce logging output at the debug level.)


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-24 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1326126585

   Sorry for not having been clear enough: I'm interested in the debug log of 
your _Java client that is using Apache MINA SSHD and that is getting the 
exception_. And please show the full log from the initial connection to the 
exception.


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-23 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1325363078

   Could you please run your client code with debug logging on and post or 
attach the log here? 


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] tomaswolf commented on issue #275: SFTP fails and returns BufferException during file upload

2022-11-23 Thread GitBox


tomaswolf commented on issue #275:
URL: https://github.com/apache/mina-sshd/issues/275#issuecomment-1325030738

   What does the _remote_ device run?
   
   Three points:
   
   1. The exception occurs after having received an error reply from the server 
in response to the `sftp.open()` call. So even if this particular exception is 
fixed, your problem will not be solved.
   2. The `BufferException: Underflow: requested=4, available=0` [at that 
point](https://github.com/apache/mina-sshd/blob/45fd3a4a84c453a5e053cce624f63465844deb07/sshd-sftp/src/main/java/org/apache/sshd/sftp/client/impl/AbstractSftpClient.java#L248)
 indicates that the server sent no error message or language tag in the error 
status reply. I can't find any information that would say these were 
optional... but Apache MINA sshd could perhaps be lenient and consider them so.
   3. The failing code has been touched last 8 years ago, so the problem is 
certainly not new in 2.9.2. I wonder why this problem never was reported before?


-- 
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: dev-unsubscr...@mina.apache.org

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


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org