Jump to content

rarahim

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Interests
    Computing

Recent Profile Visitors

380 profile views

rarahim's Achievements

Apprentice

Apprentice (3/14)

  • Dedicated Rare
  • Reacting Well Rare
  • Collaborator Rare
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi, I had a problem renewing my account. The process did not complete. Please help me to renew my account. Username: rarahim Thanks.
  2. I managed to gather some feedbacks from MongoDB forum.. and this is what they say: And regarding the last comment on using dnschecker.org to check A records of the host, this is their feedback:
  3. I wanted to say that this might be the case but then how can we explain the fact that it used to be working fine before? I just saw that the original script file on Tommy was last uploaded on Feb 8, 2022..
  4. Just to further add to the mystery.. I tested running the same script on yet another machine on a different network and it also worked.. Both machines have the same following configuration: VERSION="20.04.3 LTS (Focal Fossa) Python 3.8.10 dnspython==2.2.1 pymongo==4.3.2 first machine IP: 115.164.89.99 second machine IP: 210.24.102.234
  5. No.. And I haven't defined any specific IP whitelist... all IPs are allowed: I can try to whitelist tommy server IP and see if it makes any different, which IP should I add ?
  6. Today I tested the same script on a totally different machine running python 3.8.10, dnspython 2.2.1 and pymongo 4.3.2 on an entirely different network.. and it still worked.. Script used: #!/usr/bin/python3 import pymongo DB_URI = "mongodb+srv://testuser:Mongopass123@radtech.p4cyn.mongodb.net/?retryWrites=true&w=majority" def create_connection(db_file): conn = None try: conn = pymongo.MongoClient(db_file) conn = conn["testDB"] print("Success!") except Exception as ex: print("Error connecting to database.", ex) return conn conn = create_connection(DB_URI) alertsCol = conn["names"] docs = alertsCol.find() print("Name = " + docs[0]["name"]) print("Done.") As you can see, I'm connecting using that same host without DNS A record without issue.. and as stated this same script used to run fine before the whole server migration.. this is so puzzling.. I don't want to switch to MySQL if I don't have to.. Btw, using that host is the right way we are supposed to connect to the mongo db on cloud.mongodb.com, there is no direct connection to an IP.. or at least we are not allowed to.
  7. This issue is still unresolved.. I'm still suspecting that the problem is with the port 27017 on Tommy. (Btw, tommy2 is the same as tommy, right? I just noticed that my plesk dashboard host is tommy2.heliohost.org.) I have created two scripts to test ports 3306 and 27017. The results are also shown here.. => Test port 3306 => Test port 27017 The script content: When carried out on my local machine, both port tests passed: To me, it does seem like port 27017 is somehow not accessible from Heliohost server despite being reassured that it has been opened.. Puzzled.
  8. This is strange. You are right, the host might not have DNS entry but I can somehow connect to it from my local machine (which I cant explain why). Also, let me reiterate that I've had similar script on Tommy connecting to the same mongodb database before and it was working fine. Initially it didn't work but after I requested for port 27017 to be opened, it started working. I tried to test whether port 27017 is open on Tommy using the script here (source attached), it doesn't seem like the port is open though. When I tried with port 80, 443 and 3306, it did respond saying the ports were open.. would appreciate if you could verify that port 27017 is indeed open for the three IPs requested above? This is the expected response when the test-port script was run on my machine.. Thanks in advance. test-port.py
  9. Hi, I'm afraid it's still not working. The python script can be accessed at https://rarahim.heliohost.us/scripts/search_alert/test-mongo.py . The source file is attached (no worries, only a test account with read-only access to a test database). The file permission is 755. The exact same script when run locally on my machine works as expected. See the attached screenshot of the output. My local machine is running Python 3.10. The requirements.txt file is also attached. The same script used to work fine before prior to system migration. Thanks in advance. test-mongo.py requirements.txt
  10. Hi, I made this same request before (https://www.helionet.org/index/topic/43467-solved-port-27017-for-mongodb-atlas/#comment-186601) but it looks like post system migration the port is again closed. So could you please open port 27017 for these IPs: radtech-shard-00-01.p4cyn.mongodb.net ( 18.138.205.196 ), radtech-shard-00-00.p4cyn.mongodb.net ( 54.255.46.254 ), radtech-shard-00-02.p4cyn.mongodb.net ( 52.74.75.34 ) Many thanks.
  11. Hi.. All looks good except for pymongo which seems to require an extra option: Error connecting to database. The "dnspython" module must be installed to use mongodb+srv:// URIs. To fix this error install pymongo with the srv extra: /usr/bin/python3.10 -m pip install "pymongo[srv]" Sorry for not being more precise earlier... thanks.
  12. Hi, Please install these modules for Python 3.10. requests bson pymongo bs4 (BeautifulSoup) Many thanks..!
×
×
  • Create New...