无法加入Workflow Farm(Add-WFHost)

时间:2015-05-04 06:31:46

标签: workflow-foundation-4 workflow-foundation servicebus workflow-manager-1.x

我最近

  1. 已安装Workflow Manager Cumulative Update 2
  2. 升级服务器总线从1.0到1.1
  3. 现在当我尝试加入WF Farm时,我收到401错误说

      

    远程服务器返回错误:(401)未经授权。管理索赔   此操作需要...

    有趣的是,我可以加入SB Farm,但不是WF农场。

    以下是WF PowerShell的输出:

    PS C:\Program Files\Workflow Manager\1.0> Add-WFHost -WFFarmDBConnectionStringData 'Source=sqlserver;Initial Catalog=WFManagement;Integrated Security=True;Encryt=False' -RunAsPassword $RunAsPassword -EnableFirewallRules $true -SBClientConfiguration $SBClientConfiguration -CertificateAutoGenerationKey $CertificateAutoGenerationKey -Verbose;
    
    VERBOSE: [04-05-2015 07:05:32]: Validating input and configuration parameters.
    VERBOSE: [04-05-2015 07:05:33]: Installing auto-generated certificate.
    VERBOSE: [04-05-2015 07:05:36]: Granting 'Log on as Service' privilege to the RunAs account.
    VERBOSE: [04-05-2015 07:05:36]: Workflow Manager configuration starting.
    VERBOSE: [04-05-2015 07:05:37]: Configuring Workflow Manager runtime settings.
    Add-WFHost : The remote server returned an error: (401) Unauthorized. Manage cl
    aim is required for this operation..TrackingId:653bd8b8-5061-4f3a-809a-cd7fd4b9
    b665_Gunopsdk576903,TimeStamp:04-05-2015 05:05:38
    At line:1 char:1
    + Add-WFHost -WFFarmDBConnectionString 'Data Source=sqlserver;Initial Catalog=WFM
    ana ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : OperationStopped: (:) [Add-WFHost], Unauthorized
       AccessException
        + FullyQualifiedErrorId : WFRuntimeSettingFailed,Microsoft.Workflow.Deploy
       ment.Commands.AddWFHost
    

    任何指针?

1 个答案:

答案 0 :(得分:4)

经过2天的挣扎和辱骂之后,我终于找到了问题 - WorkflowDefaultNamespace(这是Service Bus命名空间)在ManageUsers列表中没有我的帐号:

PS > Get-SBNamespace -Name WorkflowDefaultNamespace

SubscriptionId        : 00000000000000000000000000000000
State                 : Active
Name                  : WorkflowDefaultNamespace
AddressingScheme      : Path
CreatedTime           : 17-02-2015 14:31:09
IssuerName            : WorkflowDefaultNamespace
IssuerUri             : WorkflowDefaultNamespace
ManageUsers           : {wf@crp, johnsmith@crp}
DnsEntry              :
PrimarySymmetricKey   : ******************************
SecondarySymmetricKey :

基本上我的帐户 niaher @ crp 不在列表中。

解决方案很简单:

Set-SBNamespace -Name WorkflowDefaultNamespace -ManageUsers @('wf@crp', 'johnsmith@crp', 'niaher@crp')

现在我可以Add-WFHost成功加入农场。如果我能回到我的2天......