Mongorestore seems not to work on sites deployed to, fails with "auth failed", code: 18

I’m fairly familiar with the process of dumping a Mongo database from one site on, and then using mongorestore to upload it onto another site for testing. But today, it’s not working and I don’t know why. I believe I’m doing exactly what normally works, I’ve tried it about 10 times and on several different sites. I tried this morning, and again this afternoon.

Here’s what I’m doing.

  1. My site is deployed at a URL that is like
  2. In the command line, I navigate to the project folder.
  3. I run this command to get the mongodb URL:

meteor mongo --url

  1. After a few seconds, I see a URL like this in the command line:


I quickly copy the username, password, host and port into my mongorestore command to create something like this:

mongorestore -u client-e18f807a -h -d mytest_meteor_com -p ‘354afb62-4015-5cc1-7dff-1af49a879db1’ meteor/dump

I have copied and pasted the elements carefully, and made sure to run it in less than a minute, because the credentials expire after a minute. But every time, I see an error:

connected to:
assertion: 18 { ok: 0.0, errmsg: "auth failed", code: 18 }

The host used to be something like, and port was previously 27107 but I don’t know that this should make any difference to the process? I’m being careful to copy the host and port from the URL as well as client and password.

Is anybody else having similar problems? Or can you see if I’m making some dumb mistake? Thanks!

1 Like

Hello Rahul, do you mean that I am following the right process but it is not working because of a temporary issue with the free sites? Just wanting to check because I can deploy fine, and the site seems to be working fine, it’s only the mongodump and mongorestore that are failing.

If I’m doing something wrong I’d like to know and fix it. If there is a temporary issue with mongodump and mongorestore then I’ll try again in a day or two and hope it works.

The free sites are a fantastic resource for testing and while I know they aren’t reliable for production sites, I really appreciate being able to test an update before making it live on a less disposable site. It’s one of the many features that makes Meteor great.

Hi Ingaborg,

Just discovering today this great ‘Meteor’ platform … but got same problem:

$ meteor mongo
MongoDB shell version: 2.6.7
connecting to:
2015-12-15T21:03:56.381+0100 Error: 18 { ok: 0.0, errmsg: “auth failed”, code: 18 } at src/mongo/shell/db.js:1210
exception: login failed

Good luck guys to fix it, seems you are working hard … Then I will prepare some demo for potential customers!
I’m really impatient to get it working.


Yes. There are sporadic problems with the free hosting at the moment. now says all sites are operational but it still fails with code 18:

connected to:
assertion: 18 { ok: 0.0, errmsg: "auth failed", code: 18 }

I’ve tried several times, and got the same error. As far as I can see from googling, error 18 may be a version mismatch.

However I can connect to a site hosted on one of the other servers (

Please, anybody got any ideas?

I’ve started a new topic for this problem, because I think this thread has got mixed up with server outages and I’m pretty sure that’s not the problem, also because I now realise the problem is with any MongoDB connection not just mongorestore. So I’ve created a topic that is (I hope) more clear as to exactly what is the problem. I hope that’s acceptable forum etiquette.

New topic

if I remember correctly mongorestore expect exact version of mongodb, if u want something more universal u need mongoexport/mongoimport.
I dont use free hosting, so cant comment on that.

As I explain in the other post, there are 2 sites on, and I can connect to one but not the other. They are on different servers but as far as I can see both use the same version of MongoDB.

We indeed have a problem right now with using meteor mongo to connect to newly deployed apps. Here’s the reason and a workaround: `meteor mongo` giving “exception: login failed” - workaround