Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Git Raft crashing Otter Service



  • Hello

    I have tried to change my "Default" raft to a Git based raft using this guide: http://inedo.com/support/tutorials/storing-otter-plans-and-configurations-in-git

    However, my Otter Service is crashing everytime I start now.

    Application: Otter.Service.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: LibGit2Sharp.LibGit2SharpException
       at LibGit2Sharp.Core.Ensure.HandleError(Int32)
       at LibGit2Sharp.Core.Proxy.git_remote_fetch(LibGit2Sharp.Core.Handles.RemoteSafeHandle, System.Collections.Generic.IEnumerable`1<System.String>, LibGit2Sharp.Core.GitFetchOptions, System.String)
       at LibGit2Sharp.Network.DoFetch(LibGit2Sharp.FetchOptions, LibGit2Sharp.Core.Handles.RemoteSafeHandle, System.String, System.Collections.Generic.IEnumerable`1<System.String>)
       at LibGit2Sharp.Network.DoFetch(LibGit2Sharp.Core.Handles.RepositorySafeHandle, LibGit2Sharp.Remote, LibGit2Sharp.FetchOptions, System.String, System.Collections.Generic.IEnumerable`1<System.String>)
       at LibGit2Sharp.Network.Fetch(LibGit2Sharp.Remote, LibGit2Sharp.FetchOptions, System.String)
       at Inedo.Otter.Extensions.RaftRepositories.ExternalGitRaftRepository.OpenRepository()
       at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
       at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
       at Inedo.Otter.Extensions.RaftRepositories.GitRaftRepositoryBase.OpenRaftItem(Inedo.Otter.Extensibility.RaftRepositories.RaftItemType, System.String, System.IO.FileMode, System.IO.FileAccess)
       at Inedo.Otter.Service.PlanExecuter.PlanTimedExecuterBase.BuildConfigurationPlan(Servers_Extended, System.Collections.Generic.IList`1<ServerRoles_Extended>)
       at Inedo.Otter.Service.PlanExecuter.RoutineConfigurationTimedExecuter+<BeginRun>d__7.MoveNext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_1(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    

    The Git raft is on GitHub, originally I tried using a Personal Access Token, but have actually changed it to a dedicated user now.

    Picture of my raft configuration

    Raft Configuration

    Picture of the raft content

    Raft content

    Otter is now version 1.1.3 (Build 7)



  • Just had a little more information

    I vary from the guide a little bit.
    The owner of the repository and the login are two different accounts.

    AccountA - Owns the Repo

    AccountB - Accesses the Repo



  • The errors should be apparent when trying to edit a file from the UI, or at least logged in Admin > Error Logs.

    As for the service, we will fix the crash and log the error in the next maintenance release.



  • Hi Alana

    There is no information in the "Error Log"

    Accessing any page that contains information from the Raft just gives an error message that says:
    Request failed with status code: 401

    I have double and tipple checked that the credentials are good.

    However, I just tried something intressting

    1. Delete %ProgramData%\Otter\Executions\GitRafts
    2. I can now download the Raft
    3. Do something that access the Raft, download the Raft as above is enough
    4. I can NO LONGER download the Raft

    It seems to me that the information in GitRafts become corrupted?



  • Thanks for the additional information.

    As you've noticed, in %ProgramData%\Otter\Executions\GitRafts the local repositories for the raft is stored.

    We saw the same 401 error occur when the Raft Configuration is edited after it was initially created; this is because the config file inside of the local git repository does not receive the new remote parameters. For example, if you delete the corresponding GitHub repository, the error is still 401 (even though it should be 404, I would think).

    In the next maintenance release, we will probably just delete the local repository each time the Raft Configuration is edited; this will also be a work-around when the local repository becomes corrupted.

    I'm not sure if that's helpful or not? Deleting the local repository after editing seems to always fix this, at least for GitHub.



  • Hi Alana

    So based on your feedback I tried the following:

    1. Delete the Raft from the Interface
    2. Deleted %ProgramData%\Otter\Executions\GitRafts
    3. Added the Raft again
    4. Downloaded the Raft as .zip
    5. Attempted to download the Raft as .zip again, but now it fails...

    Any suggestions on how to continue?



  • Hmm, I just can't seem to repro this.

    Can you try this:

    1. Create new Git Raft (use https://github.com/whatatripp/OtterRaft1000.git, but don't need a username, just anonymous)
    2. Download Raft
    3. Download Raft again

    Does that fail?

    If not, can you look in that config file in the local repository for the one that you're working with?



  • Hi Alana

    The repo you linked works fine! :(

    Ill send you an email with the credentials to my repo, so you can give it a go!



  • In case you didn't see the email, we were able to reproduce this with your repository and will be fixing this in the next maintenance release! Thanks


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation