All Apps and Add-ons

Configuration format for git repository

ivohechmann
Explorer

Hi VersionControl,
I'm unable to install/configure the versioncontrol for splunk app. When I add the configuration, everytime there's a "bad request" errormessage. I tried to "missconfigure" the local REST endpoints/user/passwords and the errormessage was different, so I guess the Bad-Request is about the remote GIT repository. In what format do I have to configure? I tried

ssh://ivo@blablabla.blablabla.com:7999/om_mon/splunkversioncontrol.git

I've added the ssh public key to GIT, so I am able to clone the repository (which is completely empty, no branches or files) to the localhost (windows, where my splunk standalone is installed). What logger would tell me more about the Bad Request?

Thank you so much
ivo

0 Karma

gjanders
SplunkTrust
SplunkTrust

Have you completed the initialization of the repository? So a git init and commit et cetera?

The Version Control app assumes the git repo is ready to have files added to it...

0 Karma

ivohechmann
Explorer

Did intialize and add a reamde.md, repo has default branch "master", nothing else.
Still "bad request" when trying to configure.
Format of git url is correct when using "ssh://ivo@blablabla.blablabla.com:7999/om_mon/splunkversioncontrol.git" ?
Thank you very much
ivo

0 Karma

gjanders
SplunkTrust
SplunkTrust

In $SPLUNK_HOME/var/log/splunk/ there is a log file for splunk version control, does that give you a hint of the issue?
If not try turning on debug mode and post some of the info here and I can have a look

0 Karma

ivohechmann
Explorer

Hi, splunkversioncontrol_backup.log and splunkversioncontrol_restore.log remain empty.
When I start splunkd.exe with --debug option, I see in splunkd.log some entries, but nothing that gives me a reasonf for "Bad Request".

Wanted to post my log output, but text upload size is very limited. And I am missing karma points for uploading attachments...
Thank you very much
ivo

0 Karma

gjanders
SplunkTrust
SplunkTrust

Ah yes, your not getting past validation so no logs yet!

There are two potential errors you should see:
Attempt to validate access to Splunk failed with code ...
Or
Attempt to validate access to Splunk failed with error
Or
Failed to validate the git repo URL, stdout of

If its one of the first two, all I'm doing is using the src URL supplied and

<srcURL>/servicesNS/nobody/SplunkVersionControl/search/jobs/export?search=makeresults

Did you install the SplunkVersionControl app on the machine you are attempting to backup?
If not did you use the remoteAppName option?

Finally if the above doesn't help there is a contact developer button on https://splunkbase.splunk.com/app/4355/ with my email address

So far I've assumed your configuring the backup part but the errors should be very similar for the restore part as well...

0 Karma

ivohechmann
Explorer

Thank you, yes I installed SplunkVersionControl on my local splunk (to see how it works before I install it on the shared environment).

Indeed, I see
08-16-2019 10:17:19.684 +0200 WARN ModularInputs - Argument validation for scheme=splunkversioncontrol_backup failed: Failed to validate the git repo URL, stdout of '', stderr of 'Die Syntax f² den Dateinamen, Verzeichnisnamen oder die Datentrŧerbezeichnung ist falsch.\r\r\n'
08-16-2019 10:17:19.684 +0200 INFO ModularInputs - Failed to validate the git repo URL, stdout of '', stderr of 'Die Syntax f² den Dateinamen, Verzeichnisnamen oder die Datentrŧerbezeichnung ist falsch.\r\r\n'
08-16-2019 10:17:19.684 +0200 DEBUG AdminManager - URI /servicesNS/admin/search/data/inputs/splunkversioncontrol_backup generated an AdminManagerExceptionBase exception in handler 'splunkversioncontrol_backup': Failed to validate the git repo URL, stdout of '', stderr of 'Die Syntax f² den Dateinamen, Verzeichnisnamen oder die Datentrŧerbezeichnung ist falsch.\r\r\n'

So, how must I define the gitRepoURL? I tried
ssh://ivo@blablabla.blablabla.com:7999/om_mon/splunkversioncontrol.git

0 Karma

gjanders
SplunkTrust
SplunkTrust

The code runs
git ls-remote

And then your git repo. Does

git ls-remote ssh://... Work as the OS user running splunk? It needs to work without any password prompt

0 Karma

ivohechmann
Explorer

Thank you for your hint.
git ls-remote works without password prompt.
Maybe the problem is that the ssh-key is installed in my .ssh/id_rsa.pub, but my local splunk runs as a system service, so maybe the ssh key is searched elsewhere, I'll give a try and will feed back 🙂
ivo

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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 ...