jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MARTINEZ Antonio" <Antonio.Marti...@alcatel-lucent.com>
Subject Re: Index/data corruption
Date Thu, 16 Apr 2009 00:07:06 GMT

Hello,

I'm using Jackrabbit 1.4.4
In a recent power outrage, Jackrabbit failed to come up. The error is
"Malformed redo entry".
Looks like the lucene files are probably not closed properly during the
shutdown, lucene throws exception which is not handled in Jackrabbit.

I use default SearchIndex configuration as specified in
http://wiki.apache.org/jackrabbit/Search.
Am I missing some configuration that would allow lucene to fix itself ?

Thanks in advance,
Antonio


THIS IS THE EXCEPTION:
2009-04-07 15:13:54,448 INFO
[main]-[org.apache.jackrabbit.core.RepositoryImpl] initializing
workspace 'default'...
2009-04-07 15:13:54,507 INFO
[main]-[org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRec
overyManager] Database: MySQL / 5.0.51a
2009-04-07 15:13:54,507 INFO
[main]-[org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRec
overyManager] Driver: MySQL-AB JDBC Driver / mysql-connec
tor-java-5.0.7 ( $Date: 2007-03-09 22:13:57 +0100 (Fri, 09 Mar 2007) $,
$Revision: 6341 $ )
2009-04-07 15:13:54,869 INFO
[main]-[org.apache.jackrabbit.core.RepositoryImpl] workspace 'default'
initialized
2009-04-07 15:13:55,625 INFO
[main]-[org.apache.jackrabbit.core.fs.local.LocalFileSystem]
LocalFileSystem initialized at path
/var/Repository/current/repository/index
2009-04-07 15:13:56,148 INFO
[main]-[org.apache.jackrabbit.core.query.lucene.SearchIndex] Index
initialized: /var/Repository/current/repository/index Version: 2
2009-04-07 15:13:56,251 WARN
[main]-[org.apache.jackrabbit.core.query.lucene.RedoLog] Malformed redo
entry:
2009-04-07 15:13:56,260 INFO
[main]-[org.apache.jackrabbit.core.fs.local.LocalFileSystem]
LocalFileSystem initialized at path
/var/Repository/current/workspaces/default/index
2009-04-07 15:13:57,212 ERROR
[main]-[org.apache.jackrabbit.core.RepositoryImpl] Failed to initialize
workspace 'default'
javax.jcr.RepositoryException: read past EOF: read past EOF: read past
EOF
        at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchMa
nager.java:584)
        at
org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:264)
        at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager
(RepositoryImpl.java:1613)
        at
org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.j
ava:606)
        at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(Reposito
ryImpl.java:415)
        at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305
)
        at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557
)
        at
org.apache.jackrabbit.jca.JCARepositoryManager$Reference.create(JCARepos
itoryManager.java:167)
        at
org.apache.jackrabbit.jca.JCARepositoryManager.createRepository(JCARepos
itoryManager.java:75)
        at
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createRepository(J
CAManagedConnectionFactory.java:289)
        at
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createConnectionFa
ctory(JCAManagedConnectionFactory.java:124)
        at
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.cre
ateConnectionFactory(ConnectionFactoryBindingService.java:128)
        at
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.sta
rtService(ConnectionFactoryBindingService.java:65)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
        at $Proxy0.start(Unknown Source)
        at
org.jboss.system.ServiceController.start(ServiceController.java:417)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at
org.jboss.system.ServiceController.start(ServiceController.java:435)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy46.start(Unknown Source)
        at
org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
        at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy9.deploy(Unknown Source)
        at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc
anner.java:421)
        at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan
ner.java:634)
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS
can(AbstractDeploymentScanner.java:263)
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abst
ractDeploymentScanner.java:336)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
        at $Proxy0.start(Unknown Source)
        at
org.jboss.system.ServiceController.start(ServiceController.java:417)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
        at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
        at $Proxy5.deploy(Unknown Source)
        at
org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
        at org.jboss.Main.boot(Main.java:200)
        at org.jboss.Main$1.run(Main.java:508)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: read past EOF
        at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.jav
a:137)
        at
org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.j
ava:38)
        at
org.apache.lucene.store.IndexInput.readInt(IndexInput.java:47)
        at
org.apache.lucene.index.SegmentInfo.<init>(SegmentInfo.java:116)
        at
org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:213)
        at
org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:190)
        at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.j
ava:610)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:185)
        at
org.apache.lucene.index.IndexReader.open(IndexReader.java:167)
        at
org.apache.jackrabbit.core.query.lucene.AbstractIndex.getIndexReader(Abs
tractIndex.java:223)
        at
org.apache.jackrabbit.core.query.lucene.PersistentIndex.getNumDocuments(
PersistentIndex.java:178)
        at
org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>(MultiIndex.jav
a:295)
        at
org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.j
ava:447)
        at
org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQuery
Handler.java:53)
        at
org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchMa
nager.java:582)
        ... 135 more




========================================================================
======
Re: Index/data corruption

Marcel Reutegger
Fri, 27 Apr 2007 05:46:36 -0700

Michael Neale wrote:

    yeah it looks like it is a problem that happens when it is not
shutdown
    properly (which mostly happens in my unit tests) - so once I make
sure it
    shuts down, its ok.

    but there is a problem with the recovery code not working - but that
can be
    corrected by blowing away the indexes.

this is now fixed, see: https://issues.apache.org/jira/browse/JCR-778

please note that the problem during index recovery only occurs in a
certain situation when an action from the index merger is present in the
redo log.

michael, thank you for all your help in resolving this issue.

regards
 marcel

Mime
View raw message