You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running java application to move files from one place to another periodically by using Spring @scheduled annotation. In test environment, we are executing the process every minute. The process checks if there are files to be moved.
In this test case, there are no files at all to be moved. The sshclient is created like this:
And sftp client like this: SftpClientBuilder.create().withClient(sshClient).build()
Once and a while this happens:
`29 May 2024 09:00:01,141 [ pool-746-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
29 May 2024 09:13:01,114 [ pool-751-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
29 May 2024 09:21:01,108 [ pool-755-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)`
And when I check the code, it should never happen: if (currentAuthenticator != null) { // should never happen throw new IllegalStateException("Authentication in progress!"); }
The text was updated successfully, but these errors were encountered:
Yes, it has to do with a fix i proposed for issue 82.
now the problem happens much less often (authentication failed) but when it happens, it will result in that exception, since there is still an race-condition anywhere. i will dig deeper into it in the next days.
We are running java application to move files from one place to another periodically by using Spring @scheduled annotation. In test environment, we are executing the process every minute. The process checks if there are files to be moved.
In this test case, there are no files at all to be moved. The sshclient is created like this:
And sftp client like this:
SftpClientBuilder.create().withClient(sshClient).build()
Once and a while this happens:
`29 May 2024 09:00:01,141 [ pool-746-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
29 May 2024 09:13:01,114 [ pool-751-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
29 May 2024 09:21:01,108 [ pool-755-thread-1] ERROR - Connection task failed with an error
java.lang.IllegalStateException: Authentication in progress!
at com.sshtools.client.AuthenticationProtocolClient.doNextAuthentication(AuthenticationProtocolClient.java:270)
at com.sshtools.client.AuthenticationProtocolClient.processMessage(AuthenticationProtocolClient.java:205)
at com.sshtools.synergy.ssh.TransportProtocol$5.doTask(TransportProtocol.java:2103)
at com.sshtools.common.ssh.ConnectionAwareTask.run(ConnectionAwareTask.java:49)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.executeAllTasks(ExecutorOperationSupport.java:134)
at com.sshtools.common.ssh.ExecutorOperationSupport$OperationTask.run(ExecutorOperationSupport.java:89)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)`
And when I check the code, it should never happen:
if (currentAuthenticator != null) { // should never happen throw new IllegalStateException("Authentication in progress!"); }
The text was updated successfully, but these errors were encountered: