Error trying to connect to mongolab from cdm: Error: 18 authentication fail - mongodb

I'm getting this error when I try to connect to my mongolab DB.
I saw some different topics talking about this issue, but solutions they gave was:
-Add mongoDB exception in my firewall. I done it without result
-Check if I was using the mongolab.com user and password instead of the user database. That's not the problem, even I created new users.
-Check if my version of mongoDB was older than the version used by mongolab (3.x). I also specified the auth system in the command to be sure.
I tried all those answers without success. I also checked the connection with the server, and it neither was the problem. I'm going crazy.
What could be the issue?
Thanks for your attention!

It was finally a network problem. I was lucky to discover it, cause I lost many hours.

Related

PG::connectionBad error in logs for Rails 5 heroku app, is mismatched IPs the reason?

Heroku deleted my rails 5 app's database. I created a new DB, they recovered the old one and copied it to the new one, then attached it. But my site won't load. Heroku support hasn't tried to help beyond giving links to troubleshooting I've done many times. I've been trying every possible fix I can find for a week.
In the error message, I noticed the host that is listed for my database in the settings does not match the host in the timeout error.
MY HOST (per heroku settings): ec2-18-2XX-36-213.compute-1.amazonaws.com
The host in the logs: ec2-5X-83-25-2X7.compute-1.amazonaws.com
(I replaced a couple numbers with X b/c Idk if that's sensitive information)
Is that why the connection won't work? If so, how do I fix it?
FATAL -- : [465fe0b0-f387-4b4a-b215-779dbb8dbf7e] PG::ConnectionBad (connection to server at "ec2-5X-83-25-2X7.compute-1.amazonaws.com" (5X.83.25.2X7), port 5432 failed: Connection timed out
Turns out, all I needed to do was go into my new database's settings, copy the DATABASE_URL, go into the config vars of my app, and paste over the old DATABASE_URL.
So many wasted hours because heroku tech support couldn't articulate that. Took 5 seconds, then site loaded immediately. Didn't need to push anything, commit anything, change any code, etc

Strapi instalation has error: connect ECONNREFUSED 127.0.0.1:5432

I just install Strapi but with PostgreQL DB (not using -- quickstart which means SQLite)
1. yarn create strap'-app name-of-my-project,
2. submit all QA=default step-by-step (database=strapi, port=default, login/password nothing fancy, and last without SSL connection)
And the finall result is not so descriptive. Only server error with connecting, which I don't know
Connection test failed: connect ECONNREFUSED 127.0.0.1:5433
Problem solved! (after 2 hours of trying instalation)
The answer is => You have to install PostgreSQL DB too on your computer
Once its done, next, you can run Strapi by yarn develop
So the problem is solved. Other problem in meantime solved
`Server wasn't able to start properly. Error: The server does not support SSL connections. Try to install without SSL connection (last question in Strapi install process)
I know you resolved the issue but just posting this in case anybody needs specific instructions.
I followed this tutorial and it's working for me now.
Sidenote: Once I installed Postgres and ran the command psql postgres it prompted me to enter my password. Despite putting in the correct password it still gave me an error that it is the wrong password, so I ran psql postgres postgres and then entering my password resolved the issue for me.
Instead of downloading postgres you can apply docker and it works the same
Link: https://blog.dehlin.dev/docker-with-strapi-v4
I had the same problem and as Kris says above, you need to install postgresql, pgAdmin and create the database first to then can create your Strapi project linked to you database.
I followed this youtube tutorial (in spanish) to solve it very easy.
Also need to avoid enable SSL for your local project. If you need to change this option in the future you can make it in the strapi config/database.js file.
Good luck!

Heroku wrong credentials for postgresql database

i’m using heroku for deploy a database (postgres) and connect to it.
I used it for 2 weeks but today it start rejecting my credential and i couldn’t login anymore, i checked if the credential are changed but nothing?
Can anyone help me? thanks a lot!
I had this issue, if you look in the Settings -> Config Vars you will see that the DATABASE_URL has changed. So you need to use the new value in Datagrip and things will work again.
They change the details periodically but it doesn't seem to update in the database settings page which is very annoying although it only happens on the free tier.

my postgres is unable to connect ever since heroku did a maintenance update 12 hours ago

anyone facing something similar? sadly I'm on a free plan so I can't open a ticket... does anyone know of a way to restart the service/machine of the DB? maybe that would just solve it...
ok so the issue in my case is that indeed heroku performed some sort of maintenance on the DB, and apparently it's connection params (host/url/user/password) had changed... and since it was embedded throughout all my interfaces (the app, my db tools, admin app I also have) - none were able to connect (they'd timeout).
while trying to figure out, I used the wonderful CLI tools of heroku pg:info and heroku pg:diagnose and even heroku pg:psql and tested to see that my data is still there... eventually I went to the online admin and that's where I saw the connections params had changed. BTW - I have this project for 2 years and this is the first time this had happened...
I was in the same situation. Heroku will email you that your database is scheduled for maintenance. After it's complete, connecting to the database fails because of this error:
error: no pg_hba.conf entry for host "IP_ADDRESS", user "DB_USER", database "DB_NAME", no encryption
This is telling us that incorrect credentials were given, meaning the database connection string has changed. I first checked the credentials on the website for the Heroku Postgres Add-on (data.heroku.com), but the connection string was still the same as before; it has not updated or changed at all, therefore this was misleading. Instead, the updated connection string is found inside of the DATABASE_URL config variable, located in the Settings tab of your app on the Heroku dashboard (dashboard.heroku.com), under Config Vars. To avoid manually correcting this problem again, get the connection string from the DATABASE_URL config variable directly, as opposed to hard coding it in your app.
Yes, Im in the same situation. Heroku are a bunch of amateurs. They did some maintenance on the DB, and after it was done, credentials don't work, even those listed in admin/dashboard section of web. Bunch of loosers... #heroku

'No reachable servers' error when beginning parse migration with MongoDB

I am in the process of migrating my app from Parse to MongoDB and IBM Bluemix, however I can't seem to reach the server when attempting the migration of data from Parse.
I've been following this tutorial tutorial, and I am currently on the step: Migrating data from Parse.com to your MongoDB instance
I am currently getting this error: No reachable servers when clicking 'Begin the migration'.
These are the connection strings in compose:
And I have tried entering various strings. I assumed this would work:
mongodb://username:password#aws-us-east-1-portal.7.dblayer.com:10803/mtcdatabase
But I get the same error. Obviously I'm changing username and password to my own credentials.
Anyone have any suggestions?
The issue ended up being that I was using the latest version of MongoDB, however Parse doesn't seem to support it. Therefore, I had to use MongoDB Classic version 3.0. Everything works great now.