Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    otter
    9 Posts 1 Posters 5 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                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?

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  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?

                  1 Reply Last reply Reply Quote 0
                  • ? This user is from outside of this forum
                    Guest
                    last edited by

                    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!

                    1 Reply Last reply Reply Quote 0
                    • ? This user is from outside of this forum
                      Guest
                      last edited by

                      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

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • 1 / 1
                      • First post
                        Last post
                      Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation