Andrey Gura created IGNITE-8763:
-----------------------------------
Summary: java.nio.file.AccessDeniedException is not handled with
default failure handler
Key: IGNITE-8763
URL: https://issues.apache.org/jira/browse/IGNITE-8763
Project: Ignite
Issue Type: Improvement
Affects Versions: 2.5
Reporter: Andrey Gura
Fix For: 2.6
java.nio.file.AccessDeniedException is not handled with default failure handler
1. Start cluster(4 nodes).
2. Upload some data.
3. Make files in metastore read only.
4. Deactivate grid.
5. Activate grid.
On this step I see java.nio.file.AccessDeniedException:
{noformat}
[17:55:40,035][INFO][exchange-worker-#62][GridCacheDatabaseSharedManager] Read
checkpoint status
[startMarker=/storage/ssd/avolkov/tiden/iep_14-180517-175425/test_iep_14/ignite.server.1/work/db/node1/cp/1526568907638-46128a87-562a-45fc-8d73-75ccb1490d63-START.bin,
endMarker=/storage/ssd/avolkov/tiden/iep_14-180517-175425/test_iep_14/ignite.server.1/work/db/node1/cp/1526568907638-46128a87-562a-45fc-8d73-75ccb1490d63-END.bin]
[17:55:40,037][SEVERE][exchange-worker-#62][GridDhtPartitionsExchangeFuture]
Failed to activate node components
[nodeId=bd7115d5-1f95-4673-9f40-47056b0b1a58, client=false,
topVer=AffinityTopologyVersion [topVer=4, minorTopVer=5]]
class org.apache.ignite.IgniteCheckedException: Error while creating file page
store
[file=/storage/ssd/avolkov/tiden/iep_14-180517-175425/test_iep_14/ignite.server.1/work/db/node1/metastorage/part-0.bin]:
at
org.apache.ignite.internal.processors.cache.persistence.file.FileVersionCheckingFactory.createPageStore(FileVersionCheckingFactory.java:98)
at
org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.initDir(FilePageStoreManager.java:463)
at
org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.initializeForMetastorage(FilePageStoreManager.java:234)
at
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readCheckpointAndRestoreMemory(GridCacheDatabaseSharedManager.java:743)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onClusterStateChangeRequest(GridDhtPartitionsExchangeFuture.java:896)
at
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:643)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.AccessDeniedException:
/storage/ssd/avolkov/tiden/iep_14-180517-175425/test_iep_14/ignite.server.1/work/db/node1/metastorage/part-0.bin
at
sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at
sun.nio.fs.UnixFileSystemProvider.newAsynchronousFileChannel(UnixFileSystemProvider.java:196)
at
java.nio.channels.AsynchronousFileChannel.open(AsynchronousFileChannel.java:248)
at
java.nio.channels.AsynchronousFileChannel.open(AsynchronousFileChannel.java:301)
at
org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIO.<init>(AsyncFileIO.java:57)
at
org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory.create(AsyncFileIOFactory.java:53)
at
org.apache.ignite.internal.processors.cache.persistence.file.AsyncFileIOFactory.create(AsyncFileIOFactory.java:41)
at
org.apache.ignite.internal.processors.cache.persistence.file.FileVersionCheckingFactory.createPageStore(FileVersionCheckingFactory.java:78)
... 9 more
{noformat}
Situation led to NPE exception after AccessDeniedException looks like this:
1. AccessDeniedException was thrown in ExchangeFuture right before affinity
initialization so affinity was never initialized.
2. After that node receives PartitionSingleMessage and tries to access
affinity information. Null is returned because of exception in step #1.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)