【问题标题】:"The connection string is missing the property: SharedAccessKeyName"“连接字符串缺少属性:SharedAccessKeyName”
【发布时间】:2018-04-03 01:55:14
【问题描述】:

enter image description here

pi@raspberrypi:~ $ iothub-explorer login HostName=roomautomation.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

/usr/local/lib/node_modules/iothub-explorer/node_modules/azure-iot-common/lib/connection_string.js:28 抛出新的错误_1.ArgumentError(err + key); ^ ArgumentError:连接字符串缺少属性:SharedAccessKeyName 在 /usr/local/lib/node_modules/iothub-explorer/node_modules/azure-iot-common/lib/connection_string.js:28:23 在 Array.forEach () 在 Function.ConnectionString.parse (/usr/local/lib/node_modules/iothub-explorer/node_modules/azure-iot-common/lib/connection_string.js:26:24) 在 Object.parse (/usr/local/lib/node_modules/iothub-explorer/node_modules/azure-iothub/lib/connection_string.js:17:48) 在对象。 (/usr/local/lib/node_modules/iothub-explorer/iothub-explorer-login.js:33:27) 在 Module._compile (module.js:649:30) 在 Object.Module._extensions..js (module.js:660:10) 在 Module.load (module.js:561:32) 在 tryModuleLoad (module.js:501:12) 在 Function.Module._load (module.js:493:3) 在 Function.Module.runMain (module.js:690:10) 启动时(bootstrap_node.js:194:16) 在 bootstrap_node.js:666:3

【问题讨论】:

  • 你可以尝试在连接字符串两边加双引号(" ")看看是否有效。

标签: raspberry-pi3 raspbian azure-iot-hub


【解决方案1】:

Rita 的评论是正确的,您需要在连接字符串周围添加引号,否则 bash 会将第一个 ; 字符视为命令的结尾。

【讨论】:

    猜你喜欢
    • 2013-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-22
    • 2019-04-12
    相关资源
    最近更新 更多