All Apps and Add-ons

DBConnect Error

jwidhalm
Explorer

I’m using Splunk DBConnect v1.1.6 to connect to a Zabbix database (mySQL). Both Zabbix and Splunk are running on the same Ubuntu (14.04) server. The Java Bridge is running but when I attempt to create a connection (External Databases >> Add New) I receive the following error:

ERROR 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.

My guidance for this setup was the document: Splunk DB Connect 1.1.6 generated 2/08/2015. The document was well written and easy to follow.

If you Google this error you’ll get a million hits – I’ve trolled through many of these, and have tried a few of the suggestions, but I have found no corrective action so far. I can log into the Zabbix database via command line using either ‘localhost' or ‘127.0.0.1’.

mysql/my.cnf and splunk server.conf are included. Any suggestions would be greatly appreciated.

-John


mysql_my.cnf:

[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking

bind-address = 127.0.0.1

key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]

[isamchk]
key_buffer = 16M

!includedir /etc/mysql/conf.d/


$SPLUNK_HOME/etc/system/local/server.conf

[sslConfig]
enableSplunkdSSL = true
sslKeysfilePassword = $1$z7Q/J/AiKFZE

[lmpool:auto_generated_pool_download-trial]
description = auto_generated_pool_download-trial
quota = MAX
slaves = *
stack_id = download-trial

[lmpool:auto_generated_pool_forwarder]
description = auto_generated_pool_forwarder
quota = MAX
slaves = *
stack_id = forwarder

[lmpool:auto_generated_pool_free]
description = auto_generated_pool_free
quota = MAX
slaves = *
stack_id = free

[general]
pass4SymmKey = $1$mPhre7VkYwRE
serverName = MYSERVERNAME

[lmpool:auto_generated_pool_enterprise]
description = auto_generated_pool_enterprise
quota = MAX
slaves = *
stack_id = enterprise

[license]
active_group = Enterprise

0 Karma
1 Solution

chanfoli
Builder

Let's start with the basics: what are you entering for host and port on the new connection form?

[Edit] Most likely you are not telling the connector to connect to the IP and port on which mysql is listening.

View solution in original post

chanfoli
Builder

Let's start with the basics: what are you entering for host and port on the new connection form?

[Edit] Most likely you are not telling the connector to connect to the IP and port on which mysql is listening.

jwidhalm
Explorer

Well, your question led my to try something new . . .

I was entering the server IP address as the host address (i.e. 10.x.x.x). I changed this to 'localhost' and it worked. 127.0.0.1 also worked.

Thank you!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...