Database connection could not be reached
Saverio-Angelicola opened this issue · comments
[Details]
hello, I have a bug when I want to connect with postgresql because after following the doc and putting my database information I receive as an error:
[ERROR | 04/20/2021, 2:39:13 PM] [6320] [PostgresConnector.class] Database connection could not be reached.
However, the information in my database is correct.
[Scenario]
Steps to reproduce the behavior:
-
I created the mandarin.json file and insert the path to my properties.json file.
-
I then used the command: mandarine run --allow-all --watch
[Expected behavior]
Normally I should be able to connect to the DB and be able to use MandarineTS ORM with my DB..
[OS]
Windows 10 Pro 64 bits
[Environment]
- Mandarine version: [2.3.2]
- Deno version [1.9]
This is a tricky one since we are not showing an stacktrace of the error, when we should. I would suspect your postgres has a different authentication method than the ones supported..
@Saverio-Angelicola I will create a branch for this bug with a debug logger for the DB connection, and you could use that branch instead of deno.land/x
just to get more information in the meantime. Would that work for you?
Yes, it's good.
@Saverio-Angelicola This is the branch github-283
, this is the mod.ts: https://raw.githubusercontent.com/mandarineorg/mandarinets/github-283/mod.ts
any other file you need from the repo, please use it from there.
In order to enable debug logs, please use DEBUG
environment variable.
Ex.
DEBUG=true deno run myscript.ts
Here is the error I have now after using the mod.ts: https://raw.githubusercontent.com/mandarineorg/mandarinets/github-283/mod.ts.
Try again, remember to use the flag --reload
so Deno fetches the module again @Saverio-Angelicola
Please try again, sorry for the inconvenience. There was a merge conflict. @Saverio-Angelicola . Remember using --reload
@Saverio-Angelicola Are you still getting the one with this[msgType] is not a function
, or that one went away?
Ok that's perfect.
cc @Soremwar . @Saverio-Angelicola is getting an unknown auth message code *10. Would you know what this is about? Thanks.
This is postgres version 0.5.0.
@Saverio-Angelicola Further discussion with @Soremwar , seems like authentication method number 10 is not supported but it is in latest versions, I will be submitting a patch version throughout the day and that should solve the issue.
OK thank you for your answer.
@Saverio-Angelicola After further investigation, The latest version of Postgres used by Mandarine is only compatible with Deno 1.9.0, deno 1.9.0 breaks many of our tests (already solved in master branch) but will not be able to create a release since it will be unstable. Best is to way for Mandarine v3.0.0. We apologize for this inconvenience, Mandarine v3.0.0 will be available soon.