0-3 - Unable to access cache path

0-3 - Unable to access cache path

Other modules reuse the file-based caching mechanism from the Common layer (currently the metadata module), while the file cache mechanism in the Common layer cannot access its specified directory.

2022-08-29 00:35:00,189 ERROR [org.apache.dubbo.common.cache.FileCacheStoreFactory:?] -  [DUBBO] Cache store path can't be created: , dubbo version: , current host: 10.0.1.1, error code: 0-3. This may be caused by inaccessible of cache path, go to https://dubbo.apache.org/faq/0/3 to find instructions. 
java.nio.file.FileAlreadyExistsException: [Path]
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:87)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:521)
	at java.base/java.nio.file.Files.createDirectory(Files.java:700)
	at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807)
	at java.base/java.nio.file.Files.createDirectories(Files.java:753)
	at org.apache.dubbo.common.cache.FileCacheStoreFactory.getInstance(FileCacheStoreFactory.java:90)
	...

Possible Causes

  1. Multiple Dubbo processes (or other Java processes) are using the same cache file.
  2. Read and write failures due to file system permission issues in the directory containing the cache file.

Diagnosis and Resolution Steps

  1. Find the inaccessible directory from the actual exception shown below and determine its file access permissions.
  2. Check if there are other Dubbo instances accessing this path.
  3. Try configuring Java System Properties (Java system properties configured with -D) dubbo.meta.cache.filePath and dubbo.mapping.cache.filePath, specifying a directory that the current user can fully control.