Java File Watching – Serviio Error

jonathan FreeBSD, Serviio Leave a Comment

I run my NAS on XigmaNAS which is a FreeBSD OS based system. I also have Serviio running to stream media files which has been installed from ports (source code). I perform monthly patching on the box and recently it broke Serviio with the error:

[MediaServer] An unexpected error occurred. Ending the application. Message: sun.nio.fs.LinuxWatchService.inotifyInit()

This patching upgraded Java to which broke the inotifyInit method which relates to watching the file system (a critical component of Serviio). 

After quiet a bit of research and reading, I managed to solve this by adding an additional option to the serviio startup command in the /etc/rc.conf:


This switches the Java watch service inotify to polling. I believe this has since been fixed in later releases, the bug is noted here:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.