All Apps and Add-ons

Config Explorer error

gcusello
SplunkTrust
SplunkTrust

Hi at all,
I tried to use the Config Explorer app on a stand-alone Splunk server (on italian Windows 10), but when opening it I have the following error message:

An error occurred!
init:
An exception of type TypeError occurred. Arguments:
('environment can only contain strings',)

and then I haven't any function or dashboard or interface.
Is there an installation or configuration action to perform to start the app?

Ciao.
Giuseppe

Labels (2)
0 Karma

fnlfaraz
Engager

I have a same problem and it seems like, im useing Python-2.7. Can anyone help me on this. 

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Thank you for reporting this problem. I figured out what was causing the problem and I have pushed a new version to Splunkbase. OK Please download version 1.4.9 from here:

https://splunkbase.splunk.com/app/4353/

 

Best of luck and let me know if you have any more problems

marcoscala
Builder

hi! I had the same issue but with the latest version 1.4.9 now it works!

 

Regards,

Marco

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Hmm I think that your shell environment has a unicode string which is causing a problem with the application startup. Can you please open a "cmd" shell as the local administrator, then run this command from the SPLUNK_HOME directory:

bin\splunk cmd python

then you should get a new prompt that looks like ">>>". Now type:

import os; os.environ

and this will dumb a large bunch of text. Can you paste it here? I expect one of the strings will be prefixed with a "u" like so: u'some_value'

Cheers, Chris.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @chrisyoungerjds,
Thank you for your attention.

This is the result

>>> import os; os.environ
{'PROGRAMW6432': 'C:\\Program Files', 'SPLUNK_SERVER_NAME': 'Splunkd', 'NUMBER_OF_PROCESSORS': '8', 'LOCALAPPDATA': 'C:\\Users\\Giuseppe\\AppData\\Local', 'PROGRAMDATA': 'C:\\ProgramData', 'HOMEPATH': '\\Users\\Giuseppe', 'TEMP': 'C:\\Users\\GIUSEP~1\\AppData\\Local\\Temp', 'USERDOMAIN_ROAMINGPROFILE': 'AzureAD', 'USERDOMAIN': 'AzureAD', 'PYTHONHASHSEED': 'random', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'SPLUNK_ETC': 'C:\\Program Files\\Splunk\\etc', 'PATH': 'C:\\Program Files\\Splunk\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Users\\GiuseppeCusello\\AppData\\Local\\Microsoft\\WindowsApps', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe', 'CONFIGSETROOT': 'C:\\WINDOWS\\ConfigSetRoot', 'OS': 'Windows_NT', 'SYSTEMROOT': 'C:\\WINDOWS', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'NODE_PATH': 'C:\\Users\\Giuseppe\\OneDrive', 'TMP': 'C:\\Users\\GIUSEP~1\\AppData\\Local\\Temp', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'SPLUNK_HOME': 'C:\\Program Files\\Splunk', 'RANDFILE': 'C:\\Program Files\\Splunk\\var\\run\\.rnd',, 'PROCESSOR_LEVEL': '6', 'HOMEDRIVE': 'C:', 'COMPUTERNAME': 'DESKTOP', 'SPLUNK_WEB_NAME': 'splunkweb', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'WINDIR': 'C:\\WINDOWS', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', 'OPENSSL_CONF': 'C:\\Program Files\\Splunk\\openssl.cnf', 'VBOX_MSI_INSTALL_PATH': 'C:\\Program Files\\Oracle\\VirtualBox\\', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'SPLUNK_DB': 'C:\\Program Files\\Splunk\\var\\lib\\splunk', 'APPDATA': 'C:\\Users\\Giuseppe\\AppData\\Roaming', 'PYTHONUTF8': '1', 'PROMPT': '$P$G', 'SSL_CERT_FILE': 'C:\\Program Files\\Splunk\\cert.pem', 'PROCESSOR_REVISION': '8e0a', 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'USERPROFILE': 'C:\\Users\\Giuseppe', 'PUBLIC': 'C:\\Users\\Public', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'DOKANLIBRARY1': 'C:\\Program Files\\Dokan\\Dokan Library-1.3.1\\', 'SYSTEMDRIVE': 'C:', 'HOSTNAME': 'DESKTOP', 'USERNAME': 'Giuseppe', 'PROGRAMFILES': 'C:\\Program Files', 'LOGONSERVER': '\\\\DESKTOP', 'PSMODULEPATH': 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules', 'LDAPCONF': 'C:\\Program Files\\Splunk\\etc\\openldap\\ldap.conf'}

There isn't any string with u'some_value'

Ciao.
Giuseppe

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Thanks for providing this output. The only anomaly I can find is that there is an extra comma appearing after the RANDFILE key. I have no idea how this has entered into the OS environment but it might indicate an environment variable with no name.. I wonder if you can find it by right click "This PC" > "Properties" > Environment variables > check both boxes.

You also didn't mention what version of Splunk you are using, but some of my research indicates this might resolve if you use Python 3 - this will happen if you are using Splunk 8 and above.

All the best and let me know what you find out.
Cheers. Chris

0 Karma

gcusello
SplunkTrust
SplunkTrust

Thanks Chris,
Probably the above error is my mistake in trying to anonymize the data I sent you!

About the version of Splunk I am using the latest 8.0.4.

In any case I am already using Python3 (I have configured server.conf as described in the documentation) even if using the command you have suggested it replies with python 2.7.
So now I forced to use Python3 and I have the following result:

environ({'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\Giuseppe\\AppData\\Roaming', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'DESKTOP', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe', 'CONFIGSETROOT': 'C:\\WINDOWS\\ConfigSetRoot', 'DOKANLIBRARY1': 'C:\\Program Files\\Dokan\\Dokan Library-1.3.1\\', 'DRIVERDATA': 'C:\\Windows\\System32\\Drivers\\DriverData', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\Giuseppe', 'LOCALAPPDATA': 'C:\\Users\\Giuseppe\\AppData\\Local', 'LOGONSERVER': '\\\\DESKTOP', 'NUMBER_OF_PROCESSORS': '8', 'OS': 'Windows_NT', 'PATH': 'C:\\Program Files\\Splunk\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Infocert\\DiKe 6\\RAO;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Users\\Giuseppe\\AppData\\Local\\Microsoft\\WindowsApps', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 142 Stepping 10, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '8e0a', 'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'PROGRAMW6432': 'C:\\Program Files', 'PROMPT': '$P$G', 'PSMODULEPATH': 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules', 'PUBLIC': 'C:\\Users\\Public', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\WINDOWS', 'TEMP': 'C:\\Users\\GIUSEP~1\\AppData\\Local\\Temp', 'TMP': 'C:\\Users\\GIUSEP~1\\AppData\\Local\\Temp', 'USERDOMAIN': 'AzureAD', 'USERDOMAIN_ROAMINGPROFILE': 'AzureAD', 'USERNAME': 'Giuseppe', 'USERPROFILE': 'C:\\Users\\Giuseppe', 'VBOX_MSI_INSTALL_PATH': 'C:\\Program Files\\Oracle\\VirtualBox\\', 'WINDIR': 'C:\\WINDOWS', 'HOSTNAME': 'DESKTOP', 'SPLUNK_HOME': 'C:\\Program Files\\Splunk', 'SPLUNK_DB': 'C:\\Program Files\\Splunk\\var\\lib\\splunk', 'SPLUNK_ETC': 'C:\\Program Files\\Splunk\\etc', 'RANDFILE': 'C:\\Program Files\\Splunk\\var\\run\\.rnd', 'SPLUNK_SERVER_NAME': 'Splunkd', 'SPLUNK_WEB_NAME': 'splunkweb', 'PYTHONHASHSEED': 'random', 'PYTHONUTF8': '1', 'NODE_PATH': 'C:\\Program Files\\Splunk\\lib\\node_modules', 'OPENSSL_CONF': 'C:\\Program Files\\Splunk\\openssl.cnf', 'SSL_CERT_FILE': 'C:\\Program Files\\Splunk\\cert.pem', 'LDAPCONF': 'C:\\Program Files\\Splunk\\etc\\openldap\\ldap.conf'})

But none u'some_value'.

Ciao and Thanks.

Giuseppe

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

can you do the same commands as before bin\splunk cmd python and now try running this command:

import os, subprocess; env_copy = os.environ.copy(); p = subprocess.Popen(['bin\\splunk', 'btool', 'check', '--debug'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, env=env_copy); o = p.communicate(); o

Thanks

0 Karma
Get Updates on the Splunk Community!

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...