<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is kvstore update failing with code 115? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236781#M2057</link>
    <description>&lt;P&gt;The reason this message is displayed is because you're trying to write a multi-valued _key field to your KV Store.&lt;BR /&gt;
For example:&lt;BR /&gt;
I create a KV Store with the following values:&lt;BR /&gt;
'{"name":"indexer1","id":123,"address":{"street":"250 Brannan","city":"San Francisco"}}'&lt;BR /&gt;
'{"name":"indexer1","id":124,"address":{"street":"250 Brannan","city":"San Francisco"}}'&lt;BR /&gt;
I then write a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = _internal | head 1 | eval name = "indexer1"| lookup test_lookup name OUTPUT _key | outputlookup test_lookup append=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This means my one event from the search on _internal will match both of the KV Store entries, and we create a new field=_key for that event due to the OUTPUT of the lookup.  Since we matched two entries in the KV Store, the _key field on the event will evaluate to something like "_key" : [ "56e30ef4af0001b2aa352761", "56e30f0baf0001b2aa352762" ].  Since Splunk's KV Store only allows a single, unique value for _key, the search fails with the cryptic message &lt;CODE&gt;ERROR KVStoreLookup - KV Store Lookup output failed with code -115 and message ''&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;tl;dr revise your search query, KV Store collection, or transforms.conf (max_matches=1) to ensure that you will not match an event to multiple KV Store entries when trying to write to the _key field.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:07:10 GMT</pubDate>
    <dc:creator>nromito_splunk</dc:creator>
    <dc:date>2020-09-29T09:07:10Z</dc:date>
    <item>
      <title>Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236777#M2053</link>
      <description>&lt;P&gt;I've got a kvstore lookup who's data is updated every day from a scheduled search.  I built it using the ideas that @dwaddle and @starcher presented at .conf2015 (&lt;A href="https://conf.splunk.com/session/2015/conf2015-LookupTalk.pdf"&gt;presentation here&lt;/A&gt; if anyone is interested).  This worked great for a few months, but now I'm getting an error message whenever the updating search runs.  Neither the updating search nor structure of the data have changed so I don't think it has anything to do with the search itself.  When the updating search runs, it returns a table of data but gets the following message when it tries to write to the kvstore:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"Could not append to collection 'CollectionOfIncidents': an error occurred while saving to the collection.  See search.log for more details."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I look in search.log there is one more message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR KVStoreLookup - KV Store Lookup output failed with code -115 and message ''
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas as to what this error code means or what could be causing the update to fail? &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 14:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236777#M2053</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2016-01-19T14:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236778#M2054</link>
      <description>&lt;P&gt;What platform?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 15:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236778#M2054</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-01-19T15:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236779#M2055</link>
      <description>&lt;P&gt;Sorry, should have included that!&lt;/P&gt;

&lt;P&gt;Splunk version:  6.3&lt;BR /&gt;
OS:  Windows 2008 R2&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 16:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236779#M2055</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2016-01-19T16:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236780#M2056</link>
      <description>&lt;P&gt;We are also starting to see this same error.  Hopefully someone has a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 22:26:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236780#M2056</guid>
      <dc:creator>robert_miller</dc:creator>
      <dc:date>2016-02-01T22:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236781#M2057</link>
      <description>&lt;P&gt;The reason this message is displayed is because you're trying to write a multi-valued _key field to your KV Store.&lt;BR /&gt;
For example:&lt;BR /&gt;
I create a KV Store with the following values:&lt;BR /&gt;
'{"name":"indexer1","id":123,"address":{"street":"250 Brannan","city":"San Francisco"}}'&lt;BR /&gt;
'{"name":"indexer1","id":124,"address":{"street":"250 Brannan","city":"San Francisco"}}'&lt;BR /&gt;
I then write a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = _internal | head 1 | eval name = "indexer1"| lookup test_lookup name OUTPUT _key | outputlookup test_lookup append=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This means my one event from the search on _internal will match both of the KV Store entries, and we create a new field=_key for that event due to the OUTPUT of the lookup.  Since we matched two entries in the KV Store, the _key field on the event will evaluate to something like "_key" : [ "56e30ef4af0001b2aa352761", "56e30f0baf0001b2aa352762" ].  Since Splunk's KV Store only allows a single, unique value for _key, the search fails with the cryptic message &lt;CODE&gt;ERROR KVStoreLookup - KV Store Lookup output failed with code -115 and message ''&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;tl;dr revise your search query, KV Store collection, or transforms.conf (max_matches=1) to ensure that you will not match an event to multiple KV Store entries when trying to write to the _key field.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236781#M2057</guid>
      <dc:creator>nromito_splunk</dc:creator>
      <dc:date>2020-09-29T09:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236782#M2058</link>
      <description>&lt;P&gt;Same here, did  nromito's polst helped you out to fix it?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 09:50:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236782#M2058</guid>
      <dc:creator>claudio_manig</dc:creator>
      <dc:date>2016-10-19T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is kvstore update failing with code 115?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236783#M2059</link>
      <description>&lt;P&gt;I know this post is old, but in case the answer here doesn't fix it for folks, I recently resolved this issue myself by removing an fields with a "." character in the name.  Looks like it was breaking the ability to append.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 22:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Why-is-kvstore-update-failing-with-code-115/m-p/236783#M2059</guid>
      <dc:creator>briancronrath</dc:creator>
      <dc:date>2018-08-02T22:54:17Z</dc:date>
    </item>
  </channel>
</rss>

