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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...