SmartHotel360 - 物联网项目未部署(数字双胞胎资源产生错误400错误请求) [英] SmartHotel360 - IoT Project Does Not Deploy (Digital Twins Resource Produces Error 400 Bad Request)

查看:124
本文介绍了SmartHotel360 - 物联网项目未部署(数字双胞胎资源产生错误400错误请求)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我最近潜入Azure IoT和Digital Twins空间,开始学习和发现,我一直在努力复制SmartHotel360 - 物联网项目:https://github.com/microsoft/SmartHotel360-IoT 说明
清晰简洁,我已经完成了所有这些(据我所知)和我我目前正处于Azure项目及其资源的部署阶段。在Github Repo上,我在名为"Azure中的资源配置"的部分中。不幸的是,
这个阶段是我遇到一些问题的地方,我希望Azure IoT社区可以帮助我解决。


我打开了我的Windows Powershell并导航到了/ Source / ARM /文件夹运行以下内容:


./ deploy.ps1 -subscriptionId {my_subscription_id} -resourceGroupName {my_resource_group_name} -resourceGroupLocation {my_resource_group_location} -clientId {my_app_id } -clientSecret {my_app_key} -clientServicePrincipalId {my_service_principal_id}
-aksServicePrincipalId {my_AKS_Service_Principal_App_Id} -aksServicePrincipalKey {my_AKS_Service_Principal_password}


注意:my_xxxx_xxxx_xxxx只是实际ID的占位符。


之后,我收到以下状态更新:


登录...

注意,我们已经启动了一个浏览器供您登录。有关设备代码的旧体验,请使用"az login --use-device-code"

您已登录。现在让我们查找您的所有订阅有权访问...

[

  {

    "cloudName":"AzureCloud",

    " id":" xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

    "isDefault":真实,

    "姓名":"即用即付",

    "州":"启用",

    " tenantId":" xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

    "user":{

      "name":" john_doe@email.com" ;,

      "type":"" user"

    }

  }

]

选择订阅'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

使用现有资源组"{my_app_name}"

在xx / xx / 20xx xx开始部署:xx:xx(当地时间) )...



在家中的天蓝色方面>资源组> {my_app_name}> SmartHotel360-IoT-Demo - 概述,资源开始逐个显示,但是一旦Azure尝试启动/创建资源sh360iot-DigitalTwins-xxxxxxxxxxxxx,它在1秒
后崩溃并产生以下错误消息:


操作详情



操作ID:  xxxxxxxxxxxxxxxx

$
追踪ID:  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx



状态:  BadRequest
$


状态留言  {

  "code":"BadRequest",

  "message":"Subscription"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'已达到最大"1"个实例。有关详细信息,请访问https://aka.ms/dtlimits。",

  "详情":{

    "代码":400

  }

}



提供状态: 失败
$


TIMESTAMP:  xx / xx / 20xx,xx:xx:xx AM



DURATION:  1秒



类型:  Microsoft.IoTSpaces / Graph



资源ID:  / subscriptions / xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / resourceGroups / {my_app_name} /providers/Microsoft.IoTSpaces/Graph/sh360iot-DigitalTwins-xxxxxxxxxxxx



资源:  sh360iot-DigitalTwins-xxxxxxxxxxxx



然后在我的Windows Powershell端,我收到以下信息:


部署失败。相关ID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx。 {

  "code":"BadRequest",

  "message":"Subscription"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'已达到最大"1"个实例。有关详细信息,请访问https://aka.ms/dtlimits。",

  "详情":{

    "代码":400

  }

}

C:\ Users \ {my_username} \Documents \ {my_project_folder} \ SmartHotel360-IoT-master\Source\ARM\deploy.ps1:您无法在空值表达式上调用方法。

在行:1 char:1

+ ./deploy.ps1 -subscriptionId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -re ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ <
  &NBSP; + CategoryInfo:InvalidOperation :( :) [deploy.ps1],RuntimeException

  &NBSP; + FullyQualifiedErrorId:InvokeMethodOnNull,deploy.ps1


我一直坚持这两个错误:


- 错误400错误请求:订阅xxxxx已达到最大'1'个实例。有关详细信息,请访问https://aka.ms/dtlimits。


- deploy.ps1:您无法在空值表达式上调用方法...


我在网上到处查找,但我找不到解决这两个错误的解决方案。至于错误400问题,我尝试提高我的Azure Pay-as-you-go订阅的配额,但我在他们的
资源列表中找不到IoT Graph或Digital Twins以提高配额。我一直在尝试剖析deploy.ps1文件和相关的.json文件(template.json,parameters.json和UserAADObjectIds.json也在/ Source / ARM /中),到目前为止我一直在达到死胡同。  ;


有没有人尝试过重复这个项目,并愿意伸出援助之手?即使您没有任何帮助也欢迎。提前谢谢。 

解决方案

您好,Synovial,


支持此示例由aka.ms/AzureAppDev人员的GITHUB。 我将通过电子邮件向他们发送此论坛问题的链接,但由于这是特定于该回购,您应该可以解决有关该回购的问题。


此致,


IoTGirl


Hello all,

I've been diving into the Azure IoT and Digital Twins space recently and to kick off my quest of learning and discovery, I've been trying to duplicate the SmartHotel360 - IoT Project at: https://github.com/microsoft/SmartHotel360-IoT The instructions are clear and concise and I have completed them all (to my knowledge at least) and I am currently at the stage of deploying the project and its resources at Azure. On the Github Repo, I am at the section called: "Provision Resources in Azure". Unfortunately, this stage is where I am having some issues and am hoping that the Azure IoT community may help me resolve.

I opened up my Windows Powershell and navigated to where the /Source/ARM/ folder was and ran the following:

./deploy.ps1 -subscriptionId {my_subscription_id} -resourceGroupName {my_resource_group_name} -resourceGroupLocation {my_resource_group_location} -clientId {my_app_id} -clientSecret {my_app_key} -clientServicePrincipalId {my_service_principal_id} -aksServicePrincipalId {my_AKS_Service_Principal_App_Id} -aksServicePrincipalKey {my_AKS_Service_Principal_password}

Note: my_xxxx_xxxx_xxxx are just place holders for actual ids.

Afterwards, I receive the following status updates:

Logging in...
Note, we have launched a browser for you to login. For old experience with device code, use "az login --use-device-code"
You have logged in. Now let us find all the subscriptions to which you have access...
[
  {
    "cloudName": "AzureCloud",
    "id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "isDefault": true,
    "name": "Pay-as-you-go",
    "state": "Enabled",
    "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "user": {
      "name": "john_doe@email.com",
      "type": "user"
    }
  }
]
Selecting subscription 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
Using existing resource group '{my_app_name}'
Starting deployment at xx/xx/20xx xx:xx:xx (local time)...

On the azure side at Home>Resource Groups>{my_app_name}>SmartHotel360-IoT-Demo-Overview, resources start being displayed one by one, however once Azure tried to launch/create resource sh360iot-DigitalTwins-xxxxxxxxxxxxx it crashed after 1 second and produces the following error message:

Operation details

OPERATION ID:  xxxxxxxxxxxxxxxx

TRACKING ID:  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

STATUS:  BadRequest

STATUS MESSAGE  {
  "code": "BadRequest",
  "message": "Subscription 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' has reached maximum '1' instances. Please visit https://aka.ms/dtlimits for details.",
  "details": {
    "code": 400
  }
}

PROVISIONING STATE:  Failed

TIMESTAMP:  xx/xx/20xx, xx:xx:xx AM

DURATION:  1 second

TYPE:  Microsoft.IoTSpaces/Graph

RESOURCE ID:  /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/{my_app_name}/providers/Microsoft.IoTSpaces/Graph/sh360iot-DigitalTwins-xxxxxxxxxxxx

RESOURCE:  sh360iot-DigitalTwins-xxxxxxxxxxxx

Then on my Windows Powershell side, I receive the following:

Deployment failed. Correlation ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. {
  "code": "BadRequest",
  "message": "Subscription 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' has reached maximum '1' instances. Please visit https://aka.ms/dtlimits for details.",
  "details": {
    "code": 400
  }
}
C:\Users\{my_username}\Documents\{my_project_folder}\SmartHotel360-IoT-master\Source\ARM\deploy.ps1 : You cannot call a method on a null-valued expression.
At line:1 char:1
+ ./deploy.ps1 -subscriptionId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -re ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: InvalidOperation: (:) [deploy.ps1], RuntimeException
    + FullyQualifiedErrorId: InvokeMethodOnNull,deploy.ps1

I've been stuck on these 2 errors:

- Error 400 Bad Request: Subscription xxxxx has reached maxium '1' instances. Please visit https://aka.ms/dtlimits for details.

- deploy.ps1: You cannot call a method on a null-valued expression...

I've looked everywhere on the web and I have not been able to find a solution to resolve these 2 errors. As for the error 400 issue, I tried raising the quota on my Azure Pay-as-you-go subscription but I couldn't find the IoT Graph or Digital Twins in their list of resources to raise the quota on. I've been trying to dissect the deploy.ps1 file and related .json files (template.json, parameters.json, and UserAADObjectIds.json also in /Source/ARM/) and I've been hitting dead ends so far. 

Has anyone tried duplicating this project before and would be willing to lend a hand? Even if you haven't any assistance is welcomed. Thank you in advance. 

解决方案

Hi Synovial,

This sample is supported on GITHUB by the aka.ms/AzureAppDev folks.  I will email them a link to this forum question but as this is specific to that repo you should likely address questions on it's usage there.

Sincerely,

IoTGirl


这篇关于SmartHotel360 - 物联网项目未部署(数字双胞胎资源产生错误400错误请求)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆