我正在尝试使用terraform通过VMSS,VNET,NSG等的组合来创建服务结构集群。不幸的是,还没有正式的服务结构的terraform提供商,所以我通过{使用ARM模板{1}}。
所有资源都是通过azurerm_template_deployment
成功创建的,我可以将RDP导入到规模集中的其中一个虚拟机中。不幸的是,即使在30-60分钟之后,Azure Portal for Service Fabric资源状态也会显示terraform apply
而表中没有显示任何节点。
当我进入虚拟机时,我在事件查看器中看到了几个警告/错误事件。所有活动均来自Waiting for nodes
:
ServiceFabricNodeBootstrapAgent
Info: Bootstrapping local node
Info: PUT https://westus.servicefabric.azure.com/runtime/clusters/GUID_redacted/nodes/node_name_redacted
{"nodeTypeRef":"fronend","ipAddress":"192.168.0.8","faultDomain":"fd:/4","upgradeDomain":"4"}
Using client certificate: [Version]
V3
[Subject]
CN=AzureServiceFabric-AnonymousClient
Simple Name: AzureServiceFabric-AnonymousClient
DNS Name: AzureServiceFabric-AnonymousClient
[Issuer]
CN=AzureServiceFabric-AnonymousClient
Simple Name: AzureServiceFabric-AnonymousClient
DNS Name: AzureServiceFabric-AnonymousClient
... etc ...
ERROR: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Azure.ServiceFabric.Extension.Core.RestClient.Invoke(Uri requestUri, String method, String requestBody, X509Certificate2 clientCertificate)
System.Exception: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Azure.ServiceFabric.Extension.Core.RestClient.Invoke(Uri requestUri, String method, String requestBody, X509Certificate2 clientCertificate)
at Microsoft.Azure.ServiceFabric.Extension.Core.RestClient.Invoke(Uri requestUri, String method, String requestBody, List`1 clientCertificates)
at Microsoft.Azure.ServiceFabric.Extension.Core.RestClient.Invoke(Uri requestUri, String method, String requestBody, List`1 clientCertificates)
at Microsoft.Azure.ServiceFabric.Extension.Core.WrpTopologyService.UpdateNodeInfo(String machineName, NodeDescription nodeDescription)
at System.Threading.Tasks.Task.Execute()
ERROR: Microsoft.Azure.ServiceFabric.Extension.Core.AgentException: Unable to send node information
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.<RunOnce>d__11.MoveNext()
似乎安装了Windows服务,但就是这样。没有安装任何服务结构运行时服务,我甚至不确定为什么使用该API,或者为什么它返回401.那里的任何人都看到了这个问题?
从市场创建集群以及通过PowerShell导出的ARM模板可以正常工作。