Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: 'Error parsing connection string. Please make sure you wrap the connection string with double quotes when supplying it via CLI' #536

Open
RonMatsu opened this issue Oct 12, 2021 · 1 comment

Comments

@RonMatsu
Copy link

RonMatsu commented Oct 12, 2021

I'm getting this error no matter what I try with the command 'iotedgehubdev setup -c ""'.

I'm using double quotes. Even the auto generated command issued by clicking "Setup IoT Edge Simulator" in VS code still generates the error.

command as below but I changed access keys and device names to 'X' chars for privacy:
$ sudo iotedgehubdev setup -c "HostName=XXXXXXX.azure-devices.net;DeviceId=XXXXXXX;x509=true"

auto generated:
$ sudo "iotedgehubdev" setup -c "HostName=XXXXXXX.azure-devices.net;DeviceId=XXXXXXX;x509=true" -i "HostName=XXXXXXX.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="

Thanks.

@marianan
Copy link

marianan commented Oct 26, 2022

Hi @RonMatsu,

The iotedgehubdev tool only supports shared access key authentication to the device in IoT Hub.

Looks like you have created a Edge device entity with X.509 cert. Can you try to create Edge device with Shared Access Key and see if it works?

Your device connection string is -
HostName=XXXXXXX.azure-devices.net;DeviceId=XXXXXXX;x509=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants