Issue with accessing Remote MONGODB Collection

Hi All

We installed MONGODB in EC2 and able to connect via shell.
Now when I tried to access it from meteor it says “Profile is not defined”. Profile is one of the collections from my MONGODB which is installed in EC2.

Steps that I did to connect to remote MONGODB are

  1. export MONGO_URL=“mongodb://username:password@mongodb-mongodbdns.com:27000/testDB”
  2. Added startup.js in the Server folder and added the fallowing lin e
    if (Profile.find().count() > 0) {
    }
  3. Ran meteor command and got the below error

Result:
ReferenceError: Profile is not defined

Please let me know how to fix this.

Thanks
Leela

Have you defined mongodb to run at 27000? By default it uses 27017 as far as I know…

Pretty sure this is nothing to do with Mongo not being available. This error is saying the Profile collection object is not found in your server code - is it being imported correctly / available to the server?

I figured the root cause of the issue, it is because of special characters in the Password. But even after my escaping of the password it failed to authenticate.
Any idea how to fix passwords with special characters in MONGO_Url

1 Like

Changed password from special characters to normal characters and all is good now.

1 Like