91537


EC2でembulkを実行しても、通信出来ない旨のエラー文が出て実行時できません。

やりたいことはEC2内のローカルmysql DB dev2からdev3へDB内容をreplaceする処理になります。  
なので以下のようなconfigファイルを書いて実行しています。

[code]

    in:
      type: mysql
      host: xxx.xxx.xxx.xxx
      user: root
      password: "xxxxx"
      database: dev2
      socket_timeout: 0
      # 18.183.204.253
    
    out:
      type: mysql
      host: xxx.xxx.xxx.xxx
      user: root
      password: "xxxxx"
      database: dev3
      mode: replace
    
[/code]

そして出ているエラーが以下になります。  
なにかアイデアをいただけましたらありがたいです。

[code]

    org.embulk.exec.PartialExecutionException: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.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 org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:340)
            at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:566)
            at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
            at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353)
            at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350)
            at org.embulk.spi.Exec.doWith(Exec.java:23)
            at org.embulk.exec.BulkLoader.run(BulkLoader.java:350)
            at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:242)
            at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:291)
            at org.embulk.EmbulkRunner.run(EmbulkRunner.java:155)
            at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:431)
            at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:90)
            at org.embulk.cli.Main.main(Main.java:64)
            Suppressed: java.lang.NullPointerException
                    at org.embulk.exec.BulkLoader.doCleanup(BulkLoader.java:463)
                    at org.embulk.exec.BulkLoader$3.run(BulkLoader.java:397)
                    at org.embulk.exec.BulkLoader$3.run(BulkLoader.java:394)
                    at org.embulk.spi.Exec.doWith(Exec.java:23)
                    at org.embulk.exec.BulkLoader.cleanup(BulkLoader.java:394)
                    at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:245)
                    ... 5 more
    Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.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 org.embulk.input.jdbc.AbstractJdbcInputPlugin.transaction(AbstractJdbcInputPlugin.java:227)
            at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:507)
            ... 11 more
    Caused by: com.mysql.jdbc.exceptions.jdbc4.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 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
            at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
            at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2189)
            at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2222)
            at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2017)
            at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:779)
            at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
            at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
            at java.sql.DriverManager.getConnection(DriverManager.java:664)
            at java.sql.DriverManager.getConnection(DriverManager.java:208)
            at org.embulk.input.mysql.MySQLInputPlugin.newConnection(MySQLInputPlugin.java:130)
            at org.embulk.input.mysql.MySQLInputPlugin.newConnection(MySQLInputPlugin.java:27)
            at org.embulk.input.jdbc.AbstractJdbcInputPlugin.transaction(AbstractJdbcInputPlugin.java:213)
            ... 12 more
    Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
            at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
            at java.net.Socket.connect(Socket.java:607)
            at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
            ... 29 more
    
    Error: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.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.
    
[/code]


CC BY-SA 4.0
2022-10-10T02:34:23.903
91520
2022-10-10T23:32:53.177
36855
question
java embulk
EC2でembulkを実行しても、通信出来ない旨のエラー文が出て実行時できません。


アクセスキーとシークレットキーを入力してないから動かないのではないですか？


CC BY-SA 4.0
2022-10-10T23:32:53.177
91537
2022-10-10T23:32:53.177
39754
91520
answer