dkim-exchange icon indicating copy to clipboard operation
dkim-exchange copied to clipboard

Microsoft Exchange Transport will not start when Exchange DkimSigner is enabled

Open ModernAesthetics opened this issue 5 years ago • 48 comments

Versions

  • Windows Server Version: Windows Server 2008 R2 Standard
  • Exchange Version: Exchange Server 2010 14.3.123.4
  • Installed DKIM Exchange Version: 3.2.0

Description

Microsoft Exchange Transport will not start when Exchange DkimSigner is enabled.

Steps to Reproduce

Download the dkim-exchange-3.2.0.zip and extract to Desktop Open "Exchange Management Shell" Powershell CMD: Set-ExecutionPolicy Unrestricted CD into the folder where the zip has been extracted. Execute the install script .\install.ps1 Run Configuration.DkimSigner.exe and configure Domain Enter to finish (Transport will not start and Conifuration.DkimSigner.exe hangs up)

If I disable the Exchange DkimSigner in the configuration transport starts just fine.

ModernAesthetics avatar Jun 25 '19 17:06 ModernAesthetics

Updated to the latest rollup for Exchange 2010 and still the same results.

ModernAesthetics avatar Jun 28 '19 23:06 ModernAesthetics

Hey @ModernAesthetics

I just spun up a test 2010 environment and can't seem to reproduce the issue using the GUI installer on pre-release version. What .NET framework versions do you have installed?

sarthurdev avatar Sep 02 '19 23:09 sarthurdev

I have .NET 4.7.2 and it doesn't work either.

mattidp avatar Sep 15 '19 15:09 mattidp

Configuration.DkimSigner.exe also displays errors about getting Exchange version and running powershell.

mattidp avatar Sep 15 '19 15:09 mattidp

Are you using the latest pre-release and getting this issue?

sarthurdev avatar Sep 15 '19 15:09 sarthurdev

I am getting with both 1.1 and pre-release.

Best Regards, Matthew J. Rainoff www.IDP.Nethttp://www.IDP.Net 703-591-7118 571-436-6327

On Sun, Sep 15, 2019 at 11:42 AM -0400, "Simon" <[email protected]mailto:[email protected]> wrote:

Are you using the latest pre-release and getting this issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Pro/dkim-exchange/issues/266?email_source=notifications&email_token=AEIK3TIQM62EHKF2OTGIKODQJZJ6BA5CNFSM4H3KX5YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XTLAQ#issuecomment-531576194, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEIK3TL2NZQBEU25CGA3MU3QJZJ6BANCNFSM4H3KX5YA.

mattidp avatar Sep 15 '19 15:09 mattidp

When I run Configuration.DkimSigner.exe: First error is "Couldn't determine installed Exchange Version: Couldn't initialize PowerShell runspace."

mattidp avatar Sep 15 '19 18:09 mattidp

What would stop PowerShell runspace? That seems to be the key to all dysfunction.

mattidp avatar Sep 15 '19 19:09 mattidp

Here is what I get when I try to do anything with Configuration.DkimSigner.exe even in Visual Studio Debug mode: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text ************** Configuration.DkimSigner.Exchange.ExchangeServerException: Couldn't initialize PowerShell runspace. at Configuration.DkimSigner.Exchange.ExchangeServer.GetInstalledVersion() in C:\Users\Administrator\Desktop\dkim-exchange\Src\Configuration.DkimSigner\Exchange\ExchangeServer.cs:line 33 at Configuration.DkimSigner.InstallWindow.<CheckExchangeInstalled>b__13_0() in C:\Users\Administrator\Desktop\dkim-exchange\Src\Configuration.DkimSigner\InstallWindow.cs:line 145 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Configuration.DkimSigner.InstallWindow.<CheckExchangeInstalled>d__13.MoveNext() in C:\Users\Administrator\Desktop\dkim-exchange\Src\Configuration.DkimSigner\InstallWindow.cs:line 145 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

mattidp avatar Sep 16 '19 16:09 mattidp

Same with all versions including 8/29/2019 build/

mattidp avatar Sep 16 '19 16:09 mattidp

The only timed I reproduced that error was on a server without Exchange installed. The section of code where it's throwing the exception is where it runs the cmdlet "Get-ExchangeServer" after loading the Exchange Powershell to fetch the Exchange version.

Is the Exchange Management Shell working properly on the server?

sarthurdev avatar Sep 16 '19 19:09 sarthurdev

Yes, the Exchange Management Shell is working properly, but the C# Powershell run method is not. It must be something on my machine since it’s consistent across all builds. I just don’t know how to report the problem to Microsoft. I have support tokens. What specific .NET Powershell object could cause that?

From: Simon [mailto:[email protected]] Sent: Monday, September 16, 2019 3:47 PM To: Pro/dkim-exchange [email protected] Cc: Matthew J. Rainoff [email protected]; Comment [email protected] Subject: Re: [Pro/dkim-exchange] Microsoft Exchange Transport will not start when Exchange DkimSigner is enabled (#266)

The only timed I reproduced that error was on a server without Exchange installed. The section of code where it's throwing the exception is where it runs the cmdlet "Get-ExchangeServer" after loading the Exchange Powershell to fetch the Exchange version.

Is the Exchange Management Shell working properly on the server?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Pro/dkim-exchange/issues/266?email_source=notifications&email_token=AEIK3TNP5B3CPDSVZWM5IF3QJ7PDXA5CNFSM4H3KX5YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD62JTLQ#issuecomment-531929518, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEIK3TNKKZ2SVIEX7GMYCMLQJ7PDXANCNFSM4H3KX5YA.

mattidp avatar Sep 16 '19 19:09 mattidp

I tested the classes that are called to get Get-ExchangeServer to work and it fails on every Windows 2008 R2 Server with Exchange 2010. All servers have fully operational Exchange Powershell.

mattidp avatar Sep 17 '19 17:09 mattidp

Works fine on Exchange 2013.

mattidp avatar Sep 17 '19 17:09 mattidp

DKIMTEST.exe.zip

Test for Get-ExchangeServer working.

mattidp avatar Sep 17 '19 17:09 mattidp

image

In my VM running the eval of 2008 R2 + Exchange 2010 SP3, I can't reproduce this issue.

sarthurdev avatar Sep 17 '19 18:09 sarthurdev

So am I using the wrong version of your program or what? The console app I built was from the 4/29 code and an older dll for automation. If you run it it should return the Get I tried it on two Exchange 2010 servers, one VM and one physical box and both failed. The console app I wrote used the code from GitHub and should return the Get-ExchangeServer value.

mattidp avatar Sep 17 '19 18:09 mattidp

Can you please direct me to the link to download the latest source or builds? Thanks for trying.

mattidp avatar Sep 17 '19 19:09 mattidp

Builds and source for versions are here: https://github.com/Pro/dkim-exchange/releases

sarthurdev avatar Sep 17 '19 19:09 sarthurdev

@mattidp the problem must not be investigated as the only one thng to do is upgrade to 2016 server and exchange at least.

boscorelly avatar Oct 03 '19 16:10 boscorelly

@mattidp the problem must not be investigated as the only one thng to do is upgrade to 2016 server and exchange at least.

If the program supports 2008 R2 and Exchange 2010 as it appears to, I would prefer to find out why on two different machines installed at different times the same symptoms occur. Upgrading OS and especially Exchange Server is not a small task.

mattidp avatar Oct 03 '19 17:10 mattidp

Depending on how much mailboxes you have, it’s really quick ! Less than 24h from 2010 to 2016, and 80 mailboxes (1Tb). You have 3 months to migrate. Don’t waste your time...

boscorelly avatar Oct 03 '19 22:10 boscorelly

Thanks for your opinion. If my customers want to spend that much money to get DKIM to work, you are correct. You must not pay for software :) SPF works without add-on functionality.

mattidp avatar Oct 04 '19 03:10 mattidp

You MUST inform them the risks after the 14 jan 2020.

being on 2008 past this date it suicidal...

boscorelly avatar Oct 04 '19 19:10 boscorelly

Hello, I have exactly the same issue. I mean after the installation, the transport service is not restarting (unless I disable the Exchange DkimSigner). In the event log I get the watson error: Le rapport Watson est prêt à être envoyé pour l'ID de processus : 13516, avec les paramètres : E12, c-RTL-AMD64, 14.01.0438.000, edgetransport, ExchangeDkimSigner, E.D.DkimSigningRoutingAgentFactory..ctor, S.Reflection.TargetInvocationException, 6d6d, 03.02.0000.-001. ErrorReportingEnabled : False

marcwaz avatar Jan 04 '20 08:01 marcwaz

Please try the latest release and report back. v3.2.3 has been published today.

DJBenson avatar Jan 07 '20 18:01 DJBenson

Still does not work, but the good new is it doesn't crash Exchange Transport service. Just won't recognize Exchange. Still the problem with Powershell runspace. ExchangeDKIMSigner

mattidp avatar Jan 07 '20 18:01 mattidp

So it doesn't seem to be a specific problem with the application then? Given you've written your own console application which also fails, I think that rules out a specific bug with the software but doesn't help you unfortunately.

Did you already try running the command in EMS, and if so, what was the outcome?

Get-ExchangeServer -Identity <hostname> | fl AdminDisplayVersion

EDIT: Escaped the <hostname> parameter as GitHub tried to parse it has HTML.

DJBenson avatar Jan 08 '20 02:01 DJBenson

[PS] C:\Windows>Get-ExchangeServer -Identity | fl AdminDisplayVersion

Get-ExchangeServer : Missing an argument for parameter 'Identity'. Specify a parameter of type 'System.Object' and try again. At line:1 char:29

  • Get-ExchangeServer -Identity <<<< | fl AdminDisplayVersion
    • CategoryInfo : InvalidArgument: (:) [Get-ExchangeServer], ParameterBindingException
    • FullyQualifiedErrorId : MissingArgument,Get-ExchangeServer

mattidp avatar Jan 08 '20 02:01 mattidp

Works without the –Identity :

[PS] C:\Windows>Get-ExchangeServer | fl AdminDisplayVersion

AdminDisplayVersion : Version 14.3 (Build 123.4)

mattidp avatar Jan 08 '20 02:01 mattidp