[solved] Mongo error after updating to 1.10.1

Updated from 1.9 to 1.10.1 and am getting the following error:

/Users/Joe/.meteor/packages/meteor-tool/.1.10.1.1g3oh9r.ivug++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313
W20200406-13:01:16.483(-4)? (STDERR) 						throw(ex);
W20200406-13:01:16.483(-4)? (STDERR) 						^
W20200406-13:01:16.484(-4)? (STDERR) 
W20200406-13:01:16.484(-4)? (STDERR) MongoError: no mongos proxy available
W20200406-13:01:16.484(-4)? (STDERR)     at Timeout.<anonymous> (/Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/topologies/mongos.js:731:28)
W20200406-13:01:16.484(-4)? (STDERR)     at listOnTimeout (internal/timers.js:549:17)
W20200406-13:01:16.485(-4)? (STDERR)     at processTimers (internal/timers.js:492:7) {
W20200406-13:01:16.485(-4)? (STDERR)   name: 'MongoError',
W20200406-13:01:16.485(-4)? (STDERR)   [Symbol(mongoErrorContextSymbol)]: {}
W20200406-13:01:16.485(-4)? (STDERR) }

I’m connecting to an external database hosted by compose. As a test:

  1. If I connect to the local db it works fine
  2. Going back to 1.9.2 I’m able to launch, but it breaks at 1.9.3 or higher (1.9.3 provided a different mongo-related error. I can go back and get it if this would help troubleshooting).

Does this help in any way? I see there is a particular comment about Meteor. With the new mongo driver perhaps some versions of URI stopped working: Connecting to the new MongoDB at Compose - Compose Articles

Thanks for the suggestion. Removing one of the hosts from the export command changes the error to:

W20200406-14:33:13.856(-4)? (STDERR) /Users/Joe/.meteor/packages/meteor-tool/.1.10.1.1g3oh9r.ivug++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313
W20200406-14:33:13.875(-4)? (STDERR) 						throw(ex);
W20200406-14:33:13.875(-4)? (STDERR) 						^
W20200406-14:33:13.876(-4)? (STDERR) 
W20200406-14:33:13.876(-4)? (STDERR) MongoNetworkError: failed to connect to server [aws-us-east-1-portal.29.dblayer.com:21229] on first connect [Error: unable to verify the first certificate
W20200406-14:33:13.876(-4)? (STDERR)     at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34)
W20200406-14:33:13.876(-4)? (STDERR)     at TLSSocket.emit (events.js:311:20)
W20200406-14:33:13.876(-4)? (STDERR)     at TLSSocket._finishInit (_tls_wrap.js:916:8)
W20200406-14:33:13.877(-4)? (STDERR)     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12) {
W20200406-14:33:13.877(-4)? (STDERR)   name: 'MongoNetworkError',
W20200406-14:33:13.877(-4)? (STDERR)   [Symbol(mongoErrorContextSymbol)]: {}
W20200406-14:33:13.877(-4)? (STDERR) }]
W20200406-14:33:13.877(-4)? (STDERR)     at Pool.<anonymous> (/Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/topologies/server.js:438:11)
W20200406-14:33:13.877(-4)? (STDERR)     at Pool.emit (events.js:311:20)
W20200406-14:33:13.878(-4)? (STDERR)     at /Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/pool.js:561:14
W20200406-14:33:13.878(-4)? (STDERR)     at /Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/pool.js:994:11
W20200406-14:33:13.878(-4)? (STDERR)     at /Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/connect.js:31:7
W20200406-14:33:13.878(-4)? (STDERR)     at callback (/Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/connect.js:264:5)
W20200406-14:33:13.878(-4)? (STDERR)     at TLSSocket.<anonymous> (/Users/Joe/.meteor/packages/npm-mongo/.3.7.0.1yux8t1.vzvw++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/connect.js:294:7)
W20200406-14:33:13.878(-4)? (STDERR)     at Object.onceWrapper (events.js:418:26)
W20200406-14:33:13.879(-4)? (STDERR)     at TLSSocket.emit (events.js:311:20)
W20200406-14:33:13.879(-4)? (STDERR)     at emitErrorNT (internal/streams/destroy.js:92:8)
W20200406-14:33:13.879(-4)? (STDERR)     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
W20200406-14:33:13.879(-4)? (STDERR)     at processTicksAndRejections (internal/process/task_queues.js:84:21) {
W20200406-14:33:13.879(-4)? (STDERR)   name: 'MongoNetworkError',
W20200406-14:33:13.879(-4)? (STDERR)   [Symbol(mongoErrorContextSymbol)]: {}
W20200406-14:33:13.880(-4)? (STDERR) }
=> Exited with code: 1

This was also the error I was getting in 1.9.3, when using both hosts in the export command.

I think you will need to read down the same page in the link, it talks about the configuration of SSL.

1 Like

So after looking through compose, was reminded that they changed the host format a while back, but was still allowing access using the old version. I guess the new mongo update in 1.9.3 added some level of strictness that no longer allowed this? In any case, works fine now that I’ve updated the host strings. Thanks for your help.

1 Like

@hanley I’m having the same issue. Can you send more details on how you fix this issue?

In the Compose dashboard, go into your deployment, and in the Overview tab, take a look at the “Connection Info” section. In there you’ll see how your connection string should look when connecting to the database. If the host section of that string is different than what you’re currently using, change it, and it should work.

The Connection string in the settings is similar to Connection string details from compose. The only changes are the username, password and the database. We are still getting the error MongoNetworkError: failed to connect to server [aws-us-east-1-portal.35.dblayer.com:30339] on first connect [Error: unable to verify the first certificate. Thanks for the reply.

I’d reach out to compose. My host string used to look like yours but drastically changed, no longer having “dblayer” in it, adding my company name into it, etc.

I have seen that. The issue seems to be caused by MONGO_OPLOG_URL connection. If I remove the MONGO_OPLOG_URL connection, it works fine. Thanks for the help.

I have the same issue. I migrated my mongodb and updated it to version 4.2.5. Unfortunately I get the same error. As soon as i deactivate MONGO_OPLOG_URL it works fine.

Due to my mongodb server logs the authetification of oplogger worked fine:

2020-04-07T00:25:05.549+0200 I ACCESS [conn914] Successfully authenticated as principal oplogger on admin from client xx.xx.xx.xx:xxxxx

Maybe there is somethong wrong with my oplog configuration? Although not much I had to do:

replication:
  oplogSizeMB: 2048
  replSetName: rs0

I use Meteor 1.10.1 with the mongo package 1.9.1. Any ideas?

I solved my issue:

cfg = rs.conf()
cfg.members[0].host = "mongodb0.example.net:27017"
rs.reconfig(cfg)

https://docs.mongodb.com/manual/tutorial/change-hostnames-in-a-replica-set/

I ran into the same issue and I had to tweak the connection string a bit to get it to work.

From:

mongodb://admin:[password]@portal-ssl653-0.companyname.296747891.composedb.com:16722,portal-ssl788-1.companyname.296747891.composedb.com:16722/compose?authSource=admin&ssl=true

to

mongodb://**username**:**passwordForUserName**@portal-ssl653-0.companyname.296747891.composedb.com:16722,portal-ssl788-1.companyname.296747891.composedb.com:16722/**dbName**&ssl=true

So I adapted the string for my specific username/password and db; and also got rid of the authSource=admin part.

Hey Sacha!

I’m running into this same error.

I couldn’t figure out if you’re answer solved the issue without removing the oplog (since earlier in the thread, that was the solution that others settled on).

Were you able to use your solution and still use oplog?

Thank you so much for the clarification!

Oh sorry, yeah I don’t use the oplog.

No worries. :slight_smile: Thanks for the reply!

For anyone else who found this thread and can’t resolve by removing oplog – I downgraded Meteor to version 1.9.2 and it resolved the issue for me.

I also have to upgrade my DB, but disabling oplog is not an option. Downgrading Meteor seems to be a workaround that won’t last for long. Any updates on whether this will be resolved in Meteor, so we can get this working on 10.1?

are you including the replicaSet with your oplog thats the only thing I can’t get to configure correctly

Meteor 1.9.2 / Mongo 3.3:
MongoTimeoutError: Server selection timed out after 10000 ms

Meteor 1.10.2 / Mongo 3.7:
MongoNetworkError: failed to connect to server [##.###.##] on first connect [MongoNetworkError: connection timed out

It fully works on the new meteor with Oplog just not with a replicaSet, its the only thing I can’t resolve.