[SOLVED] Direcct Access Troubleshooting

Hey Guys im trying to go over the direct access from your moralis documentation but when i run the file i get.

Exception has occurred: ServerSelectionTimeoutError
<ip_config>:<mongo_port>: connection closed, Timeout: 30s, Topology Description: <TopologyDescription id: 626ac52cbe0360ed560b8380, topology_type: Unknown, servers: [<ServerDescription (’<ip_address>’, <mongo_port>) server_type: Unknown, rtt: None, error=AutoReconnect(’<ip_address>: connection closed’)>]>
File “/home/wizardofoz/mongodb_python/main.py”, line 24, in
pprint.pprint(user_table.find_one())

i installed pymongo, im on Linux Ubuntu 20.04.4 LTS
and my python version is python3 3.8.10

try to add your IP to the list of whitelisted IPs, try again if you did that once

done it 2 times actually but il try again.

Same errors and verified table names on my end.

how did you check/get your public IP?

that script from documentation should work only by modifying the IP and port

ip address show - linux

I usually search on google to find out what is my public IP address

1 Like

I Googled my ip address and gave me a diff value from the one using the ip address command

This solved the issue

1 Like