Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when there is an issue in host connection #1673

Open
danielferayte opened this issue May 22, 2024 · 5 comments
Open

Improve error message when there is an issue in host connection #1673

danielferayte opened this issue May 22, 2024 · 5 comments

Comments

@danielferayte
Copy link

danielferayte commented May 22, 2024

Hello i would like ro report an error when connecting to the database when the host is not an ip
image
i get the next message error:
image
I am not sure what is the problem, it happes whin any host
The version i am using is the oracledb 6.5 and nodejs vs20

@cjbj
Copy link
Member

cjbj commented May 22, 2024

Looks like some parsing in node-oracledb has broken and you're not seeing the real error. Node-oracledb 6.0 throws (in my environment): Error: NJS-515: error in Easy Connect connection string: could not resolve hostname: ip-10-142-132-50.aws.lnig.com

@danielferayte
Copy link
Author

I already try in my environment, with the version you mentioned and i get the same error, so that is the message i get when connecting directly from the database client, which is right because the host is in a private network and the local machine can't find it, but since i get a different error in the code i though maybe something was broken in the last version, so yeah there is a bug in the parsing that is not showing the real error. Thanks!

@sharadraju
Copy link
Member

sharadraju commented May 23, 2024

Hi @danielferayte
Is the connect string a valid connect string? I assume based on your message, that hostname is valid, but it is not accessible.

The earlier DNS look up error from node-oracledb 6.0 (NJS-515: error in Easy Connect connection string: could not resolve hostname: ip-10-142-132-50.aws.lnig.com) was removed in the later versions to improve network performance.

So this is not a bug, but an intended behavior. However, we do need to improve the error message to reflect this use case as well.

@danielferayte
Copy link
Author

danielferayte commented May 23, 2024

Hi @sharadraju , yes, the connect string is a valid string i just changed a number in the ip to make an example of the error message, without exposing the real one, but even the real one wouldn't be accesible because the private network and we would get the same error. I though because the host name is a little different it was not contemplated.

@sharadraju
Copy link
Member

Thanks @danielferayte We will definitely look to make the error message more informative and user-friendly!

@sharadraju sharadraju added enhancement and removed bug labels Jun 3, 2024
@sharadraju sharadraju changed the title Error in host connection Improve error message when there is an issue in host connection Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants