duannuan0074
2015-12-11 15:42
浏览 93
已采纳

自v12升级以来,Azure SQL数据库错误TLS握手失败

I receive this error since this morning, new v12 updated server / Azure SQL Database:

TLS Handshake failed: x509: certificate is valid for tr12.northcentralus1-a.worker.database.windows.net, *.tr12.northcentralus1-a.worker.database.windows.net, not [server-name].database.windows.net

Locally I have no problem connecting to the Azure SQL database. On Azure Web App the connection cannot be established.

Same connection string as local - was working fine before v12 update.

I'm using this SQL driver github.com/denisenkom/go-mssqldb/

Any pointer, don't believe I should change the connection string? Why it's working on local and not on Azure web app.

Edit 1: Just tried to replace [server-name].database.windows.net with the tr12... but tcp connection cannot be established.

Edit 2: Here's the connection string if it can help, bottom line, why it's working locally, same driver package version, I'm building executable locally and deploying via FTP, so not using Kudo deployment for this app. Was working A1 until Azure auto-upgraded to v12.

Server=[server-name].database.windows.net;Port=1433;Database=[dbname];User ID=[user];Password=[pass];Trusted_Connection=False;Encrypt=True;Connection Timeout=30;

Should trusted connection be true? or Encryption false? Will try changing those to see....

Edit 3: I've look at the connection string from Azure portal, and v12 seems to have this new parameters: TrustServerCertificate=False but no chance, did not fixed the issue

图片转代码服务由CSDN问答提供 功能建议

由于今天早上,新的v12更新服务器/ Azure SQL数据库,我收到此错误:</ p> \ n

TLS握手失败:x509:证书对于 tr12.northcentralus1-a.worker.database.windows.net有效, * .tr12.northcentralus1-a.worker.database.windows .net,而不是[server-name] .database.windows.net </ p> </ blockquote>

在本地我连接到Azure SQL数据库没有问题。 在Azure Web App上无法建立连接。</ p>

与本地相同的连接字符串-在v12更新之前可以正常工作。</ p>

我正在使用 SQL驱动程序 github.com/denisenkom/go-mssqldb / </ code> </ p>

任何指针,不相信我应该更改连接字符串吗? 为什么它可以在本地而不是Azure Web应用程序上工作。</ p>

编辑1:只是尝试将 [server-name] .database.windows.net </ code>替换为 tr12 ...,但无法建立tcp连接。</ p>

编辑2:这是连接字符串,如果有帮助,最重要的是,为什么在本地运行,相同的驱动程序包版本, 在本地构建可执行文件并通过FTP进行部署,因此请勿为此应用程序使用Kudo部署。 一直在A1上运行,直到Azure自动升级到v12。</ p>

Server = [server-name] .database.windows.net; Port = 1433; Database = [dbname] ; User ID = [user]; Password = [pass]; Trusted_Connection = False; Encrypt = True; Connection Timeout = 30; </ p> </ blockquote>

应该信任 连接是真的吗? 还是加密错误? 将尝试更改它们以查看...。</ p>

编辑3:我看过Azure门户的连接字符串,而v12似乎具有以下新参数: TrustServerCertificate = 错误</ code>,但是没有机会,没有解决问题</ p> </ div>

1条回答 默认 最新

相关推荐 更多相似问题