2

我正在尝试使用事件中心的捕获功能存储在启用了 Data Lake Storage Gen2 的存储帐户 v2 中。在门户中,选择存储帐户后,容器不显示,我无法创建新容器。在 Azure CLI 中,我运行了以下命令:

az eventhubs eventhub update -n hubtest --namespace-name #removed# -g #removed# --enable-capture True --capture-interval 300 --capture-size-limit 262144000 --storage-account #removed# --blob-container #removed# --destination-name capturetest

我收到以下错误:

'NoneType' object has no attribute 'enabled'
Traceback (most recent call last):File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in execute raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 386, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 379, in _run_job six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 356, in _run_job result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__ return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 477, in handler instance = custom_function(instance=instance, **custom_func_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/eventhubs/custom.py", line 112, in cli_eheventhub_update instance.capture_description.enabled = enabled
AttributeError: 'NoneType' object has no attribute 'enabled'
4

2 回答 2

1

只要您首先使用Data Lake Storage Gen2创建了 Azure 存储帐户- 请参阅以下门户中的图像:

[在存储帐户上启用 Data Lake Storage Gen2] https://i.stack.imgur.com/J55kC.png

然后,您可以只使用“Azure 存储”作为捕获提供程序并继续选择存储帐户容器 - 请参阅下面门户中的图像:[存储帐户选择] https://i.stack.imgur.com/FhI1x.png

注意* 如果您还没有配置容器,作为选择过程步骤的一部分,您将被要求这样做。

我知道一个老问题,但我今天需要这样做。希望能帮助到你。

参考https ://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-capture-enable-through-portal

于 2021-02-10T16:12:38.310 回答
1

我可以重现您的问题,似乎不支持使用 Data Lake Gen2 启用 Azure Event Hubs Capture,请记住 Data Lake Gen2 处于预览状态。

请参阅此链接:https ://docs.microsoft.com/en-gb/azure/storage/blobs/data-lake-storage-upgrade?toc=%2fazure%2fstorage%2fblobs%2ftoc.json#azure-ecosystem

在此处输入图像描述

于 2019-02-06T06:12:46.720 回答