HurricaneLabs / DuplicityAppForSplunk

3 stars 1 forks source link

Unable to find _librsync library #1

Open gjanders opened 4 years ago

gjanders commented 4 years ago

On startup I'm seeing this error in my Splunk 8.0.2 test server:

03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:  Traceback (most recent call last):
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "./duplicity-input.py", line 17, in <module>
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from duplicity import commandline, dup_main, dup_time, log
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "/opt/splunk/etc/apps/DuplicityAppForSplunk/lib/linux-x86_64/duplicity/commandline.py", line 42, in <module>
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from duplicity import backend
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "/opt/splunk/etc/apps/DuplicityAppForSplunk/lib/linux-x86_64/duplicity/backend.py", line 46, in <module>
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from duplicity import dup_temp
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "/opt/splunk/etc/apps/DuplicityAppForSplunk/lib/linux-x86_64/duplicity/dup_temp.py", line 31, in <module>
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from duplicity import path
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "/opt/splunk/etc/apps/DuplicityAppForSplunk/lib/linux-x86_64/duplicity/path.py", line 47, in <module>
03-03-2020 09:34:17.572 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from duplicity import librsync
03-03-2020 09:34:17.573 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:    File "/opt/splunk/etc/apps/DuplicityAppForSplunk/lib/linux-x86_64/duplicity/librsync.py", line 33, in <module>
03-03-2020 09:34:17.573 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:      from . import _librsync
03-03-2020 09:34:17.573 +0000 ERROR ModularInputs - <stderr> Introspecting scheme=duplicity:  ImportError: cannot import name _librsync

In the code I see hints that this is a C library:

u"""Provides a high-level interface to some librsync functions

This is a python wrapper around the lower-level _librsync module,
which is written in C.  The goal was to use C as little as possible...

"""

I also found: lib/darwin/duplicity-0.8.4-py2.7.egg-info/SOURCES.txt:duplicity/_librsyncmodule.c lib/darwin/duplicity-0.8.4-py2.7.egg-info/installed-files.txt:../duplicity/_librsync.so

But not an x86 version included, is this related to https://github.com/librsync/librsync and do I need to build that to use duplicity?

Thanks

mcm commented 4 years ago

This is a known issue right now due to the way Splunk handles Python libraries. It's something we're still trying to work out.

gjanders commented 4 years ago

So is the idea that you use pip to get that library externally and use a non-Splunk python install to get it? I wonder if pyden might do the trick here, I haven't looked into it enough

Or do you have to install the librsync from source and put it inside the app for this to work?

gjanders commented 4 years ago

Or I could simplify my question, how do I get this app working as such? I would like to test it...

mcm commented 4 years ago

Unfortunately it's not that simple. The app was developed to use some built-in Splunk libraries in addition to the librsync stuff. The app as it stands isn't in a working state, unless you happen to be running Splunk on Mac OS because Python is handled differently by Splunk on Mac OS.

gjanders commented 4 years ago

Understood, thanks