{"id":1375,"date":"2017-02-08T07:26:53","date_gmt":"2017-02-08T10:26:53","guid":{"rendered":"http:\/\/www.franklinjr.com\/blog\/?p=1375"},"modified":"2017-02-08T07:26:53","modified_gmt":"2017-02-08T10:26:53","slug":"erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up","status":"publish","type":"post","link":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/02\/08\/erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up\/","title":{"rendered":"Erro ColdFusion: Could not create connection to database server. Attempted reconnect 3 times. Giving up."},"content":{"rendered":"<p>Estava com um problema ao conectar as DSNs de mysql ao banco de dados, o seguinte erro esporadicamente ocorria:<\/p>\n<pre lang=\"text\" line=\"1\">\"Error Executing Database Query.Could not create connection to database server. Attempted reconnect 3 times. Giving up.\"\r\nCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.\r\nCaused by: java.security.AccessControlException: access denied (\"java.net.SocketPermission\" \"mysql.franklin.com.br\" \"resolve\")\r\n<\/pre>\n<p>O problema era que acontecia em alguns momentos, n\u00e3o era sempre. Pesquisando pelo erro achei o link abaixo<br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/5489880\/tomcat-6-and-mysql-5-x-connection-error-on-ubuntu\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/5489880\/tomcat-6-and-mysql-5-x-connection-error-on-ubuntu<\/a><br \/>\nOnde o ocorria o mesmo problema mas no Java, como o CF roda com o Java, tentei descobrir como fazia a altera\u00e7\u00e3o no ColdFusion.<br \/>\nNo servidor onde trabalho tem o sandbox habilitado para o ColdFusion, para resolver isso tive que ir, no administrador do CF, em security &gt; Sandbox Security &gt; path do site que acontecia o problema &gt; Server\/Ports<br \/>\nE no campo Server\/IP Address, eu informei o IP de conex\u00e3o com o servidor mysql e a porta que eu uso para conex\u00e3o, assim a permiss\u00e3o de connect,resolve foi dada, conforme o link do stackoverflow, e tudo funcionou sem problemas \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Estava com um problema ao conectar as DSNs de mysql ao banco de dados, o seguinte erro esporadicamente ocorria: &#8220;Error Executing Database Query.Could not create connection to database server. Attempted reconnect 3 times. Giving up.&#8221; Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. Caused by: java.security.AccessControlException: access [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[443,372],"tags":[514,444,604],"class_list":["post-1375","post","type-post","status-publish","format-standard","hentry","category-coldfusion","category-mysql","tag-cf9","tag-coldfusion-2","tag-coldfusion-9"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Erro ColdFusion: Could not create connection to database server. Attempted reconnect 3 times. Giving up. - Franklin Jr.<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/02\/08\/erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up\/\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/index.php\\\/2017\\\/02\\\/08\\\/erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Erro ColdFusion: Could not create connection to database server. Attempted reconnect 3 times. Giving up.\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Erro ColdFusion: Could not create connection to database server. Attempted reconnect 3 times. Giving up. - Franklin Jr.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/02\/08\/erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/02\/08\/erro-coldfusion-could-not-create-connection-to-database-server-attempted-reconnect-3-times-giving-up\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.franklinjr.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Erro ColdFusion: Could not create connection to database server. Attempted reconnect 3 times. Giving up."}]}]}},"_links":{"self":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1375"}],"version-history":[{"count":2,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1375\/revisions"}],"predecessor-version":[{"id":1377,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1375\/revisions\/1377"}],"wp:attachment":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}