[CDRIVER-543] differentiate between network error and authentication error Created: 25/Feb/15  Updated: 19/Oct/16  Resolved: 23/Sep/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.1.0
Fix Version/s: 1.2-rc0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-821 Connections failing when active in pr... Closed
related to CDRIVER-841 Improve SSL connection error messages Closed
is related to CDRIVER-519 Failed to read 4 bytes from socket Closed
is related to PHPC-251 Authentication error result in weird ... Closed
is related to CDRIVER-696 Useful errors from server selection Closed

 Description   

X509 authentication failure results on the generic "Failed to read 4 bytes from socket".
It makes it confusing when debugging why a connection fails, with no clear starting point.



 Comments   
Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error message to make sense for drivers wrapping mongoc
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/375562667b081f74055c7b6e191b5668ee4323c9

Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error messages
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/74aefa0a6fd5dd7ae5b633928928e098e81079a7

Comment by Githook User [ 26/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error message to make sense for drivers wrapping mongoc
Branch: debian
https://github.com/mongodb/mongo-c-driver/commit/375562667b081f74055c7b6e191b5668ee4323c9

Comment by Githook User [ 26/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error messages
Branch: debian
https://github.com/mongodb/mongo-c-driver/commit/74aefa0a6fd5dd7ae5b633928928e098e81079a7

Comment by Hannes Magnusson [ 23/Sep/15 ]

I think the latest round of error messaging improvements covers this in sufficient detail.
If not, we should raise more tickets with more detailed scenarios

Comment by Githook User [ 16/Sep/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error message to make sense for drivers wrapping mongoc
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/375562667b081f74055c7b6e191b5668ee4323c9

Comment by Githook User [ 16/Sep/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-543: Improve error messages
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/74aefa0a6fd5dd7ae5b633928928e098e81079a7

Comment by A. Jesse Jiryu Davis [ 20/Apr/15 ]

There's code that tries to give a good error, I wonder why it isn't working for you:

https://github.com/ajdavis/mongo-c-driver/blob/1926413b45390887431bbfb0380631153c886b74/src/mongoc/mongoc-client.c#L344

Bug might be here:

https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-cluster.c#L1698

Generated at Wed Feb 07 21:09:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.