All Apps and Add-ons

Why am I getting error "key value store is locked" trying to install the Splunk App for Windows Infrastructure?

URSI
New Member

I've got an install of Splunk 64-bit running on Windows Server 2012 & am trying to install the Splunk App for Windows Infrastructure. Unfortunately I'm getting the "key value store is locked" error while setting it up. After looking through C:\Program Files\Splunk\var\lib\splunk\kvstore\mongo I noticed there was a "mongod.lock" which set me to looking through the logs in C:\Program Files\Splunk\var\log\splunk\mongod.log & found this:


 old lock file: C:\Program Files\Splunk\var\lib\splunk/kvstore\mongo\mongod.lock.  probably means unclean shutdown,
 but there are no journal files to recover.
 this is likely human error or filesystem corruption.
 please make sure that your journal directory is mounted.
 found 53 dbs.
 see: http://dochub.mongodb.org/core/repair for more information

Does anyone have a fix for this?

0 Karma

dflodstrom
Builder

I have come across this and similar issues with kvstore. Occasionally I'll have two SSH sessions opened to the same server and attempt to restart Splunk while I'm editing a conf file. KVstore doesn't shut down cleanly when this happens and mongodb continues to run. When this happens I get prompted to select another port because my KVstore port is in use. I'm forced to manually kill the process and then start Splunk to work around this.

The lock file is slightly different. I believe just deleting that file will allow mongodb to start back up (not the safest option)
This site has the info you need --> http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/

0 Karma

URSI
New Member

What do I use for the dbpath?

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...