Jump to content

[Solved] pymongo connect error


nicovale

Recommended Posts

Hi all, when I try to run a flask app on the tommy server, pymongo gives me this error, how can I fix it?
 
"cluster0-shard-00-01.fhsrc.mongodb.net:27017: [Errno 111] Connection refused,cluster0-shard-00-02.fhsrc.mongodb.net:27017: [Errno 111]
 Connection refused,cluster0-shard-00-00.fhsrc.mongodb.net:27017: [Errno 111] Connection refused,
 Timeout: 30s, Topology Description: <TopologyDescription id: ugkctamdzd6nvshm69miov4r topology_type: ReplicaSetNoPrimary, servers:
 [<ServerDescription ('cluster0-shard-00-00.fhsrc.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-00.fhsrc.mongodb.net:27017:
 [Errno 111] Connection refused')>, <ServerDescription ('cluster0-shard-00-01.fhsrc.mongodb.net', 27017)
server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-01.fhsrc.mongodb.net:27017: [Errno 111] Connection refused')>,
 <ServerDescription ('cluster0-shard-00-02.fhsrc.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('cluster0-shard-00-02.fhsrc.mongodb.net:27017:
 [Errno 111] Connection refused')>]>"

Instead if i run the app with my pc on the localhost i don't get any error.

 

Link to comment
Share on other sites

Outbound connections on uncommon ports like 27017 (yes, I know 27017 is Mongo's normal port, but we don't get many requests for Mongo) are intentionally blocked by our firewall.

 

Krydos would need to specifically allow this for you.

Link to comment
Share on other sites

Outgoing tcp port 27017 to ip 18.192.74.47 has been opened in Tommy's firewall.

 

we don't get many requests for Mongo

This is the second request for mongodb port that I've seen in the last 11 years that I've been an admin at HelioHost.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...