-
Notifications
You must be signed in to change notification settings - Fork 73
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
STATUS_LOGON_FAILURE #273
Comments
Thanks for the report. Can you please share the source code that can be used to reproduce this error? A Short, Self Contained, Correct, Example would be awesome. Please consider adding a traceback to the erors. From the screenshot I can't see any traceback into smbprotocol code. Do you use the |
Hi, coming back with stacktrace Error 1:
Same context Error 2: Unfortunately i do not have a stacktrace for this,,, Thanks |
I am not familiar with the design of the high level smbclient API. By reading the code of smbclient, I can see there is not implicit error recovering. I guess that it works as expected. Looking at the general functionality of Errors can happen at login, or in the middle of a transfer, and From what I can see in the current API, I know that APIs like Have you found somewhere in the |
I guess that when the connection is lost, the previous session is removed ... see last line smbprotocol/src/smbprotocol/session.py Lines 397 to 426 in 4591007
Do you have A self contained example would be best, so that others can reproduce and investiage :) |
AFAIK they do have an expiration but it is controlled by the server and when expired they return As for how long the expiration is it seems like https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/9c882bcd-99f0-46c9-8a35-3f09d0e75699 and the 210 footnote indicates it's 45 seconds. I've tried to replicate this scenario by running the below but it's not expiring for me so there's something more to the expiration from what I can tell. import time
import smbclient
print(smbclient.listdir(r"\\server2022.domain.test\c$\temp"))
time.sleep(60)
print(smbclient.listdir(r"\\server2022.domain.test\c$\temp"))
I think it might be related to #272 where there is something that is causing a new session to be created but any explicit credentials being provided are dropped so it tries to use a cached credential which in your case doesn't exist. Without having a reproducer or traceback that will be hard to solve unfortunately.
I'm sorry I'm not 100% sure what your question is here. The logic for re-using a connection/session is as follows
Even if that's the case I don't believe we have any pro-active cleanup on the connections, the only time a connection is removed from the cache is if someone has explicitly deleted it.
This is true, each session is scoped specifically to a connection, you cannot share a session with multiple connections as the authentication is tied directly to that socket. Closing a connection, or creating a new one will always result in a new session needing to be authenticated.
This is a result of an authentication failure as denoted by the server. This could be for any reason such as
Unfortunately we are limited to reporting what the server responds back to us, it simply provides the error code and the message is the Win32 message associated with that code. To find out why the server might be rejecting the logon you really need to look into the logs on the server side and see what it reports. |
Hi
I'm using this library in a multithread application with multiple connections. Currently we manage a pool of like 10 sessions and we will reuse them for all the requests.
The sessions are used all time and should not get into idle.
Do you know if these sessions have a expiration date... because I didn't see and information about that
We need to manage ourselves these sessions expirations and recreate them periodically?
Thanks
The text was updated successfully, but these errors were encountered: