{"id":8210,"date":"2023-05-11T23:54:22","date_gmt":"2023-05-11T14:54:22","guid":{"rendered":"https:\/\/www.xenos.jp\/~zen\/blog2\/?p=8210"},"modified":"2023-05-11T23:54:24","modified_gmt":"2023-05-11T14:54:24","slug":"post-8210","status":"publish","type":"post","link":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/2023\/05\/11\/post-8210\/","title":{"rendered":"\u6025\u306bNpgsql\u304b\u3089Azure Database for PostgreSQL\u3078\u306e\u63a5\u7d9a\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u305f"},"content":{"rendered":"\n<p>\u6025\u306b.NET6\uff08.NET 3.1\uff5e7\u3082\uff09\u306eNpgsql\u304b\u3089Azure Database for PostgreSQL\u3078\u306e\u63a5\u7d9a\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u304b\u3089\u307f\u308b\u3068\u3001Azure\u5074\u306ePostgreSQL\u306b\u5f37\u5236\u5207\u65ad\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u307f\u3048\u308b\u30ed\u30b0\u304c\u51fa\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> ---> Npgsql.NpgsqlException (0x80004005): Exception while writing to stream\n ---> System.IO.IOException: Unable to write data to the transport connection: \u65e2\u5b58\u306e\u63a5\u7d9a\u306f\u30ea\u30e2\u30fc\u30c8 \u30db\u30b9\u30c8\u306b\u5f37\u5236\u7684\u306b\u5207\u65ad\u3055\u308c\u307e\u3057\u305f\u3002.\n ---> System.Net.Sockets.SocketException (10054): \u65e2\u5b58\u306e\u63a5\u7d9a\u306f\u30ea\u30e2\u30fc\u30c8 \u30db\u30b9\u30c8\u306b\u5f37\u5236\u7684\u306b\u5207\u65ad\u3055\u308c\u307e\u3057\u305f\u3002\n   at System.Net.Sockets.NetworkStream.Write(Byte&#91;] buffer, Int32 offset, Int32 count)<\/code><\/pre>\n\n\n\n<p>\u3053\u3046\u306a\u308b\u3068\u3001\u901a\u5e38\u8003\u3048\u308b\u306e\u306f\u3001Azure\u306ePostgreSQL\u3067\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6570\u304c\u3042\u3075\u308c\u3066\u3044\u308b\u3068\u304b\u3001\u9ad8\u8ca0\u8377\u72b6\u614b\u3068\u304b\u3001DBaaS\u306e\u5236\u7d04\uff08PostgreSQL\u8a2d\u5b9a\u306e\u5916\u5074\uff09\u304c\u539f\u56e0\u3058\u3083\u306a\u3044\u304b\u3068\u3044\u3046\u3053\u3068\u3002\u3053\u308c\u3092\uff11\u3064\uff11\u3064\u8abf\u3079\u3066\u3044\u304f\u3068\u3001\u7570\u5e38\u306a\u3057\u3002Azure\u5074\u306b\u306f\u554f\u984c\u304c\u898b\u5f53\u305f\u3089\u305a\u3002DB\u306e\u30ed\u30b0\u3092Azure\u306e\u7ba1\u7406\u30da\u30fc\u30b8\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u3001\u4e0b\u8a18\u306e\u30ed\u30b0\u304c\u3042\u308a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>could not receive data from client: An existing connection was forcibly closed by the remote host.<\/code><\/pre>\n\n\n\n<p>Azure\u306ePostgreSQL\u304b\u3089\u307f\u308b\u3068\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u304c\u5207\u65ad\u3057\u3066\u3044\u308b\u3068\u306e\u3053\u3068\u3002<\/p>\n\n\n\n<p>\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u300cAzure Database for PostgreSQL Single server\u300d\u306f\u3001\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u304c\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002.NET\u3067\u3001Ngpsql\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u300cBaltimore CyberTrust Root\u300d\u3068\u300cDigiCert Global Root G2\u300d\u304c\u4f7f\u3046Windows\uff08Windows Server\u542b\u3080\uff09\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u306e\u3053\u3068\u3002\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u306e\u78ba\u8a8d\u3092\u3059\u308b\u3068\u3001\u300cDigiCert Global Root G2\u300d\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3002\u3053\u308c\u304c\u539f\u56e0\u306a\u306e\u3067\u3001\u4e0b\u8a18\u306e\u30de\u30a4\u30af\u30ed\u30bd\u30d5\u30c8\u306e\u5185\u5bb9\u306b\u5f93\u3044\u3001\u78ba\u8a8d\u3057\u3066\u4f5c\u696d\u3057\u305f\u3002<\/p>\n\n\n\n<p>Understanding the changes in the Root CA change for Azure Database for PostgreSQL Single server<br><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/postgresql\/single-server\/concepts-certificate-rotation#what-do-i-need-to-do-to-maintain-connectivity\">https:\/\/learn.microsoft.com\/en-us\/azure\/postgresql\/single-server\/concepts-certificate-rotation#what-do-i-need-to-do-to-maintain-connectivity<\/a><\/p>\n\n\n\n<p>\u4eca\u56de\u8db3\u308a\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u306f\u3001\u300cDigiCert Global Root G2\u300d\u306a\u306e\u3067\u3001Digicert\u306e\u30b5\u30a4\u30c8\u304b\u3089\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/www.digicert.com\/kb\/digicert-root-certificates.htm#roots\">https:\/\/www.digicert.com\/kb\/digicert-root-certificates.htm#roots<\/a><br>\uff08\u300cDownload DER\/CRT\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001CRT\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\uff09<\/p>\n\n\n\n<p>CRT\u30d5\u30a1\u30a4\u30eb\u3092\u3001\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u304c\u8db3\u308a\u3066\u3044\u306a\u3044\u30b5\u30fc\u30d0\u306b\u6301\u3063\u3066\u3044\u304d\u3001\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30a6\u30a3\u30b6\u30fc\u30c9\u304b\u3089\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002\u914d\u7f6e\u5834\u6240\u306f\u81ea\u52d5\u9078\u629e\u3055\u305b\u308b\u3053\u3068\u3067\u30eb\u30fc\u30c8\u306e\u3068\u3053\u308d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3002<\/p>\n\n\n\n<p>\u306a\u304a\u3001\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306eOS\u518d\u8d77\u52d5\u306f\u3057\u306a\u304f\u3066\u3082\u3001\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u3092\u4f7f\u3044\u59cb\u3081\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6025\u306b.NET6\uff08.NET 3.1\uff5e7\u3082\uff09\u306eNpgsql\u304b\u3089Azure Database for PostgreSQL\u3078\u306e\u63a5\u7d9a\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3002 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u304b\u3089\u307f\u308b\u3068\u3001Azure\u5074\u306ePostgreSQL\u306b\u5f37\u5236\u5207\u65ad\u3055 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[33,115,122],"class_list":["post-8210","post","type-post","status-publish","format-standard","hentry","category-windows","category-tech-memo","tag-azure","tag-postgresql","tag-ssl"],"_links":{"self":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/8210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/comments?post=8210"}],"version-history":[{"count":1,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/8210\/revisions"}],"predecessor-version":[{"id":8211,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/8210\/revisions\/8211"}],"wp:attachment":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/media?parent=8210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/categories?post=8210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/tags?post=8210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}