java.io.FileNotFoundException: Error loading metadata for index file: segments_2n|M|Course
nadeempasha Jan 3, 2018 7:39 AM
|
I tried running infinispan in two machines and persisted the index data in one machine. When i try to run simultaneously in 2 machines with indexing and persisting(cache-store) into the database, i am getting the following exception, Caused by: java.io.FileNotFoundException: Error loading metadata for index file: segments_2j|M|Course at org.infinispan.lucene.impl.DirectoryImplementor.openInput(DirectoryImplementor.java:134) at org.infinispan.lucene.impl.DirectoryLuceneV4.openInput(DirectoryLuceneV4.java:101) at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:113) at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:341) at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:57) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:923) at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:53) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:67) at org.hibernate.search.indexes.impl.SharingBufferReaderProvider.readerFactory(SharingBufferReaderProvider.java:131) at org.hibernate.search.indexes.impl.SharingBufferReaderProvider$PerDirectoryLatestReader.<init>(SharingBufferReaderProvider.java:206) at org.hibernate.search.indexes.impl.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:108) ... 24 more
My infinispan config file is,
<?xml version="1.0" encoding="UTF-8"?>
<!-- *************************** --> <!-- Note that the JGroups transport uses sensible defaults if no configuration </jgroups>
<cache-container name="HibernateSearch" default-cache="default" statistics="false" shutdown-hook="DONT_REGISTER">
<transport stack="default-jgroups-tcp"/>
<!-- Duplicate domains are allowed so that multiple deployments with default configuration
<!-- *************************************** --> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false"/> <transaction mode="NONE" /> <eviction max-entries="-1" strategy="NONE"/> <expiration max-idle="-1"/> <persistence passivation="false"> <jdbc:string-keyed-jdbc-store preload="true" fetch-state="true" read-only="false" purge="false"> <write-behind /> <property name="key2StringMapper">org.infinispan.lucene.LuceneKey2StringMapper</property> <jdbc:connection-pool connection-url="jdbc:mysql://192.168.1.52:3306/hsearch" <jdbc:string-keyed-table drop-on-exit="false" create-on-start="true" prefix="ISPN_STRING_TABLE"> <jdbc:id-column name="ID" type="VARCHAR(255)"/> <jdbc:data-column name="DATA" type="MEDIUMBLOB"/> <jdbc:timestamp-column name="TIMESTAMP" type="BIGINT"/> </jdbc:string-keyed-table> </jdbc:string-keyed-jdbc-store> </persistence> <indexing index="ALL"/> <state-transfer enabled="true" timeout="480000" await-initial-transfer="true"/> </replicated-cache>
<!-- **************************** --> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false"/> <transaction mode="NONE"/> <eviction max-entries="-1" strategy="NONE"/> <expiration max-idle="-1"/> <persistence passivation="false"> <jdbc:string-keyed-jdbc-store preload="true" fetch-state="true" read-only="false" purge="false"> <write-behind /> <property name="key2StringMapper">org.infinispan.lucene.LuceneKey2StringMapper</property> <jdbc:connection-pool connection-url="jdbc:mysql://192.168.1.52:3306/hsearch" <jdbc:string-keyed-table drop-on-exit="false" create-on-start="true" prefix="ISPN_STRING_TABLE"> <jdbc:id-column name="ID" type="VARCHAR(255)"/> <jdbc:data-column name="DATA" type="MEDIUMBLOB"/> <jdbc:timestamp-column name="TIMESTAMP" type="BIGINT"/> </jdbc:string-keyed-table> </jdbc:string-keyed-jdbc-store> </persistence> <indexing index="ALL"/> <state-transfer enabled="true" timeout="480000" await-initial-transfer="true"/> </distributed-cache>
<!-- ***************************** --> <locking striping="false" acquire-timeout="10000" concurrency-level="500" write-skew="false"/> <transaction mode="NONE"/> <eviction max-entries="-1" strategy="NONE"/> <expiration max-idle="-1"/> <indexing index="ALL"/> <state-transfer enabled="true" timeout="480000" await-initial-transfer="true"/> </replicated-cache> </cache-container>
</infinispan> |