directus / directus

The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
https://directus.io
Other
26.71k stars 3.71k forks source link

Installation with Oracle DB Error #3266

Closed yapnel closed 3 years ago

yapnel commented 3 years ago

Nodejs version of Directus i'm installing.

When setting up the connection to the Oracle database during the installation process, it is throwing the error below even though i have supplied the correct database configurations (tested on sqldeveloper).

Something went wrong while seeding the database: undefined ORA-12170: TNS:Connect timeout occurred

1) How do i go about troubleshooting this issue please? 2) I notice in the questions, nothing is asked about the service name or SID

Thanks

rijkvanzanten commented 3 years ago

We're still actively working on wrapping up support for MS SQL and Oracle, so it could be that we missed something here 🙂

yapnel commented 3 years ago

Digging into knex to understand how connection is established for oracle, it is using the below string

client.connectionSettings.host + '/' + client.connectionSettings.database

So, if you have non default port, it has to be specified as part of the host variable as hostname:port

The database value is the service name of the oracle database. Suggest add this do the directus documentation

rijkvanzanten commented 3 years ago

This is happening in Knex itself you said?

yapnel commented 3 years ago

This is happening in Knex itself you said?

Yes.

https://www.github.com/knex/knex/tree/master/lib%2Fdialects%2Foracledb%2Findex.js

Line 101.

rijkvanzanten commented 3 years ago

I'd recommend using DB_CONNECTION_STRING in your .env instead of the individual for the time being :)

rijkvanzanten commented 3 years ago

Fixed in https://github.com/knex/knex/pull/4147

kibertoad commented 3 years ago

Released in knex 0.21.13