jakubgarfield / Bonobo-Git-Server

Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
http://bonobogitserver.com
MIT License
1.81k stars 603 forks source link

Sync with AD backend crashed periodically #810

Open mifkys opened 6 years ago

mifkys commented 6 years ago

Bonobo Git Server's sync with AD crashing every several month with next error:

Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] Bonobo.Git.Server.Data.Update.ADBackendUpdate.Pre600UpdateTo600.BackendSubDirectoryNeedsUpdating(String backendDirectory, String subdirectory) +253 Bonobo.Git.Server.Data.Update.ADBackendUpdate.Pre600UpdateTo600.BackEndNeedsUpgrade(String dir) +126 Bonobo.Git.Server.Data.Update.ADBackendUpdate.Pre600UpdateTo600.UpdateADBackend() +236 Bonobo.Git.Server.MvcApplication.Application_Start() +838

[HttpException (0x80004005): Object reference not set to an instance of an object.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +540 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Object reference not set to an instance of an object.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731

After this error needs to recreate ADBackend folder and update all json files of repositories.

Bonobo 6.3.0 Windows Server 2008 R2 SP1

relair commented 6 years ago

It happened to me as well, I only needed to remove the users from ADBackend, as otherwise I would lose me descriptions/icons for repositories.