Azure / Azure/azure-iot-cli-extension
Not able to monitor by IoT hub with az iot hub monitor-events
- Dominant language
- Python
- Stars
- 88
- Forks
- 78
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
I am not able to monitor my IoT hub with the Azure CLI command...
`az iot hub monitor-events -n "IoT hub name" --login "Connect String"`
When I try to do the same I get the following error...
`Starting` event monitor, use ctrl-c to stop...
Failed to open Message Receiver. Please confirm credentials and target URI.
The command failed with an unexpected error. Here is the traceback:
Failed to open Message Receiver. Please confirm credentials and target URI.
Traceback (most recent call last):
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\knack\knack\cli.py", line 206, in invoke
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\commands\__init__.py", line 575, in execute
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\commands\__init__.py", line 633, in _run_jobs_serially
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\commands\__init__.py", line 626, in _run_job
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\six\six.py", line 693, in reraise
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\commands\__init__.py", line 603, in _run_job
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\commands\__init__.py", line 305, in __call__
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-76yvurxi\azure-cli-core\azure\cli\core\__init__.py", line 470, in default_command_handler
File "C:\Users\e452034\.azure\cliextensions\azure-cli-iot-ext\azext_iot\operations\hub.py", line 1332, in iot_hub_monitor_events
devices=device_ids)
File "C:\Users\e452034\.azure\cliextensions\azure-cli-iot-ext\azext_iot\operations\events3\_events.py", line 66, in executor
raise RuntimeError(error)
RuntimeError: Failed to open Message Receiver. Please confirm credentials and target URI.`
Note: I have also tried to monitor my IoT hub via iothub-explorer and Service bus explorer. But I am also not able to monitor with them as well.
I am able to do other things though hence there seems to be no issue with the connection string I am using.
Contributor guide
Research direction
Reproduce the failure with `az iot hub monitor-events` and the connection string described in the issue. Trace the command through `azext_iot/operations/hub.py` and `azext_iot/operations/events3/_events.py`, then compare the receiver failure with the reported traceback. Done means the command can open the Message Receiver or reports a clear, actionable credential or target-URI error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100