All Apps and Add-ons

Error while establishing connection in db connect with mysql database

shashi12345678
Engager

Hi,

I'm facing an issue while establishing connection between splunk db connect and mysql database.
configured java, installed mysql "mysql-connector-java-8.0.19-1.el6.noarch.rpm" and i have added identities and trying to save the connection. as soon as i click on save i'm getting error as "There was an error processing your request. It has been logged (ID 6f34ec5b5ff45a76)"

Details for configuration:

dbx_settings.conf
[java]
javaHome = /usr/java/jdk-11.0.6

identities.conf
[mysql]
disabled = 0
password = U2FsdGVkX19lv3QczRSgb6uiOc7/5FZQug8D34AbJu0=
use_win_auth = 0
username = root

db_connections.conf
[mysql_connection]
connection_type = mysql
database = test
disabled = 0
fetch_size = 1000
host = 1.10.103.45
identity = mysql
jdbcUseSSL = false
localTimezoneConversionEnabled = false
port = 3306
readonly = false
timezone = Etc/GMT+0

when i search in splunk_app_db_connect_server.log i can see the below error.

[dw-75 - POST /api/connections/status] ERROR io.dropwizard.jersey.errors.LoggingExceptionMapper - Error handling a request: 6f34ec5b5ff45a76
java.lang.NullPointerException: null

couldn't understand what's meant by this issue?

0 Karma
1 Solution

PavelP
Motivator

Hello @shashi12345678 ,

do you have a CLI access to the server? Please try this command:

mysql -uroot -p -h 1.10.103.45

you will be prompted for a password, type it and press enter. Do you see a connection established message or an error?

View solution in original post

0 Karma

PavelP
Motivator

Hello @shashi12345678 ,

do you have a CLI access to the server? Please try this command:

mysql -uroot -p -h 1.10.103.45

you will be prompted for a password, type it and press enter. Do you see a connection established message or an error?

0 Karma

shashi12345678
Engager

Hello @PavelP,
It worked, actually the issue was, i didn't provide access to the splunk user on mysql database.

Thanks for your help.

0 Karma

PavelP
Motivator

Hello @shashi12345678 , I'm glad it worked!

0 Karma

shashi12345678
Engager

do i need to use this command on deployer or on linux instance where mysql is installed ?

i have tried executing this command on where mysql database is installed i got an error
ERROR 1130 (HY000): Host '1.10.103.45' is not allowed to connect to this MySQL server

0 Karma

shashi12345678
Engager

granted permissions for users on mysql

root | 1.10.103.45 |. -- This IP address is of instance where mysql database is installed
| shashi | 5.230.143.214 |. -- This IP address is of deployer
| root | 5.230.143.214 |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| shashi | localhost |
| root | localhost |

still couldn't establish connection between deployer and mysql, facing the same issue

[dw-62 - POST /api/connections/status] ERROR io.dropwizard.jersey.errors.LoggingExceptionMapper - Error handling a request: 0511b4719f375d80
java.lang.NullPointerException: null

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

March Community Office Hours Security Series Uncovered!

Hello Splunk Community! In March, Splunk Community Office Hours spotlighted our fabulous Splunk Threat ...

Stay Connected: Your Guide to April Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars in April. This post ...