[python3-ldap] Socket errors carried through

python3ldap python3ldap at gmail.com
Wed Apr 16 22:17:53 CEST 2014


Hi Joseph,
you get the error while sending or after you have got the response?

According to MSDN the server closes the connection:
WSAECONNRESET 10054

Connection reset by peer.

An existing connection was forcibly closed by the remote host. This
normally results if the peer application on the remote host is
suddenly stopped, the host is rebooted, the host or remote network
interface is disabled, or the remote host uses a hard close (see
setsockopt for more information on the SO_LINGER option on the remote
socket). This error may also result if a connection was broken due to
keep-alive activity detecting a failure while one or more operations
are in progress. Operations that were in progress fail with
WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

LDAP specifies that if the server wants to reset connection you should
get an unsolicited notification. python3-ldap checks for this kind of
message from server. You should get a 'session terminated by server'
in the connection.last_error attribute after the exception is raised.

Can you check if this is the case?

Giovanni



2014-04-16 21:51 GMT+02:00 Joseph L. Casale <jcasale at activenetwerx.com>:
> I am using a server pool defined as :
>
>
>
>   pool_strategy=POOLING_STRATEGY_ROUND_ROBIN
>
>   active=True
>
>   exhaust=True
>
>
>
> and yet I am intermittently seeing a WinError 10054, ‘An existing connection
>
> was forcibly closed by the remote host’ being passed up after I open a
> connection
>
> and initiate a few searches from it.
>
>
>
> These connections are very short lived, less than a minute usually so it’s
> safe to say
>
> this is not a wait time / topology related issue.
>
>
>
> What are your thoughts Giovanni?
>
> Thanks,
>
> jlc
>
>
> _______________________________________________
> python3-ldap mailing list
> python3-ldap at python.org
> https://mail.python.org/mailman/listinfo/python3-ldap
>


More information about the python3-ldap mailing list