pixie icon indicating copy to clipboard operation
pixie copied to clipboard

MySQL events are not recorded in mysql_events table for Java

Open LakshanKarunathilake opened this issue 2 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: I deployed a java application connecting the MySQL database in Azure. I initially verified with this go application and it successfully recorded events in the tables. The Java application code is as below

import java.sql.*;

public class App {
    static final String DB_URL = "jdbc:mysql://<host>:3306/pixie";
    static final String USER = "<user>";
    static final String PASS = "<password>";
    static final String QUERY = "SELECT * FROM Persons";

    public static void main(String[] args) {
        // Open a connection
        try(Connection conn = DriverManager.getConnection(DB_URL, USER, PASS);
            Statement stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(QUERY);) {
            // Extract data from result set
            while (rs.next()) {
                // Retrieve by column name
                System.out.print("PersonId: " + rs.getInt("PersonId"));
                System.out.print(", FirstName: " + rs.getString("FirstName"));
                System.out.print(", LastName: " + rs.getString("LastName"));
                System.out.println(", Address: " + rs.getString("Address"));
                System.out.println(", City: " + rs.getString("City"));
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

Expected behavior MySQL events should be recorded in mysql_events

Screenshots If applicable, add screenshots to help explain your problem. Please make sure the screenshot does not contain any sensitive information such as API keys or access tokens.

Logs Please attach the logs by running the following command:

[pixie_logs_20220705161453.zip](https://github.com/pixie-io/pixie/files/9045679/pixie_logs_20220705161453.zip)

App information (please complete the following information):

  • Pixie version 0.7.13+Distribution.8209092.20220615085155.1
  • K8s cluster version - v1.25.2
  • Node Kernel version
  • Browser version Version 103.0.5060.53

LakshanKarunathilake avatar Jul 05 '22 10:07 LakshanKarunathilake

When I disable the tls connection, the mysql_events table was populated. I think the issue is with the secured connections.

LakshanKarunathilake avatar Jul 11 '22 04:07 LakshanKarunathilake

@LakshanKarunathilake from the sample code you shared it's not clear to me that tls is being used. Can you explain how you are disabling it?

I ask because I'm curious what tls library your code is using. If it's based on netty (seems unlikely given the import name), the work I'm doing in #407 could make this possible.

ddelnano avatar Jul 11 '22 15:07 ddelnano

@ddelnano I used the ?useSSL=false

LakshanKarunathilake avatar Jul 12 '22 04:07 LakshanKarunathilake