One Star

Connect TOS to a MySQL db on a Amazon AWS ec2

Hello everyone,
I have a server istance on amazon aws ec2 (t2.micro) with a mysql db installed on which I can access both with PUTTY and a Client (MYSQL Workbench) on my computer. However with talend the connection does not work.
I am creating a new matadata connection Metadata-->DbConnection (Create New Connections). I insert the name, server, port (3306), login, root and database, however when I select "check" I get the following error:
Connection failure. You must change the Database Settings.
  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.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1089)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:314)
      at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:272)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:2674)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:1)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$1.runnableWithCancel(AProgressMonitorDialogWithCancel.java:77)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$ARunnableWithProgressCancel$1.call(AProgressMonitorDialogWithCancel.java:161)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.lang.Thread.run(Thread.java:745)
  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.GeneratedConstructorAccessor53.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
      at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)
      at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:356)
      at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2502)
      at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
      at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
      at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
      at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
      at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
      at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
      at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:186)
      ... 9 more
  Caused by: java.net.ConnectException: Connection refused
      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:589)
      at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:315)
      at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:306)
      ... 22 more

Do you have any ideas?
Thanks a lot,
Marco
11 REPLIES
Moderator

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Hi,
Would you mind posting the screenshot of DB connection setting in metadata into forum?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

are you using talend on the same machine where you use putty ?
Check that your public IP is allowed in AWS inbound firewall with the port 3306
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

I have the same problem.
What is it mean from " You must press the Check Button to check the Database Setting"?
I cant login after register new account.
Hope someone can help
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

this is the image
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

this is the image
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

this is the image

this is the llink
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Hi,
Would you mind posting the screenshot of DB connection setting in metadata into forum?
Best regards
Sabrina

why i cant attach link or hyperlink?
sites.google.com/site/khoironblogs/temp/Talend.png?attredirects=0&d=1
Moderator

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Hi,
You should register and log in as a Community member first, then you can upload your screenshot into forum.
Note:there is a limitation for posting URL on forum(10 posts).
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Finally, i can login.
One Star

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Hi,
Would you mind posting the screenshot of DB connection setting in metadata into forum?
Best regards
Sabrina

why i cant attach link or hyperlink?
sites.google.com/site/khoironblogs/temp/Talend.png
This is my capture
Moderator

Re: Connect TOS to a MySQL db on a Amazon AWS ec2

Hi,
Can you use "Upload" button to attach your screenshot on forum?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.