“连接字符串缺少属性:SharedAccessKeyName”

时间:2018-03-31 11:00:20

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

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(错误+键);                 ^ ArgumentError:连接字符串缺少属性:SharedAccessKeyName     at /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)     at 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)     at 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

1 个答案:

答案 0 :(得分:0)

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