-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Timeout exeption during reconnect is preventing re-auth to happen? #1646
Comments
Hi there. Let's see, here are some first observations and some information.
This "20 Daq...." response is not recognised by FluentFTP, thus no USER and PASS command is issued, thus the error 530 is caused.
so that you can get an idea of the sequence that is happening.
Unless you post a complete log, this is all I can do at this moment given the available information. But maybe we can go step by step... |
Hi, first of all, thanks a lot for the reply. I understand that the provided logs are not detailed, but this is all I've got at the moment. A bit of context now. Clients are removed from the pool after 30 seconds of inactivity. I usually have 1, max 2 clients active in the pool. What happens here is that one of them is basically stuck, every request is failing but being the only one in the pool I'm screwed (I will add a policy that a client is removed from the pool after N consecutive failures). So logs are are not redacted, there is nothing else going on, those are the successive calls to the same client I'm talking about and they all fail. I use a client mainly to:
This is exacly how it appears in the log. Other occurrences in the log of the
It could be, however while the above client was failing there was a second one that sometimes got created and added to the pool and was working fine, this is why it looks like the issue is in the state of the failing client. I posted this request just to see if something obvious could come to your mind. I am aware that the provided information are not detailed, unfortunately as a user/client I'm also on the blind side. Thanks anyway! |
That would be a possibility, definitely, especially because of this sequence, which is difficult to understand with so small context:
What was the command (***********)? The response seems to be out of sync. It should have been a response to a connect. Do you have logs separated for each client? |
SslStream could be unclean as to multiple simultaneous auth processes in an old .NET (4.7.2 !!!), I remember some such difficult to resolve issues from one or two years ago. You could perhaps at least disprove that, by locking your parallel processes around a connect - and this, I realise, you cannot do so easily, as the reconnect happens internally beyond your control. Maybe, try to answer the obvious first question: Why does the initial reconnect happen in the first place? What goes wrong and then causes the whole set of subsequent problems? |
Yes, I remember your setup. |
I would add a field after "DEBUG", showing the client ID, for each line. And then post the entire log for all clients in sequence. |
I may know this one. For historical reasons a file download request is preceded by a custom Possible mitigations on my side:
I know, I know. So many legacy components that migrating is not easy... (actually we are on 4.8, but ok, still Framework)
For readability I removed the ThreadID/name that follows severity in logs. That would do the same job because client pool is thread safe but a client is used by a thread at time. Thanks again |
Ah, I see. And you don't know it happens, so the control connection dies. And thus the problem begins and then escalates. A suggestion: You could do a API "IsStillConnected" for some 30-60 seconds, every 5 seconds, before the next REAL command to the server. If it fails, then you wait, say, 90 seconds for the server to "reboot" and be ready? |
Any news on this? @Adhara3 I'm sure we could debug this in more detail. |
FTP Server OS: Embedded
FTP Server Type: Custom
Client Computer OS: Windows 10
FluentFTP Version: 50.1.0.0
Framework: .NET Framework 4.7.2
This is a working sequence when
Reconnect needed due to disconnected control connection
. As you can see there areUSER
andPASS
commandsWith another client (ID 119a61a653d84b53a8d6b16083bd4c20) I issued a
Command: RETR
that wentTimeout
, ok fine.The problem is that Tthen I issued another command through this second client and
So it fails while reconnecting.
And later on
So despite not being able to complete the reconnect sequence it tries to execute the command but fails.
It goes on failing with 530, then later on, a
Testing connectivity using Socket.Poll()
kicks in which retriggers the reconnect behaviorDo you think there could be an issue there? Is this expected behavior? Has it been fixed in 51.x (I couldn't find any evidence in the release notes)?
Thanks a lot
A
The text was updated successfully, but these errors were encountered: