Security

Error getting database connection: dbinfo

peasead
Path Finder

I'm getting the following when I go to the "Database Info" tab within the application:

command="dbinfo", Error getting database connection: Login failed for user 'foo'.

I went to the SQL database and ran "dbinfo" and got the following:

Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'dbinfo'.

I have validated that the user account I'm using does have access to the database. Does anyone have any idea as to what I need to tell my DBA to change?

1 Solution

peasead
Path Finder

I reinstalled Splunk on a different server and installed Splunk Database Connect and have no problems.

It has to be something with that initial installation on the production server...and that administrator isn't here anymore.

In either case, it appears to not be an issue with Splunk.

Thanks all.

View solution in original post

0 Karma

peasead
Path Finder

I reinstalled Splunk on a different server and installed Splunk Database Connect and have no problems.

It has to be something with that initial installation on the production server...and that administrator isn't here anymore.

In either case, it appears to not be an issue with Splunk.

Thanks all.

0 Karma

gnovak
Builder

Does the database info page even load for you? You should be able to select what database you would like information about.

I would first check the user accounts that were setup with the db connect app initially. there should be ones to connect to the db's you setup in the beginning. Perhaps try re-entering the information again or checking it.

Also what database are you accessing? Can you connect to this database another way outside of splunk such as using PG admin or just command line?

If the user logging into the database in question is "foo" does the foo user exist? Did foo's password change? Can you login to the database in question using the user foo by the command line or pgadmin perhaps? (or equivalent program....)

0 Karma

peasead
Path Finder

Thanks for the response gnovak.

The Database Info page does technically load, but as soon as I select a database to connect to, I get the dreaded red error at the top of the page with the previously referenced error.

I didn't initially set up the DB Connect app...where would I check those accounts?

I'm accessing MSSQL. I can connect to this database directly through SQL Management Studio.

The user "foo" is valid and has access to the database, I'm using that username/password combination to test my connection as well via the above paragraph.

0 Karma

briansutherland
Explorer

I am seeing the same behaviour here on Windows 2012R2.
I 'had' been using DBConnect without issue on another server running Windows 2008R2.

Trolling for an answer.

ziegfried
Influencer

This sounds like the credentials that have been supplied for the database connection are invalid. You can go to the connection in Splunk Manager > External Databases > Your database and re-enter the credentials. Make sure to check the "Validate Database Connection" checkbox before clicking on Save in order to get feedback for the authenticity of the supplied username/password.

0 Karma

peasead
Path Finder

Nope, just one database.conf.

0 Karma

ziegfried
Influencer

Is it possible that you have multiple database.conf files in different apps with information about the same connection (ie. the same [stanza] name)? Please take a look in $SPLUNK_HOME/etc/apps/.../local.

0 Karma

peasead
Path Finder

Thanks ziegfried, I've tried that a couple times with no luck. I used the "Validate Database Connection" and even typed my password in wrong to make sure that the checkbox was actually checking.

Any other options?

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

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

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...