[GODRIVER-1458] Connection to Mongo Cloud without +srv Created: 08/Jan/20 Updated: 22/Jan/20 Resolved: 22/Jan/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | safwan olaimat | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
i am trying to connect to mongodb cloud without +srv , { Addr: ....:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : connection(.....:27017[-180]) incomplete read of message header: EOF }, { Addr: .....:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection() : connection(.......:27017[-181]) incomplete read of message header: EOF }, ] } |
| Comments |
| Comment by Divjot Arora (Inactive) [ 22/Jan/20 ] |
|
Without any extra information or server logs, it's not possible for us to diagnose the issue. You mentioned that you were able to resolve the DNS issue and the SRV connection string should now work. We recommend using the SRV connection string anyway, as that's the most robust approach, so I'm going to close this ticket. Feel free to leave another comment if you still have issues. |
| Comment by safwan olaimat [ 21/Jan/20 ] |
|
Hello @divjot Arora |
| Comment by Divjot Arora (Inactive) [ 13/Jan/20 ] |
|
I believe the issue is that the driver implicitly enables SSL for an SRV connection string, and Atlas servers are configured to only allow incoming connections over SSL. The smallest possible change would be to use a connection string like mongodb://username:password@seed1,seed2,seed3/?ssl=true. This would explicitly enable SSL in the driver. Note that even though this may work, we still recommend using a connection string obtained directly from Atlas, as they may set extra parameters. As an example, I see that Atlas sets w=majority to enable write concern majority. |
| Comment by Divjot Arora (Inactive) [ 10/Jan/20 ] |
|
safwan.olaimat@gmail.com If Atlas gives you a connection string with +srv, it is not valid to remove the +srv suffix. An SRV record is different from a hostname, as it can actually resolve to a list of hosts and the DNS server can also send back TXT records, which act as additional connection string parameters. In the list of drivers on the Atlas UI, if you click on "Python" and select "3.4 or later" for the version, Atlas should give you a URI that does not have +srv. Can you try this and see if it works for you? |
| Comment by safwan olaimat [ 09/Jan/20 ] |
|
Hi @Divjot yes the connection string from atlas |
| Comment by Divjot Arora (Inactive) [ 08/Jan/20 ] |
|
Is this a connection string provided by MongoDB Atlas? Was it originally an SRV connection string? The "incomplete read of message header: EOF" message indicates that the server is likely not accepting connections from the driver and this manifests as a network error on the driver side. If you have access to the server logs, there may be information there about why the server is not accepting these connections. |