when using this protocol:
mongodb+srv://
I get an error if I include a port:
MongoDB: error parsing uri: URI with srv must not include a port number
is there a reason for this (why a port is not acceptable)?
when using this protocol:
mongodb+srv://
I get an error if I include a port:
MongoDB: error parsing uri: URI with srv must not include a port number
is there a reason for this (why a port is not acceptable)?
If you use the SRV URI connection format, you can specify only one host and no port. Otherwise, the driver or mongosh raises a parse error and does not perform DNS resolution.
Read from documentation : https://www.mongodb.com/docs/manual/reference/connection-string/#srv-connection-format