Archive

db connect giving an error: no such database available for this user

a212830
Champion

Hi,

We recently migrated to new servers and upgraded to Splunk 6.1.1. One of our our dashboards, the db connect reports are blank, and an error icon appears, with the message "there is no such database available for this user". As an admin, I can see this feed, and it works. Do I need to do something to make it available to everyone? (Oh yeah, we implemented ldap and new roles as well...)

redc
Builder

I'm using this to develop customer-facing apps, and each customer should have access to ONLY their own database (shouldn't have access to any other customers' databases).

Here's what I ended up doing:

  1. Set up a new user and check the "Create a role for this user" checkbox AND inherit the "dbx_user" role
  2. Edit the new user's role (should be "user-username") and add the "user" role to the "Inheritance" roles
  3. Go to Settings > External Databases
  4. Edit ALL of your databases' permissions
    1. Set "Object should appear in" to "All" (Global)
    2. Set roles for each user:
    3. admin: read and write
    4. can_delete: read
    5. dbx_user: NONE (uncheck both checkboxes)
    6. power: read and write
    7. splunk-system-role: read
    8. user: NONE (uncheck both checkboxes)
    9. user-username (your new user-specific role, created in Steps 1 and 2 above): read
    10. all others: as needed

NOTE: if you set "user" to read or read/write, then every new role you created (user-username) that inherits the "user" role will have access to that database. That's why I specify the "user" role as not having either read or write access above.

You can check to make sure your database permissions are set correctly for each user by logging in as that user and going to the DB Connect app and looking at the list of databases available on either the "Database Info" or the "Database Query" pages.

This process is also described on this documentation page (without the quirks I discovered because of my implementation, which is a little strange in the overall scheme of things in Splunk): http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Setupuserpermissions

NOTE: I also tried just adding the dbx_user's capabilities to my new user's role (without forcing inheritance of the dbx_user), but that didn't seem to cut it. Not sure why that didn't work, but it didn't.

redc
Builder

As a side note, I got this through working with Splunk support.

0 Karma

cudmorea
New Member

I've been looking at restricting privs and have hit the same error message unless I grant admin_all_objects to my users role.

0 Karma

a212830
Champion

Not yet. Working with support.

0 Karma

DavidHourani
Super Champion

I have the same problem as you... have you fixed this issue yet ?

0 Karma

araitz
Splunk Employee
Splunk Employee

That sounds like a lot of changes. You might be best off submitting a support case so that Splunk support can take a look at a diag file.

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.