Hostname/IP does not match certificates when trustServerCertificate=false
See original GitHub issueAs per the recent deprecation notice introduced in #1029, I have made the change to explicitly set this to false. However, when attempting to connect to an Azure SQL Server in an Elastic Pool, tedious reports the following error:
HostnameIP does not match certificates altnames Host <redacted>.database.windows.net is not in the certs altnames <redacted>.worker.database.windows.net <redacted>.worker.database.windows.net <redacted>.worker.database.windows.net <redacted>.worker.database.windows.net <redacted>.worker.database.windows.net
The connection string recommended by the Azure portal includes this option which is missing from the available options in connection options in tedious.
hostNameInCertificate=*.database.windows.net
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Hostname/IP does not match certificate's altnames: POSTMAN
my-app.app) is listed as one of alternate domains listed in the SSL certificate that the amazon generated dns name uses.
Read more >500 Hostname/IP doesn't match certificate's altnames
Hi, if we try to use our odataservice we get this error: 500 Hostname/IP doesn't match certificate's altnames: "Host: .... is not cert's...
Read more >Upgraded from v1.1.0 to v1.2.0 produces Hostname/IP does ...
Upgraded from v1.1.0 to v1.2.0 produces Hostname/IP does not match certificate's altnames: Host: smee.io. is not in the cert's altnames #156.
Read more >Hostname/IP does not match certificate's altnames: Host
I am trying to upload files to linode object storage using nodejs & aws-sdk but getting following error: ``` NetworkingError [ERR_TLS_CERT_ALTNAME_INVALID]: ...
Read more >hostname <IP address> does not match the server certificate
When attempting to add a certificate to OpsManager, configuration fails with a "hostname does not match " error when saving changes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m on v9.2.1 and I still have to force
trustServerCertificate: true. The documentation is still wrong, it seems.Without the option set, I get:
unable to get local issuer certificate, but enabled it works.https://github.com/tediousjs/tedious/pull/1116 is running into the same issue. The problem is that when we follow a server redirect, we still expect the initial server name when performing the TLS connection, which then fails, as this does not match the hostname that the redirect points at.
The fix should be straightforward. I’ll open a PR soon. 🙇♂️