At hibernate search JMS cluster setup.
Anyone have an idea what is causing FSSlaveDirectoryProvider to fail with AccessDeniedException?
How to track this down?
2017-04-19 10:04:43,557 TRACE [org.hibernate.search.store.impl.FSSlaveDirectoryProvider] (pool-18-thread-1) Copying \var\trans\tptjlev\lucene\Local_1\source\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildning\1 into \var\trans\tptjlev\lucene\Local_2\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildning\2
2017-04-19 10:04:43,572 TRACE [org.hibernate.search.store.impl.FSSlaveDirectoryProvider] (pool-18-thread-1) Copy for C:\var\trans\tptjlev\lucene\Local_2\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildning took 15 ms
2017-04-19 10:04:43,942 TRACE [org.hibernate.search.store.impl.FSSlaveDirectoryProvider] (pool-19-thread-1) Copying \var\trans\tptjlev\lucene\Local_1\source\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildningstillfalle\1 into \var\trans\tptjlev\lucene\Local_2\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildningstillfalle\2
2017-04-19 10:04:43,944 ERROR [org.hibernate.search.store.impl.FSSlaveDirectoryProvider] (pool-19-thread-1) HSEARCH000021: Unable to synchronize source of C:\var\trans\tptjlev\lucene\Local_2\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildningstillfalle: java.nio.file.AccessDeniedException: \var\trans\tptjlev\lucene\Local_2\index\se.arbetsformedlingen.tjansteleverantor.datalager.doman.entiteter.DUtbildningstillfalle\2\_8.cfs
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) [rt.jar:1.8.0_45]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) [rt.jar:1.8.0_45]
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) [rt.jar:1.8.0_45]
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) [rt.jar:1.8.0_45]
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source) [rt.jar:1.8.0_45]
at java.nio.file.Files.delete(Unknown Source) [rt.jar:1.8.0_45]
at org.hibernate.search.util.impl.FileHelper$1.visitFile(FileHelper.java:204) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at org.hibernate.search.util.impl.FileHelper$1.visitFile(FileHelper.java:201) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at java.nio.file.Files.walkFileTree(Unknown Source) [rt.jar:1.8.0_45]
at java.nio.file.Files.walkFileTree(Unknown Source) [rt.jar:1.8.0_45]
at org.hibernate.search.util.impl.FileHelper.delete(FileHelper.java:201) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at org.hibernate.search.util.impl.FileHelper.delete(FileHelper.java:182) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at org.hibernate.search.util.impl.FileHelper.synchronize(FileHelper.java:115) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at org.hibernate.search.store.impl.FSSlaveDirectoryProvider$CopyDirectory.run(FSSlaveDirectoryProvider.java:353) [hibernate-search-engine-5.5.0.Final.jar:5.5.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_45]
File copy works a couple of times, in response to a master index update, then suddenly fails and keep on failing on the slaves.
It seems like hibernate is already locking the file when trying to do file copy.
Setup is;
Spring 4.3.4 on wildfly 8.
hibernate search 5.5.5
hibernate-core 5.1.1
Java 1.8
Windows 7
Configuration like JMS setup in
https://docs.jboss.org/hibernate/search ... ms-backendEjb MDB at master node. Spring entityManagerFactory configures hibernate search.
3 nodes, refresh 2 min.