yaroslavambrozyak opened a new issue, #484:
URL: https://github.com/apache/mina-sshd/issues/484

   ### Version
   
   2.9.2
   
   ### Bug description
   
   Hi, I recently migrated a project to Spring Boot 3 and faced an issue 
connecting to a remote SFTP server. I get a timeout during auth, this is 
printed in the console
   ```
   Disconnecting(ClientSessionImpl[someuser@somehost/0.0.0.0:22]): 
SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120823/120000 ms.
   ```
   If I spawn an SFTP docker container on my local then I can connect to my 
local SFTP, also I can connect to the remote server if I use Spring Boot 2.x 
version.
   
   Can I run it in verbose or debug mode to see some additional information? 
   I really appreciate any help you can provide.
   
   
   ### Actual behavior
   
   I have tried to connect to a remote server using simple code
   ```
   SshClient sshClient = SshClient.setUpDefaultClient();
           
   sshClient.start();
   ConnectFuture connect = sshClient.connect("username", "host", 22);
   ClientSession clientSession = connect.verify().getClientSession();
   clientSession.addPasswordIdentity("pass");
   
   AuthFuture authFuture = clientSession.auth().verify();
   ```
   so it hangs on the last line and after some time prints a log I mentioned 
above
   The same code is working if I try to connect to my local SFTP server (it 
does not throw any timeout exception)
   
   ### Expected behavior
   
   Be able to connect to the server
   
   ### Relevant log output
   
   ```Shell
   2024-04-15T17:30:02.807+03:00  INFO 35672 --- [           main] 
o.a.s.c.i.DefaultIoServiceFactoryFactory : No detected/configured 
IoServiceFactoryFactory; using Nio2ServiceFactoryFactory
   2024-04-15T17:30:02.833+03:00  INFO 35672 --- [           main] 
c.c.h.DefaultConfigFileHostEntryResolver : 
resolveEffectiveResolver(<some_host>) no configuration file at 
C:\Users\User1\.ssh\config
   
   2024-04-15T17:30:03.134+03:00  WARN 35672 --- []-nio2-thread-6] 
o.a.s.c.k.AcceptAllServerKeyVerifier     : Server at <some_host> presented 
unverified RSA key: SHA256:vT...n+w
   2024-04-15T17:32:03.807+03:00  INFO 35672 --- [-timer-thread-1] 
o.a.s.client.session.ClientSessionImpl   : 
Disconnecting(ClientSessionImpl[<some_host>]): SSH2_DISCONNECT_PROTOCOL_ERROR - 
Detected AuthTimeout after 120823/120000 ms.
   
   org.apache.sshd.common.SshException: Session is being closed
        at 
org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:141)
        at 
org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:56)
        at 
org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:35)
        at 
org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43)
        at 
com.example.sftpdebug.SftpdebugApplication.main(SftpdebugApplication.java:31)
   Caused by: org.apache.sshd.common.SshException: Session is being closed
        at 
org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169)
        at 
org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94)
        at 
org.apache.sshd.common.session.helpers.SessionHelper.lambda$disconnect$9(SessionHelper.java:1213)
        at 
org.apache.sshd.common.future.AbstractSshFuture.lambda$notifyListener$3(AbstractSshFuture.java:178)
        at 
org.apache.sshd.common.util.threads.ThreadUtils.runAsInternal(ThreadUtils.java:68)
        at 
org.apache.sshd.common.future.AbstractSshFuture.notifyListener(AbstractSshFuture.java:177)
        at 
org.apache.sshd.common.future.DefaultSshFuture.addListener(DefaultSshFuture.java:214)
        at 
org.apache.sshd.common.session.helpers.SessionHelper.disconnect(SessionHelper.java:1197)
        at 
org.apache.sshd.common.session.helpers.SessionHelper.checkForTimeouts(SessionHelper.java:301)
        at 
org.apache.sshd.common.session.helpers.SessionTimeoutListener.run(SessionTimeoutListener.java:84)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at 
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
        at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   
   
   ### Other information
   
   _No 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.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

Reply via email to