装载或访问 Azure Blob 存储时发生故障Failure when mounting or accessing Azure Blob storage

问题Problem

尝试访问已创建的装入点或创建新的装入点时,该操作将失败并显示以下错误:When you try to access an already created mount point or create a new mount point, it fails with the error:

WASB: Fails with java.lang.NullPointerException

原因Cause

当根装载路径(例如 /mnt/)也装载到 Blob 存储时,会发生此错误。This error can occur when the root mount path (such as /mnt/) is also mounted to blob storage. 运行以下命令来检查是否还装载了根路径:Run the following command to check if the root path is also mounted:

dbutils.fs.mounts()

检查列表中是否出现 /mntCheck if /mnt appears in the list.

解决方案Solution

使用以下命令卸载 /mnt/ 装入点:Unmount the /mnt/ mount point using the command:

dbutils.fs.unmount("/mnt")

现在应该能够访问现有的装入点并创建新的装入点。Now you should be able to access your existing mount points and create new ones.