splunk / eventgen

Splunk Event Generator: Eventgen
Apache License 2.0
380 stars 179 forks source link

[BUG] Plugin config Not Found or Failed to load. #456

Open lluked opened 2 years ago

lluked commented 2 years ago

Describe the bug

PyPI Installation

EventGen is not working as documented and resulting in error:

splunk_eventgen.lib.eventgenexceptions.FailedLoadingPlugin: Plugin config Not Found or Failed to load.

To Reproduce Steps to reproduce the behavior:

python3.7 -m splunk_eventgen --version:

[vagrant@CentOS-7 eventgen]$ python3.7 -m splunk_eventgen --version
Eventgen 7.2.1

python3.7 -m splunk_eventgen -v generate tests/sample_eventgen_conf/replay/eventgen.conf.replay:

[vagrant@CentOS-7 eventgen]$ python3.7 -m splunk_eventgen -v generate tests/sample_eventgen_conf/replay/eventgen.conf.replay
Traceback (most recent call last):
  File "/home/vagrant/eventgen/splunk_eventgen/eventgen_core.py", line 527, in start
    loggingqueue=self.loggingQueue,
  File "/home/vagrant/eventgen/splunk_eventgen/lib/eventgentimer.py", line 57, in __init__
    "rater." + self.sample.rater, self.sample
  File "/home/vagrant/eventgen/splunk_eventgen/lib/eventgenconfig.py", line 366, in getPlugin
    raise targetplugin
splunk_eventgen.lib.eventgenexceptions.PluginNotLoaded: Plugin config Not Loaded, attempting to load.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/vagrant/eventgen/splunk_eventgen/__main__.py", line 384, in <module>
    main()
  File "/home/vagrant/eventgen/splunk_eventgen/__main__.py", line 355, in main
    eventgen.start()
  File "/home/vagrant/eventgen/splunk_eventgen/eventgen_core.py", line 537, in start
    loggingqueue=self.loggingQueue,
  File "/home/vagrant/eventgen/splunk_eventgen/lib/eventgentimer.py", line 57, in __init__
    "rater." + self.sample.rater, self.sample
  File "/home/vagrant/eventgen/splunk_eventgen/lib/eventgenconfig.py", line 368, in getPlugin
    raise FailedLoadingPlugin(name=plugin)
splunk_eventgen.lib.eventgenexceptions.FailedLoadingPlugin: Plugin config Not Found or Failed to load.

I have also built the pip module from source and eventgen still fails to run.

If you are using eventgen with pip module mode (please complete the following information):

Dishwishy commented 2 years ago

Same issue here. In my case : python version: 3.10 OS: OSX 12.5.1 Virtual Env: Tried both with and without and failed to run samples Eventgen Version: 7.2.1

mcy567 commented 1 year ago

me too

Eventgen Version: 7.2.1 python version: 3.7

image

0xr2po commented 1 year ago

I had the same problem, and I suspect that the cause is the versions used in requirements.txt, which are not compatible with your Python versions. I'm still investigating the problem, but in the meantime the following worked:

Downgrading to Python 3.8.5 (e.g. using pyenv) and following the pip installation instructions.

shimonShouei commented 1 year ago

Has someone resolved the problem? I tried downgrading to Python 3.8.5 but it didn't help

arnav-bnrj commented 1 year ago

I got this to work, in a way. Firstly, I used Python 3.8.5. Secondly, when you pull the repo, the default branch is set to developer which appears to be broken. Switch the branch to master because that is the most stable branch. This helped me run the sample tests, but installing the package after "poetry build", still gave me an error due to conflicting urllib3 version required by the package and one needed by botocore. I have ignored the error, so far, because I was able to run the sample tests. Hope this helps!