OpenClipboard Failed when trying to "Copy master key to clipboard"

Hi.

We’re running “Octopus Deploy 2.0.13.1100”. Every time we click the “Copy master key to clipboard” in the “Octopus Manager” we get the following exception.

Can you fix this, please? Is there any other way to get the master key in the mean time?

Cheers,
Rodolfo

Windows Server 2008 R2 Datacenter, accessing it through Remote Desktop from Windows 7 Service Pack 1.

System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
at Octopus.Tools.OctopusConfiguration.OctopusManagerView.CopyMasterKey(Object sender, EventArgs e) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tools\OctopusConfiguration\OctopusManagerView.xaml.cs:line 116
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
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.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Thanks for reporting this, I’ve reopened an issue to track it here:

Paul

Hi. Thanks for your reply.

In the meantime, is there any other way to get the master key? It would be very risky to continue to operate Octopus without that key at hand.

Cheers,
Rodolfo

Hi Rodolfo,

At the moment no unfortunately. I’ll add something and include it in the next release (we’ll be doing a release in the next few hours).

Paul

Hi Rodolfo,

Actually I was wrong, you can already do this:

octopus.server.exe show-master-key

Paul

Hi.

It didn’t work for me and I don’t see that option. Is it possible it’s a feature from 2.1 (which is in preview and we’re not using yet)?

This is the output from the command you suggested:

C:\Program Files\Octopus Deploy\Octopus>Octopus.Server.exe show-master-key
Octopus Deploy: Server version 2.0.13.1100

Usage: Octopus.Server []

Where is one of:

admin
Reset admin user passwords, re-enable them, and ensure they are in the admin
group
configure
Configure this Octopus instance
create-instance
Registers a new instance of the Octopus service
decrypt-activities
Decrypt local activity information to aid with troubleshooting
delete-instance
Deletes an instance of the Octopus service
help
Prints this help text
license
Import a license key
migrate
Upgrades the Octopus database
proxy
Configure the HTTP proxy used by Octopus
regenerate-certificate
Regenerate one or more of the certificates that Octopus uses to authenticate
to Tentacles and Windows Azure
repair-storage
Rebuild RavenDB indexes and recover the underlying ESENT database
reset-activities
Reset in-progress activities to recover an unresponsive Octopus Server
restore
Restores a backup of the Octopus database
run
Starts the Octopus Server in debug mode
service
Start, stop, install and configure the Octopus service

Or use help for more details.

C:\Program Files\Octopus Deploy\Octopus>

Hi Rodolfo,

Yes, I think you’re right and this is in 2.1 only.

If you can’t upgrade just yet, taking an image of the entire server is the best available option.

Regards,
Nick