# Unexpected state reading from file - stale NFS handle errors

**URL:** https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853
**Category:** Beats
**Tags:** filebeat
**Created:** [April 14, 2020, 5:38am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853 "2020-04-14T05:38:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![msunilreddy](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@msunilreddy](https://discuss.elastic.co/u/msunilreddy)
#### Post date: [April 14, 2020, 5:38am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853/1 "2020-04-14T05:38:10Z")

</div>

Hi Team,  
We have deployed filebeat as docker container for reading log files by volume mounting of logs files from NFS server. We are getting stale NFS handle errors. Could you please help us how to resolve this issue. Is filebeat capable of reading NFS log files using volume mounting in docker containers ? We are using filebeat 7.4.0 version.

ERROR log/log.go:110 Unexpected state reading from /hostfs/opt/caemm/sample.log; error: read /hostfs/opt/caemm/sample.log: stale NFS file handle

Thanks,  
Sunil

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 14, 2020, 5:40am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853/2 "2020-04-14T05:40:43Z")

</div>

Have a lot ok at [this section](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-network-volumes.html) in the documentation.

---

<div class="post-metadata">

### Author: ![msunilreddy](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@msunilreddy](https://discuss.elastic.co/u/msunilreddy)
#### Post date: [April 14, 2020, 5:55am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853/3 "2020-04-14T05:55:56Z")

</div>

Yes, I have looked into that section. We are able to read few logs from NFS server but few component logs are rotating less than a minute. We are getting this error whenever file is rotated very quickly. So we are missing few logs here when log file is rotated. Can you guild me how to fix this type of issue?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 14, 2020, 6:02am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853/4 "2020-04-14T06:02:37Z")

</div>

As this is described in the troubleshooting docs I do not necessarily think there is a fix as there still are a few open issues around this on GitHub. Will leave it to someone on the Beats team to answer.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 12, 2020, 6:03am UTC](https://discuss.elastic.co/t/unexpected-state-reading-from-file-stale-nfs-handle-errors/227853/5 "2020-05-12T06:03:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
