Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create Monitoring Instance #1665

Closed
mikeminutillo opened this issue Jun 5, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@mikeminutillo
Copy link
Member

commented Jun 5, 2019

Version 3.8.0 cannot create new monitoring instances.

Symptoms

When you try to create a monitoring instance, you get the following exception:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\wolfb\AppData\Local\Temp\ServiceControl.Monitoring\ServiceControl.Monitoring.exe'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at ServiceControlInstaller.Engine.FileSystem.MonitoringZipInfo.TryReadMonitoringReleaseDate(DateTime& releaseDate)
   at ServiceControl.Config.Framework.Modules.MonitoringInstanceInstaller.CheckLicenseIsValid()
   at ServiceControl.Config.Commands.AddMonitoringInstanceCommand.Execute(Object obj)
   at ServiceControl.Config.Framework.Commands.AbstractCommand`1.ServiceControl.Config.Framework.Commands.ICommand<T>.Execute(T obj)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Documents.Hyperlink.OnClick()
   at System.Windows.Documents.Hyperlink.DoUserInitiatedNavigation(Object sender)
   at System.Windows.Documents.Hyperlink.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Analysis

When we changed the way packaging works, we switched zip library (from 3rd party to built-in) and it uses \ instead of / in it's zip entries. This caused an issue with the way we extracted the ServiceControl and Monitoring executable to get their release date during installation. To counter this, we updated the way we extract these exes. Although only ServiceControl packaging changed, we made the change for ServiceControl and Monitoring to keep them consistent.

Unfortunately, the Monitoring executable appears in the zip file multiple times. If we extract the wrong one first, it will end up in the wrong temp folder and the system will throw an exception when it tries to tidy up.

@mikeminutillo mikeminutillo added the Bug label Jun 5, 2019

@mikeminutillo mikeminutillo self-assigned this Jun 5, 2019

@mikeminutillo mikeminutillo added this to the 3.8.1 milestone Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.