Documentationbreadcrumb arrow Pluginsbreadcrumb arrow IBM Db2breadcrumb arrow Troubleshooting
Grafana Cloud Enterprise

Troubleshoot IBM Db2 data source issues

This document provides solutions to common issues you might encounter when configuring or using the IBM Db2 data source. For configuration instructions, refer to Configure the IBM Db2 data source.

Connection errors

These errors occur when Grafana cannot connect to the IBM Db2 database.

“Database instance not reachable”

Symptoms:

  • Save & test fails with “Database instance not reachable”
  • Queries fail with connection errors

Possible causes and solutions:

CauseSolution
Database server is not runningStart the IBM Db2 database server.
Incorrect host or portVerify the Host URL in the data source configuration matches your Db2 server.
Firewall blocking connectionEnsure your firewall allows outbound connections to the Db2 server port (typically 50000).
Network connectivity issueTest connectivity from the Grafana server to the Db2 host using nc -zv <host> <port>.

“DB2 instance not reachable”

Symptoms:

  • Save & test fails with “DB2 instance not reachable”
  • Error messages containing SQL30081N or SQLSTATE=08001

Solutions:

  1. Verify the Db2 server is running and accepting connections.
  2. Check that the database manager is started on the Db2 server.
  3. Confirm the port number is correct (default is 50000).
  4. Test connectivity: nc -zv <host> 50000

“Missing resource bundle” (ERRORCODE=-4222)

Symptoms:

  • Error message: [jcc]Missing resource bundle: A resource bundle could not be found in the com.ibm.db2.jcc package ERRORCODE=-4222, SQLSTATE=08001

Solutions:

This error typically indicates a connectivity issue, not a missing driver.

  1. Verify the Db2 server is running.
  2. Test network connectivity to the Db2 host and port.
  3. Check that the database manager is initialized and accepting connections.
  4. If using Docker, verify the container is running: docker ps | grep db2

“Connection timeout”

Symptoms:

  • Save & test times out
  • Error message mentions “timeout” or “timed out”

Possible causes and solutions:

CauseSolution
Database server is overloadedCheck database server performance and resources.
Network latencyVerify network connectivity between Grafana and the Db2 server.
Firewall silently dropping packetsCheck firewall rules; ensure the Db2 port is open.

“Cannot resolve database hostname”

Symptoms:

  • Error message mentions “unknown host” or “name resolution”

Solutions:

  1. Verify the hostname is spelled correctly in the Host URL.
  2. Check DNS resolution from the Grafana server: nslookup <hostname>
  3. If using an IP address, ensure it’s correct and reachable.
  4. For internal hostnames, verify the Grafana server can resolve them.

Authentication errors

These errors occur when credentials are invalid or the user lacks required permissions.

“Authentication failed” or “Access denied”

Symptoms:

  • Save & test fails with authentication errors
  • Error messages mention “authentication”, “access denied”, or “login failed”

Possible causes and solutions:

CauseSolution
Incorrect usernameVerify the username in the data source configuration.
Incorrect passwordRe-enter the password; it may have been changed.
Account lockedCheck if the database account is locked or expired.
Insufficient permissionsEnsure the user has CONNECT privilege on the database.

Query errors

These errors occur when executing queries against the database.

Empty results or “No data”

Symptoms:

  • Query executes without error but returns no data
  • Panels show “No data” message

Possible causes and solutions:

CauseSolution
Query returns no matching rowsVerify your WHERE clause and expand the dashboard time range.
Wrong database selectedCheck that you’re querying the correct database.
Table or column doesn’t existVerify table and column names in your query.
Case sensitivityDb2 object names are case-sensitive when quoted. Use unquoted uppercase names or verify exact case.

Unsupported data type errors

Symptoms:

  • Error message: “unsupported conversion from arrow to sdk type”
  • Specific types mentioned: DECIMAL128, TIME32, DATE32

Solutions:

Some Db2 data types may not be fully supported. Workarounds:

  1. DECIMAL columns: Cast to a supported numeric type:

    SQL
    SELECT CAST(decimal_column AS DOUBLE) AS value FROM table
  2. TIME columns: Cast to VARCHAR or extract components:

    SQL
    SELECT VARCHAR(time_column) AS time_string FROM table
  3. DATE columns: Cast to TIMESTAMP:

    SQL
    SELECT TIMESTAMP(date_column) AS time FROM table

Query syntax errors

Symptoms:

  • Error message indicates SQL syntax error
  • Query fails immediately after execution

Solutions:

  1. Verify your SQL syntax is valid for IBM Db2.
  2. Check that all table and column names exist.
  3. Ensure string values are enclosed in single quotes.
  4. For time series queries, verify the time column contains valid timestamp values.

SSL/TLS errors

SSL connection failures

Symptoms:

  • Connection fails when SSL is enabled
  • Error messages mention SSL, TLS, or certificate issues

Solutions:

  1. Verify your Db2 server is configured for SSL connections.
  2. Try disabling SSL in the data source configuration to test basic connectivity.
  3. Check that the Db2 server’s SSL certificate is valid and not expired.

Performance issues

Slow queries

Symptoms:

  • Queries take a long time to execute
  • Dashboard panels load slowly

Solutions:

  1. Add appropriate indexes to your Db2 tables.
  2. Limit the result set using FETCH FIRST n ROWS ONLY.
  3. Narrow the time range in your dashboard.
  4. Optimize your SQL query (avoid SELECT *).
  5. Check Db2 server resources and performance.

Get additional help

If you’ve tried the solutions above and still encounter issues:

  1. Check the Grafana community forums for similar issues.
  2. Review the plugin’s GitHub issues for known bugs.
  3. Consult the IBM Db2 documentation for database-specific guidance.
  4. Contact Grafana Support if you have a Grafana Cloud or Enterprise subscription.

When reporting issues, include:

  • Grafana version
  • Plugin version
  • Error messages (redact sensitive information)
  • Steps to reproduce the issue
  • Relevant query examples (redact sensitive data)