This article relates to this warning message which is spamming the logs on DSE Search nodes:
LukeRequestHandler logs WARN "Error getting file length for [segments_NNN]" for Inconsequential NoSuchFileException Situations
- Datastax Enterprise 6.7
- Datastax Enterprise 6.0
- Datastax Enterprise 5.1
The warning will likely be incredibly frequent, spamming the logs on DSE Search nodes. The index will be functional and no discernable application impact is experienced. In the following example, the index is on the demo.table1 table. Note that the segment in the warning will vary:
WARN [http-bio-10.170.96.15-8983-exec-7855] 2019-09-09 10:18:03,056 LukeRequestHandler.java:601 - Error getting file length for [segments_1r] java.nio.file.NoSuchFileException: /var/lib/cassandra/data/solr.data/demo.table1/index/segments_1r at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.Files.size(Files.java:2332) ...
OSS Solr is part of DSE Search. This issue is from OSS Solr bug SOLR-9120:
"Beginning with Solr 5.5, the LukeRequestHandler started attempting to report the name and file size of the segments file for the current Searcher+IndexReader in use by Solr – however the filesize information is not always available from the Directory in cases where "on disk" commits have caused that file to be removed, for example...
- you perform index updates & commits w/o "newSearcher" being opened
- you "concurrently" make requests to the LukeRequestHandler or the CoreAdminHandler requesting "STATUS" (ie: after the commit, before any newSearcher)
- these requests can come from the Admin UI passively if it's open in a browser
In situations like this, a decision was made in SOLR-8587 to log a WARNing in the event that the segments file size could not be determined – but these WARNing messages look scary and have lead (many) users to assume something is wrong with their solr index."
The SOLR issue description confirms that this bug does not have any direct impact, other than spamming your logs.
- This bug affects OSS Solr 5.5 and 6.0.
- DSE 6.7, DSE 6.0, and DSE 5.1 include Apache Solr™ 6.0.1 and do not include the OSS Solr fix available in Solr 7.2 and 8.0.
To prevent this bug from spamming the logs, the simplest workaround is to change the logging level for only the LukeRequestHandler class.
To change the logging level online without a restart:
nodetool setlogginglevel -- org.apache.solr.handler.admin.LukeRequestHandler ERROR
To persist the change across node restarts, add the following line to your logback.xml file for DSE:
<logger name="org.apache.solr.handler.admin.LukeRequestHandler" level="ERROR"/>
The location of the logback.xml file depends on the type of installation:
- Package installations: /etc/dse/cassandra/logback.xml
- Tarball installations: installation_location/resources/cassandra/conf/logback.xml