Discussion:
Pymongo Server Selection Timeout Error: SSL handshake
(too old to reply)
tanay patil
2018-08-29 16:14:48 UTC
Permalink
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4df76369-1855-4a7c-8794-8c8011e51963%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Bernie Hackett' via mongodb-user
2018-08-30 15:20:10 UTC
Permalink
That error message is from Python's SSL module. It's unrelated to Kerberos.
What version of Python are you using? Please post the output from this
one-liner:

python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/107a755c-9c68-4c5b-a501-59b794c695fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-08-30 15:25:16 UTC
Permalink
I'm using python 2.7.3

On Thu 30 Aug, 2018, 8:50 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
That error message is from Python's SSL module. It's unrelated to
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/107a755c-9c68-4c5b-a501-59b794c695fd%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/107a755c-9c68-4c5b-a501-59b794c695fd%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgou0JEwiJPwzj9jekC7ewbxduBRSgxEiDeTZP1fUogDqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Bernie Hackett' via mongodb-user
2018-08-30 16:14:29 UTC
Permalink
Please upgrade to a much newer patch release of Python 2.7. The current
release is Python
2.7.15. https://www.python.org/downloads/release/python-2715/ Many changes
and fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/bdab33c2-432d-416c-beb5-3446c8c49913%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-08-31 06:55:50 UTC
Permalink
I tried on python 3.6.3 and the error remains the same. Also, I tried with
different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.

On Thu 30 Aug, 2018, 9:44 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The current
release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes and
fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/bdab33c2-432d-416c-beb5-3446c8c49913%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/bdab33c2-432d-416c-beb5-3446c8c49913%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgruQanKkGdsH-x4jmOBnGbb7sti8nehD-%2BB%2B1RcsBtpNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-03 13:40:08 UTC
Permalink
Can anyone please suggest a solution for this problem?
Post by tanay patil
I tried on python 3.6.3 and the error remains the same. Also, I tried with
different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.
On Thu 30 Aug, 2018, 9:44 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The current
release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes and
fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/bdab33c2-432d-416c-beb5-3446c8c49913%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/bdab33c2-432d-416c-beb5-3446c8c49913%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgpwkjHvARs87tcqXfir6uoHBF56QrHPxQ1wZ-ruBc2uGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Bernie Hackett' via mongodb-user
2018-09-04 16:52:01 UTC
Permalink
PyMongo uses Python's ssl module, not pyopenssl, so installing pyopenssl
won't help. This error is SSL specific so pykerberos and winkerberos have
nothing to do with it. Can you try with Python 3.7 and report back? If you
still get a traceback can you post the entire traceback here (not just the
error message)?
Post by tanay patil
Can anyone please suggest a solution for this problem?
Post by tanay patil
I tried on python 3.6.3 and the error remains the same. Also, I tried
with different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The current
release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes and
fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-06 09:14:12 UTC
Permalink
I tried with python 3.7. Now the error is
pymongo.errors.OperationFailure:SSPI: InitializeSecurityContext: The logon
attempt failed. I think that this is related to kerberos. Please help me to
authenticate using winkerberos and solve this issue.

On Tue 4 Sep, 2018, 10:22 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
PyMongo uses Python's ssl module, not pyopenssl, so installing pyopenssl
won't help. This error is SSL specific so pykerberos and winkerberos have
nothing to do with it. Can you try with Python 3.7 and report back? If you
still get a traceback can you post the entire traceback here (not just the
error message)?
Post by tanay patil
Can anyone please suggest a solution for this problem?
Post by tanay patil
I tried on python 3.6.3 and the error remains the same. Also, I tried
with different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The current
release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes and
fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgrdtq9_Oo7vNQR%3D6dSxh-Nhi%3DoVYwgA6UkXC0Nd9%2BRv1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-06 09:52:24 UTC
Permalink
The error is also this - line 393 in _authenticate_gssapi
If kerberos.authGSSClientStep(ctx, vv)! =0:
winkerberos. GSSError:SSPI: InitializeSecurityContext :The logon attempt
failed
Post by tanay patil
I tried with python 3.7. Now the error is
pymongo.errors.OperationFailure:SSPI: InitializeSecurityContext: The logon
attempt failed. I think that this is related to kerberos. Please help me to
authenticate using winkerberos and solve this issue.
On Tue 4 Sep, 2018, 10:22 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
PyMongo uses Python's ssl module, not pyopenssl, so installing pyopenssl
won't help. This error is SSL specific so pykerberos and winkerberos have
nothing to do with it. Can you try with Python 3.7 and report back? If you
still get a traceback can you post the entire traceback here (not just the
error message)?
Post by tanay patil
Can anyone please suggest a solution for this problem?
Post by tanay patil
I tried on python 3.6.3 and the error remains the same. Also, I tried
with different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The
current release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes
and fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and use
GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgquRQ5mQd6w80uHstqgxmB7-o7ksDRQXNoP%2B_5Dd0bigA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-06 09:53:22 UTC
Permalink
Line 393 is in site-packages/pymongo /auth.py
Post by tanay patil
The error is also this - line 393 in _authenticate_gssapi
winkerberos. GSSError:SSPI: InitializeSecurityContext :The logon attempt
failed
Post by tanay patil
I tried with python 3.7. Now the error is
pymongo.errors.OperationFailure:SSPI: InitializeSecurityContext: The
logon attempt failed. I think that this is related to kerberos. Please help
me to authenticate using winkerberos and solve this issue.
On Tue 4 Sep, 2018, 10:22 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
PyMongo uses Python's ssl module, not pyopenssl, so installing pyopenssl
won't help. This error is SSL specific so pykerberos and winkerberos have
nothing to do with it. Can you try with Python 3.7 and report back? If you
still get a traceback can you post the entire traceback here (not just the
error message)?
Post by tanay patil
Can anyone please suggest a solution for this problem?
Post by tanay patil
I tried on python 3.6.3 and the error remains the same. Also, I tried
with different versions of pymongo, installed pyopenssl, pykerberos and
winkerberos but the error still exists. The code works fine on Unix. The
error comes in windows.
Post by 'Bernie Hackett' via mongodb-user
Please upgrade to a much newer patch release of Python 2.7. The
current release is Python 2.7.15.
https://www.python.org/downloads/release/python-2715/ Many changes
and fixes have been made in Python's SSL support since 2.7.3.
Post by tanay patil
I'm using python 2.7.3
That error message is from Python's SSL module. It's unrelated to
Post by 'Bernie Hackett' via mongodb-user
Kerberos. What version of Python are you using? Please post the output from
python -c "import sys; print(sys.version)"
Post by tanay patil
I am trying to connect to a remote mongo db through pymongo and
use GSSAPI(Kerberos) ans ssl authentication methods. The code works on unix
systems but gives an error on windows systems. The error is Pymongo Server
Selection Timeout Error: SSL handshake failed: _ssl:504 EOF while violation
of protocol. I have installed winkerberos package but it is of no use.
Please help me with this issue.
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/19c28a2d-646e-469e-ae43-a424398f1025%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgrU2w7wTCgRdch8se9fHyU6DjJZqX6AmrtmQ5SsiATFXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Bernie Hackett' via mongodb-user
2018-09-06 15:08:23 UTC
Permalink
The new error is definitely Kerberos authentication failing. If the user
you are trying to authenticate is the Windows logon user authentication
should work without a password. If the user is different from the logon
user you have to use a password to authenticate. I realize this seems
counter intuitive for Kerberos, but SSPI is not MIT kerberos. Instead of
calling kinit with the user principal and password, you pass the user
principal and password as part of the MongoDB URI.

https://api.mongodb.com/python/current/examples/authentication.html#windows-sspi
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c2ac390a-bb69-45dd-b69d-3b1901ea85a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-06 15:14:50 UTC
Permalink
I am passing the principal and password in the url. Still the error comes.

On Thu 6 Sep, 2018, 8:38 PM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
The new error is definitely Kerberos authentication failing. If the user
you are trying to authenticate is the Windows logon user authentication
should work without a password. If the user is different from the logon
user you have to use a password to authenticate. I realize this seems
counter intuitive for Kerberos, but SSPI is not MIT kerberos. Instead of
calling kinit with the user principal and password, you pass the user
principal and password as part of the MongoDB URI.
https://api.mongodb.com/python/current/examples/authentication.html#windows-sspi
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/c2ac390a-bb69-45dd-b69d-3b1901ea85a1%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/c2ac390a-bb69-45dd-b69d-3b1901ea85a1%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgoKQBpCz%3D%2BzmPL5fh9hpg9QZBDxfqn7h-kWW8FE4Lsf7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Bernie Hackett' via mongodb-user
2018-09-07 00:12:37 UTC
Permalink
Make sure you are percent encoding the user principal and password. For
example:

from urllib import quote_plus
uri = "mongodb://%s:%***@localhost:27017/?authMechanism=GSSAPI&ssl=true" %
(quote_plus(principal), quote_plus(password))

Replace localhost with your hostname and 27017 with your port number.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/41613865-371c-4d2e-a4f1-3a913cd225f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
tanay patil
2018-09-07 04:17:48 UTC
Permalink
Hey, it worked. Thank you so much for the help.

On Fri 7 Sep, 2018, 5:42 AM 'Bernie Hackett' via mongodb-user, <
Post by 'Bernie Hackett' via mongodb-user
Make sure you are percent encoding the user principal and password. For
from urllib import quote_plus
(quote_plus(principal), quote_plus(password))
Replace localhost with your hostname and 27017 with your port number.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/41613865-371c-4d2e-a4f1-3a913cd225f9%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/41613865-371c-4d2e-a4f1-3a913cd225f9%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAHPZLgrb2J3h0KprEbktrsjUhWpTN0jkzO2wt7pD_-dXP5FpAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...