Erro ao gravar em servidor externo MYSQL



  • Bom dia.
    Tenho uma aplicaçao que preciso gravar alguns dados em outro servidor com banco mysql.
    Mas tem dado a seguinte mensagem ao conectar e tentar gravar, o que pode ser?

    Exceção Gerada:
    com.mysql.jdbc.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1112) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:344) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2333) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:792) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:377) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at wfr.database.DBConnection.create(DBConnection.java:169) at wfr.database.DBConnection.(DBConnection.java:114) at wfr.database.DBConnection.createConnection(DBConnection.java:325) at wfr.com.systems.system_hpd.rules.WebrunFunctions.ebfSQLMYSQLOpenConnection(WebrunFunctions.java:12010) at wfr.com.systems.system_hpd.rules.Mkr7999cf932ce2445c97e8Ba6a85b1f62a.run(Mkr7999cf932ce2445c97e8Ba6a85b1f62a.java:181) at wfr.rules.WFRRule.start(WFRRule.java:755) at wfr.rules.WFRRule.call(WFRRule.java:1817) at wfr.rules.WFRRule.call(WFRRule.java:58) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:208) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:294) ... 21 more

    Causa:
    java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:208) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:294) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2333) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:792) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:377) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at wfr.database.DBConnection.create(DBConnection.java:169) at wfr.database.DBConnection.(DBConnection.java:114) at wfr.database.DBConnection.createConnection(DBConnection.java:325) at wfr.com.systems.system_hpd.rules.WebrunFunctions.ebfSQLMYSQLOpenConnection(WebrunFunctions.java:12010) at wfr.com.systems.system_hpd.rules.Mkr7999cf932ce2445c97e8Ba6a85b1f62a.run(Mkr7999cf932ce2445c97e8Ba6a85b1f62a.java:181) at wfr.rules.WFRRule.start(WFRRule.java:755) at wfr.rules.WFRRule.call(WFRRule.java:1817) at wfr.rules.WFRRule.call(WFRRule.java:58) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595)


  • Veja este procedimento.

    https://suporte.softwell.com.br/maker/manual_3/pt/erros/banco_de_dados/lost_connection_to_mysql_server_during_query_socket_error_on_write_wsagetlasterror.htm


  • Bom dia.
    Obrigado.
    Testarei.
    Abs.

Log in to reply