Hi all,
We have one add-on which is developed using add-on builder.
We have configured the input in add-on and getting below error in logs.
2019-02-07 19:37:33,760 ERROR pid=30575 tid=MainThread file=base_modinput.py:log_error:307 | Traceback (most recent call last):
File "/opt/splunk/etc/apps/TA-xxx/bin/xxx/modinput_wrapper/base_modinput.py", line 113, in stream_events
self.parse_input_args(input_definition)
File "/opt/splunk/etc/apps/TA-xxx/bin/xxx/modinput_wrapper/base_modinput.py", line 152, in parse_input_args
self._parse_input_args_from_global_config(inputs)
File "/opt/splunk/etc/apps/TA-xxx/bin/xxx/modinput_wrapper/base_modinput.py", line 170, in _parse_input_args_from_global_config
global_config = GlobalConfig(uri, session_key, global_schema)
File "/opt/splunk/etc/apps/TA-xxx/bin/xxx/splunktaucclib/global_config/__init__.py", line 51, in __init__
port=splunkd_info.port,
File "/opt/splunk/etc/apps/TA-xxx/bin/xxx/solnlib/net_utils.py", line 129, in wrapper
'Illegal argument: {}={}'.format(arg, value))
ValueError: Illegal argument: host=::1
I'm using Splunk version 7.2.0 which is a standalone instance.
/opt/splunk/system/local/server.conf
[sslConfig]
sslPassword = xxxxxxxxxxx
[general]
pass4SymmKey = xxxxxxxxx
listenOnIPv6 = yes
connectUsingIpVersion = 6-first
[lmpool:auto_generated_pool_download-trial]
description = auto_generated_pool_download-trial
quota = MAX
slaves = *
stack_id = download-trial
[lmpool:auto_generated_pool_forwarder]
description = auto_generated_pool_forwarder
quota = MAX
slaves = *
stack_id = forwarder
[lmpool:auto_generated_pool_free]
description = auto_generated_pool_free
quota = MAX
slaves = *
stack_id = free
/opt/splunk/system/local/web.conf
[settings]
listenOnIPv6 = yes
We have tried to debug this issue and it looks like the method is_valid_hostname() inside net_utils.py file is not able to parse ipv6 address. below is the code of that method.
def is_valid_hostname(hostname):
'''Validate a host name.
:param hostname: host name to validate.
:type hostname: ``string``
:returns: True if is valid else False
:rtype: ``bool``
'''
if len(hostname) > 255:
return False
if hostname[-1:] == '.':
hostname = hostname[:-1]
allowed = re.compile('(?!-)[A-Z\d-]{1,63}(?<!-)$', re.IGNORECASE)
return all(allowed.match(x) for x in hostname.split('.'))
Is this a known issue of solnlib library or add-on builder or Am I missing something?
Can anyone help me with any fix or any workaround?
... View more