After Deploying via MeteorUp, App doesn't let login; Login forbidden

Hi.

I have an app running fine on my localhost server. I deployed the app using MeteorUp on an ubuntu server. The app is loading login page but not letting user login. I’ve used “useraccounts:bootstrap” package. Login attempt throws error: Login forbidden.

Please suggest what could be wrong there?

Have you copied the user data from your development database to your new production database?

Hi, @robfallows.

Thanks for your response. I didn’t do that. I expected MeteorUp to make a replica of local DB on server.

How can I do that?

Assuming you don’t want all your users to re-register, you can use the mongodump utility on your localhost to get a file, which you can then use mongorestore on your production database. Check the mongodb docs for more detail.

Not that in order to use mongodump on your localhost, you will first need to install mongo - the Meteor dev bundle doesn’t include the utilities. Then you will need to start your app on localhost, to get a running mongod. Assuming you use OSX/Linux and a running on port 3000:

meteor run &
# wait until running, then:
mongodump --host localhost --port 3001 --db meteor --out /path/to/backup/file

The mongod port is alway 1 higher than the port you run the dev app on. Once you have the file, you can restore it to your new production database - that process follows the docs.

1 Like

Thanks, Rob.

I will follow your instructions. I will update you on the outcome.

1 Like