Deployment Architecture

Splunk Error on Start When Configuring to Use CORS

jscraig2006
Communicator

Hi,

we have an API that we are starting to send data to HEC. When I place 

 

 

[httpServer]
crossOriginSharingHeaders = "http://<FQDN>:<PORT>"

 

 

in the server.conf under /etc/system/local, I get an error upon restarting Splunk. 

 

Checking prerequisites...
Checking http port [8000]: open
Checking mgmt port [8089]: open
Checking appserver port [127.0.0.1:8065]: open
Checking kvstore port [8191]: open
Traceback (most recent call last):
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/cli.py", line 39, in <module>
from splunk.rcUtils import makeRestCall, CliArgError, NoEndpointError, InvalidStatusCodeError
File "/opt/splunk/lib/python3.7/site-packages/splunk/rcUtils.py", line 17, in <module>
from splunk.search import dispatch, getJob, listJobs
File "/opt/splunk/lib/python3.7/site-packages/splunk/search/__init__.py", line 2238, in <module>
TEST_NAMESPACE = splunk.getDefault('namespace')
File "/opt/splunk/lib/python3.7/site-packages/splunk/__init__.py", line 79, in getDefault
setDefault()
File "/opt/splunk/lib/python3.7/site-packages/splunk/__init__.py", line 66, in setDefault
getLocalServerInfo()
File "/opt/splunk/lib/python3.7/site-packages/splunk/__init__.py", line 36, in getLocalServerInfo
mergeHostPath(hostpath, True)
File "/opt/splunk/lib/python3.7/site-packages/splunk/__init__.py", line 136, in mergeHostPath
setDefault('port', int(port))
ValueError: invalid literal for int() with base 10: '4200""\nhttps://127.0.0.1:8089'

What would cause Splunk from starting?

Thanks in advince,

~John

Labels (1)
0 Karma
1 Solution

jscraig2006
Communicator

ok I figured it out.. It does not like the quotes around the hostname. After removing them, Splunk was able to restart. 

View solution in original post

0 Karma

jscraig2006
Communicator

ok I figured it out.. It does not like the quotes around the hostname. After removing them, Splunk was able to restart. 

0 Karma
Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...