# Neo4j: Checkpoint failed Failed to flush

**URL:** <https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376>\
**Category:** Docker\
**Tags:** azure\
**Created:** [May 30, 2020, 2:24am UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376 "2020-05-30T02:24:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![krls.lrg](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/krls.lrg/32/5292_2.png) [@krls.lrg](https://community.neo4j.com/u/krls.lrg)\
**Post date:** [May 30, 2020, 2:24am UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376/1 "2020-05-30T02:24:51Z")

</div>

I've a container instance in azure and have the `data` volume mounted in a File Share. The database starts correctly but after adding some node and doing some queries it starts to fail and throw the followin error

```auto
2020-05-13 02:58:44.929+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by "Scheduled checkpoint for time threshold" @ txId: 1490 checkpoint started...
2020-05-13 02:58:45.243+0000 INFO [o.n.k.i.s.c.CountsTracker] Rotated counts store at transaction 1490 to [/data/databases/graph.db/neostore.counts.db.a], from [/data/databases/graph.db/neostore.counts.db.b].
2020-05-13 02:58:45.302+0000 ERROR [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint failed Failed to flush
org.neo4j.kernel.impl.store.UnderlyingStorageException: Failed to flush
    at org.neo4j.kernel.impl.store.NeoStores.flush(NeoStores.java:257)
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.flushAndForce(RecordStorageEngine.java:421)
    at org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointerImpl.doCheckPoint(CheckPointerImpl.java:179)
    at org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointerImpl.checkPointIfNeeded(CheckPointerImpl.java:153)
    at org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointScheduler$1.run(CheckPointScheduler.java:65)
    at org.neo4j.kernel.impl.scheduler.ScheduledJobHandle.lambda$new$0(ScheduledJobHandle.java:83)
    at org.neo4j.kernel.impl.scheduler.ThreadPool.lambda$submit$0(ThreadPool.java:57)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: java.util.concurrent.ExecutionException: java.io.UncheckedIOException: java.io.IOException: Permission denied
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.flushAllPagesParallel(MuninnPageCache.java:649)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.flushAndForce(MuninnPageCache.java:605)
    at org.neo4j.kernel.impl.store.NeoStores.flush(NeoStores.java:253)
    ... 11 more
Caused by: java.util.concurrent.ExecutionException: java.io.UncheckedIOException: java.io.IOException: Permission denied
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.neo4j.kernel.impl.scheduler.PooledJobHandle.waitTermination(PooledJobHandle.java:59)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.flushAllPagesParallel(MuninnPageCache.java:645)
    ... 13 more
Caused by: java.io.UncheckedIOException: java.io.IOException: Permission denied
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.lambda$flushAllPagesParallel$0(MuninnPageCache.java:635)
    ... 6 more
Caused by: java.io.IOException: Permission denied
    at sun.nio.ch.FileDispatcherImpl.writev0(Native Method)
    at sun.nio.ch.FileDispatcherImpl.writev(FileDispatcherImpl.java:72)
    at sun.nio.ch.IOUtil.write(IOUtil.java:148)
    at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:239)
    at java.nio.channels.FileChannel.write(FileChannel.java:414)
    at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.lockPositionWriteVectorAndRetryIfInterrupted(SingleFilePageSwapper.java:546)
    at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.writePositionedVectoredToFileChannel(SingleFilePageSwapper.java:514)
    at org.neo4j.io.pagecache.impl.SingleFilePageSwapper.write(SingleFilePageSwapper.java:492)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPagedFile.vectoredFlush(MuninnPagedFile.java:467)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPagedFile.doFlushAndForceInternal(MuninnPagedFile.java:440)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPagedFile.flushAndForceInternal(MuninnPagedFile.java:363)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.flushFile(MuninnPageCache.java:659)
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.lambda$flushAllPagesParallel$0(MuninnPageCache.java:631)
    ... 6 more

```

Does anyone have faced this problem, I just mount the file share as described in the azure docs:  
[Mount an Azure file share in Azure Container Instances](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files)

---

<div class="post-metadata">

**Author:** ![krls.lrg](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/krls.lrg/32/5292_2.png) [@krls.lrg](https://community.neo4j.com/u/krls.lrg)\
**Post date:** [May 30, 2020, 2:28am UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376/2 "2020-05-30T02:28:56Z")

</div>

I've read this post about common problems on file shares [Troubleshoot Azure Files problems in Linux](https://docs.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-linux-file-connection-problems) and disabled [Secure transfer required](https://docs.microsoft.com/en-us/azure/storage/common/storage-require-secure-transfer) but it does not seem to fix the problem

---

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [May 30, 2020, 9:04am UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376/3 "2020-05-30T09:04:33Z")

</div>

> [@krls.lrg](#):
>
> `data` volume mounted in a File Share

It's not recommended to use a remote filesystem for the data mount point. What filesystem is used here?

---

<div class="post-metadata">

**Author:** ![krls.lrg](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/krls.lrg/32/5292_2.png) [@krls.lrg](https://community.neo4j.com/u/krls.lrg)\
**Post date:** [June 8, 2020, 10:24pm UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376/4 "2020-06-08T22:24:19Z")

</div>

File shares are mounted using: Server Message Block (SMB) protocol

---

<div class="post-metadata">

**Author:** ![krls.lrg](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/krls.lrg/32/5292_2.png) [@krls.lrg](https://community.neo4j.com/u/krls.lrg)\
**Post date:** [June 8, 2020, 10:25pm UTC](https://community.neo4j.com/t/neo4j-checkpoint-failed-failed-to-flush/19376/5 "2020-06-08T22:25:22Z")

</div>

I've updated the image version to 4.0 and the error is not occurring anymore
