Cannot start Certify SSL Manager Service

After Launch Certify App :

Certify SSL Manager Service is not started. Please restart the service.

OK, I go to services manager and I start it manually and it says:

Windows cound not start the Certify SSL Manager Service service on Local Computer.
Error 5: Acces denied

In Windows Log (part are in Czech language, I dont know it isn’t in English :thinking:):

Službu nelze spustit. (translation: service cannot start) System.Reflection.TargetInvocationException: Cíl vyvolání způsobil výjimku.(translation:the invocation destination caused an exception ) —> System.ArgumentOutOfRangeException: Hodnota StartIndex nemůže být menší než nula. (value cannot be smaller than zero)
Název parametru: startIndex (name of parameter)
v System.String.Substring(Int32 startIndex, Int32 length)
v Certify.Models.Compat.ACMEVaultUpgrader.GetContact()
v Certify.Management.CertifyManager.PerformUpgrades() v D:\Work\GIT\certify\src\Certify.Core\Management\CertifyManager.cs:řádek 84
v Certify.Management.CertifyManager…ctor() v D:\Work\GIT\certify\src\Certify.Core\Management\CertifyManager.cs:řádek 74
v DynamicMethod(Object[] )
v LightInject.PerContainerLifetime.GetInstance(Func1 createInstance, Scope scope) v LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action1 emitMethod, IEmitter emitter)
v LightInject.ServiceContainer.<>c__DisplayClass147_0.b__0(IEmitter ms)
v LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter)
v LightIn…

Please help, I dont know what next.

Thank you

EDIT:
I forget, I’m using Windows Server 2012 R2

Hi, is that after a new upgrade or has it been working OK for some time?

A workaround in this case would probably be to rename your c:\programdata\acmesharp folder to acmesharp.old. When you then restart the Certify SSL Manager service and re-launch the UI it should prompt you to register your email address with Let’s Encrypt again (you can use the same one).

It’s new installation. So, I never had correct launch of application and service. Rename asmesharp folder doesnt work.

This is error text from application, when it few seconds works (until it detect unstarted service), if I click to new certicate:

An error occurred: System.AggregateException: One or more errors occurred. —> System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Certify.Client.CertifyServiceClient.d__25.MoveNext() in D:\Work\GIT\certify\src\Certify.Client\CertifyServiceClient.cs:line 73
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Certify.Client.CertifyServiceClient.d__46.MoveNext() in D:\Work\GIT\certify\src\Certify.Client\CertifyServiceClient.cs:line 251
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at Certify.UI.ViewModel.AppModel.get_HasRegisteredContacts() in D:\Work\GIT\certify\src\Certify.UI\ViewModel\AppModel.cs:line 111
at Certify.UI.MainWindow.EnsureContactRegistered() in D:\Work\GIT\certify\src\Certify.UI\MainWindow.xaml.cs:line 235
at Certify.UI.MainWindow.<Button_NewCertificate>d__7.MoveNext() in D:\Work\GIT\certify\src\Certify.UI\MainWindow.xaml.cs:line 79
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Certify.UI.App.Main()
—> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
— End of inner exception stack trace —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Certify.Client.CertifyServiceClient.d__25.MoveNext() in D:\Work\GIT\certify\src\Certify.Client\CertifyServiceClient.cs:line 73
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Certify.Client.CertifyServiceClient.d__46.MoveNext() in D:\Work\GIT\certify\src\Certify.Client\CertifyServiceClient.cs:line 251<—

Hi, that’s very unusual - it looks like your settings are corrupted somehow. Can you try backing up and deleting your C:\programdata\acmesharp folder and c:\programdata\certify folder, then restarted the Certify SSL Manager service and the UI. You may want to re-install the app just to be sure that everything has installed OK.

I have uninstalled and installed again many times. I tried stable and beta release. Deleting folders, what you wrote, dont helped. App hasnt any settings, becouse it has never been properly launched.

Could you also try clearing out your windows temp folder (open the %temp% path in windows explorer), even if you just delete what you can. Sometime the temp folder hits a limit of 65535 files (including subfolders) and that causes all sorts of problems.

deleting temp files didnt helped :cry:

Can you confirm what the current error in the event log is? If you don’t have a c:\programdata\acmesharp folder any more then the upgrade issue wouldn’t be able to happen, so I wonder that the current error is?

I have c:\programdata\acmesharp folder.

I’ll start from beginning.

When I launch Certify app, after few seconds I see:


After I click OK, app closes.

When I want start service manually:

In Event Viewer:

Log Name: Application
Source: Certify.Service
Date: 4/25/2018 3:14:06 PM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ----------------------------------
Description:
Službu nelze spustit. System.Reflection.TargetInvocationException: Cíl vyvolání způsobil výjimku. —> System.Net.HttpListenerException: Proces nemá přístup k souboru, neboť jej právě využívá jiný proces
v System.Net.HttpListener.AddAllPrefixes()
v System.Net.HttpListener.Start()
v Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func2 appFunc, IList1 addresses, IDictionary2 capabilities, Func2 loggerFactory)
v Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func2 app, IDictionary2 properties)
— Konec trasování zásobníku pro vnitřní výjimku —
v System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
v System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
v System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
v Microsoft.Owin.Hosting.ServerFactory.Serve…
Event Xml:



0
2
0
0x80000000000000

3921101
Application
----------------------------------



Službu nelze spustit. System.Reflection.TargetInvocationException: Cíl vyvolání způsobil výjimku. —> System.Net.HttpListenerException: Proces nemá přístup k souboru, neboť jej právě využívá jiný proces
v System.Net.HttpListener.AddAllPrefixes()
v System.Net.HttpListener.Start()
v Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func2 appFunc, IList1 addresses, IDictionary2 capabilities, Func2 loggerFactory)
v Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func2 app, IDictionary2 properties)
— Konec trasování zásobníku pro vnitřní výjimku —
v System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
v System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
v System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
v Microsoft.Owin.Hosting.ServerFactory.Serve…

I see, your original error was an exception regarding upgrading settings, but this one says it can’t bind to port 9696 on localhost.

Do you know if you have another app running on that port (if you browse to http://localhost:9696)?

Alternatively try running this command from the command prompt as administrator (to make sure the localhost ip can listen for http connections):

netsh http add iplisten ipaddress=127.0.0.1

I assume if you ping localhost it resolves to 127.0.0.1 and not some other ip address?

Basically the service needs to listen on port 9696 of localhost and if it can’t do that then the service can’t start.

That’s it!

Another app was using port 9696, so I changed the port in that app (something for LDAP synchronization and I hope, that that synchronization will be working) and service is working now.

Thank you.

Great! Making the port configurable is something we will add eventually, ideally we’d also need to the detect that the port is in use, maybe we could then auto binding to a different port instead.

Is there anyone who can summarize all this issue???

I don’t know what is the problem and what should i do???

@homayoonfayaz this issue mostly occurs if another app is using port 9696. If you browse to http://localhost:9696 on the server you might find there is a service there already. If you can change that service to a different port it would help. In the future we will provide a way to start our service on a different port.