ERROR DB Reader - Knime and Mysql database are on the same server

Hi;
Knime and Mysql database are on the same server, I was not getting any errors before. But now this error occurs, it reads the table and when it reaches the end of the table (my guess is in this direction) this error occurs. What do you think is the problem and how can I solve it?

ERROR DB Reader 39:2000 Execute failed: Communications link failure during rollback(). Transaction resolution unknown.

image

Does anyone have any ideas or solutions?

Hi @umutcankurt , I don’t have solutions at the moment, but I’ll ask some questions to see if we can get this moving…

Which OS are you on, and which version of KNIME?

Which version of MySql, and which driver?

How are you referencing the MySQL database host in the MySQL Connector? Is it by server name, or localhost, or by ip address?

When you say “but now this error occurs”… did it work previously and has just stopped working?

Has MySql always been on the same server as KNIME?

Can you connect ok to MySql from any other third party tools?

Is the DB Table Selector configured to select a table, or is it using a custom query?

If you drop a DB Query node in between the DB Table Selector and the DB Reader, can you execute the DB Query node, and then open the Modified DB Data viewport:

then open the DB Query tab. Can you see the query?

Can you copy and paste that query into a DB Query Reader and execute that? What happens? e.g.

(in my screenshot I’m using an H2 database to demo because I don’t currently have MySQL installed )

Can you also copy/paste that same SQL into a third party application and execute it to see what happens.

My suspicion is where you said they are on the same server, this possibly has implications concerning the translation of local address 127.0.0.1 by the jdbc driver/mysql, referred to here, but one thing at a time :wink:
java - Solving a “communications link failure” with JDBC and MySQL - Stack Overflow

One possible quick-win from the above stackoverflow comment. You could try adding the following line to your KNIME.INI file, and then restarting KNIME. Does it then work?

-Djava.net.preferIPv4Stack=true

Edit: from your screenshot though it looks like you get a connection ok, so this casts doubt on this being the same problem. But let’s try to rule it out! :slight_smile:

3 Likes

Hi; @takbb Thank you very much for your answer. Also sorry for the late reply. I couldn’t reply because of my other work, I’ll try it and share the result.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.