Splunk Search

Your entry was not saved. The following error was reported: SyntaxError: JSON Parse error: Unrecognized token '<‘.

tristanmatthews
Path Finder

Hi,

So I'm inheriting some splunk code that I'm going through and cleaning up. It contains:

rex field=source "/data/splunk/(?<key>.*)/"

The search runs fine, when I navigate to it in the browser, (bread crumbs: splunk > manager >> Searches and reports >> [the search name] ) and modify a completely unrelated part of the search and go to save it it kicks the error

Your entry was not saved. The following error was reported: SyntaxError: Unexpected token <.

I'm fairly sure it's not escaping <> inside of quotes properly, so I can't save my search. I can however create a new search that has the exact same text in it.

Thanks,
Tristan

1 Solution

woodcock
Esteemed Legend

This is a bug in all of the latest versions of Splunk and I do not know what causes it. I do not have an entitlement to open a case on it but hopefully you do so please DO open a case. You can tell that this is a bug because you will get the same error even if you change NOTHING and just try to resave your search.

I have a workaround: Copy down the details of the Search and save it fresh. It will ALWAYS save OK, but, it will NEVER be re-editable.

View solution in original post

woodcock
Esteemed Legend

You are THE MAN!

hexx
Splunk Employee
Splunk Employee

Actually, @the_wolverine is THE LADY! 🙂

woodcock
Esteemed Legend

I should have guessed by the fingernails but the beard threw me off!

0 Karma

the_wolverine
Champion

I'm also seeing several reports of this issue and in reviewing the query I see nothing wrong with it nor anything that was set unexpectedly.

0 Karma

guilmxm
Influencer

Hi,

See (end of the article)

http://www.w3schools.com/xml/xml_syntax.asp

Replace special characters by xml entities:

< by &lt;
> by &gt;
& by &amp;

And so on.

0 Karma

woodcock
Esteemed Legend

This is not the problem; this is a bug. See my answer.

0 Karma

muebel
SplunkTrust
SplunkTrust

whats the full search string?

0 Karma

had1980
New Member

Hello, I am having the same issue. Did you solve it?

Thanks.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...