You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to use the connectionString param, It does not extract the "host" property and it does not connect to the DB. When I provide "host" as an additional param it works.
my connectioString is like this:
postgres://postgres:xxxxxxx@192.168.1.23:5432/zingo
I get the error
[Nest] 32864 - 02/05/2024, 5:03:26 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
AggregateError:
at internalConnectMultiple (node:net:1116:18)
at afterConnectMultiple (node:net:1680:7)
When I use it like this by specifying the "host", it connects to the DB, however instead of connecting to the DB "zingo" from the connection string, it tries to connect to the computer name
[Nest] 33017 - 02/05/2024, 5:05:21 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)...
error: database "ahmettok" does not exist
host should be extracted from the connectionstring parameter and should not require to be additionally provided. Also database name should be correctly extracted from the connection string
Package version
10.0.0
NestJS version
10.2.7
Node.js version
21.6.1
In which operating systems have you tested?
macOS
Windows
Linux
Other
No response
The text was updated successfully, but these errors were encountered:
arrrrny
changed the title
When connectionstring param used, Hostname is not loaded from the connection string
When connectionstring param used, Hostname and database name are not correctly extracted
Feb 5, 2024
@micalevisk Thanks for the heads up. Issue was strangely because of the "cody" AI code completion tool and it automatically populated the field "connectionString" rather than the correct field "url" Since additional fields were allowed on that config, typescript did not give an error either. It works fine as
Is there an existing issue for this?
Current behavior
When I try to use the connectionString param, It does not extract the "host" property and it does not connect to the DB. When I provide "host" as an additional param it works.
my connectioString is like this:
postgres://postgres:xxxxxxx@192.168.1.23:5432/zingo
I get the error
[Nest] 32864 - 02/05/2024, 5:03:26 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
AggregateError:
at internalConnectMultiple (node:net:1116:18)
at afterConnectMultiple (node:net:1680:7)
When I use it like this by specifying the "host", it connects to the DB, however instead of connecting to the DB "zingo" from the connection string, it tries to connect to the computer name
[Nest] 33017 - 02/05/2024, 5:05:21 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)...
error: database "ahmettok" does not exist
When I have like below, it works fine.
Minimum reproduction code
https://github.com/do_i_really_need_this
Steps to reproduce
No response
Expected behavior
host should be extracted from the connectionstring parameter and should not require to be additionally provided. Also database name should be correctly extracted from the connection string
Package version
10.0.0
NestJS version
10.2.7
Node.js version
21.6.1
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: