Splunk Dev

Getting error while doing "Splunk Restart" python.

dhirendra761
Contributor

Hi All,

I am getting below-attached error while doing "Splunk restart" from cmd. Could you please help/suggest me the solution into this.
Already tried the solution given in ref: https://answers.splunk.com/answers/542113/splunk-will-not-start-importerror-cannot-import-na.html, but no luck.

Thanks in advance.

Error in text:

Splunk> See your world.  Maybe wish you hadn't.

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 "C:\Program Files\Splunk\Python-2.7\Lib\site.py", line 62, in <module>
    import os
  File "C:\Program Files\Splunk\Python-2.7\Lib\os.py", line 400, in <module>
    import UserDict
  File "C:\Program Files\Splunk\Python-2.7\Lib\UserDict.py", line 116, in <modul
e>
    import _abcoll
  File "C:\Program Files\Splunk\Python-2.7\Lib\_abcoll.py", line 11, in <module>

    from abc import ABCMeta, abstractmethod
  File "C:\Program Files\Splunk\Python-2.7\Lib\abc.py", line 8, in <module>
    from _weakrefset import WeakSet
ImportError: cannot import name WeakSet

alt text

Labels (1)
0 Karma
1 Solution

dhirendra761
Contributor

Hi All,
The final solution, I made to fix this issue, is UPGRADATION.
So I upgraded splunk instance V7.1.1 to v7.1.2. and it works.

Thanks for the support and time. Happy Splunking!!

Dhirendra

View solution in original post

0 Karma

dhirendra761
Contributor

Hi All,
The final solution, I made to fix this issue, is UPGRADATION.
So I upgraded splunk instance V7.1.1 to v7.1.2. and it works.

Thanks for the support and time. Happy Splunking!!

Dhirendra

0 Karma

woodcock
Esteemed Legend

Be sure to click Accept to close your question and indicated that there is a definitive answer!

0 Karma

dhirendra761
Contributor

Sure @woodcock ... Thanks for your time 🙂

0 Karma

woodcock
Esteemed Legend

Give us more context. Is this post-upgrade from a was-working system? Is this a new installation? What version are you running?

0 Karma

dhirendra761
Contributor

Hi @woodcock , I am using splunk enterprise Version 7.1.1. It was working fine yesterday suddenly it stopped and thrown this error.
Splunkd.log has following errorS:

08-06-2019 16:12:47.846 +0200 WARN  ConfPathMapper - Failed to open: C:\Program Files\Splunk\etc\apps\SA_AI_NR_X620_ams_secure_transport_sh\local\inputs.conf: Access is denied.
08-06-2019 16:13:00.970 +0200 INFO  loader - win-service: Command pre-flight-checks ran successfully.
08-06-2019 16:13:01.103 +0200 ERROR loader - win-service: Error running check-xml-files (_pclose returned 1).
08-06-2019 16:13:01.103 +0200 ERROR loader - win-service: Here is the output from running check-xml-files:
08-06-2019 16:13:01.103 +0200 ERROR loader - Traceback (most recent call last):
08-06-2019 16:13:01.103 +0200 ERROR loader -   File "C:\Program Files\Splunk\Python-2.7\Lib\site.py", line 62, in <module>
08-06-2019 16:13:01.103 +0200 ERROR loader -     import os
08-06-2019 16:13:01.103 +0200 ERROR loader -   File "C:\Program Files\Splunk\Python-2.7\Lib\os.py", line 400, in <module>
08-06-2019 16:13:01.103 +0200 ERROR loader -     import UserDict
08-06-2019 16:13:01.103 +0200 ERROR loader -   File "C:\Program Files\Splunk\Python-2.7\Lib\UserDict.py", line 116, in <module>
08-06-2019 16:13:01.103 +0200 ERROR loader -     import _abcoll
08-06-2019 16:13:01.103 +0200 ERROR loader -   File "C:\Program Files\Splunk\Python-2.7\Lib\_abcoll.py", line 11, in <module>
08-06-2019 16:13:01.103 +0200 ERROR loader -     from abc import ABCMeta, abstractmethod
08-06-2019 16:13:01.103 +0200 ERROR loader -   File "C:\Program Files\Splunk\Python-2.7\Lib\abc.py", line 8, in <module>
08-06-2019 16:13:01.103 +0200 ERROR loader -     from _weakrefset import WeakSet
08-06-2019 16:13:01.103 +0200 ERROR loader - ImportError: cannot import name WeakSet
08-06-2019 16:13:01.103 +0200 ERROR loader - <<<<< EOF (check-xml-files)
0 Karma

woodcock
Esteemed Legend

You might as well upgrade to the latest version and if that does not fix it, open a support ticket.

0 Karma

dhirendra761
Contributor

@martin_mueller @somesoni2 @woodcock @MuS @niketnilay
Please help me

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...