Skip to content

Mongo timed out error in connection.js:154:20 #1467

Closed
@PunkStarStudios

Description

@PunkStarStudios

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Ubuntu 14.04LTS
Mongo 3.0
Some key setup steps included...
apt-get install build-essential libkrb5-dev git bc node nodejs npm mongodb-org
git clone https://github.com/ParsePlatform/parse-server-example.git parse
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
nvm install 4.3
nvm user 4.3
npm install express
npm install parse-server
creating a node.js file with these key fields (in addition to the right keys):

  • databaseURI: 'mongodb://user:pass@mynewdomain.com:27017/dbname?ssl=true',
  • serverURL: 'http://localhost:1337/dbname'
    SSL is installed correctly and operating
    I can connect to MONGO remotely just fine using the same parameters in the database URI (I used 3dMongoChef to test).

I should note that I had this all working find on a digital ocean droplet server using identical setup instructions over a month ago but when I revisted it to install on a fresh ubuntu server it wouldn't work (granted parse-server and express was updated in-between those two installations)
I tried matching the droplet versions with npm install express@4.2.0 and npm install parse-server@2.1.4 but with no luck.

Steps to reproduce

curl -X GET
-H "X-Parse-Application-Id: MyAppID"
-H "X-Parse-REST-API-Key: MyRestAPI"
-H "X-Parse-Master-Key: MyMasterKey"
http://mynewdomain.com:1337/parse/classes/Clients

*mynewdomain.com is obviously not the actual setting.. nor the "My..." stuff.
After about a minute I get a timeout...

Logs/Trace

error: Uncaught internal server error. { [MongoError: connection 1 to mynewdomain.com:27017 timed out]
name: 'MongoError',
message: 'connection 1 to mynewdomain.com:27017 timed out' } MongoError: connection 1 to mynewdomain.com:27017 timed out
at Function.MongoError.create (/var/www/parse/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:29:11)
at TLSSocket. (/var/www/parse/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:154:20)
at TLSSocket.g (events.js:260:16)
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSSocket.Socket._onTimeout (net.js:318:8)
at _runOnTimeout (timers.js:524:11)
at _makeTimerTimeout (timers.js:515:3)
at Timer.unrefTimeout (timers.js:584:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions