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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...