solr启动时报错java.nio.channels.OverlappingFileLockException

错误堆栈如下:
=====================
2011-5-10 10:12:41 org.apache.solr.servlet.SolrDispatchFilter init
严重: Could not start SOLR. Check solr/home property
java.nio.channels.OverlappingFileLockException
     at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1173)
     at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1075)
     at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:881)
     at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
     at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:244)
     at org.apache.lucene.store.Lock.obtain(Lock.java:73)
     at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
     at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1421)
     at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:191)
     at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98)
     at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173)
     at org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpdateHandler2.java:376)
     at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.java:845)
     at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:508)
     at org.apache.solr.core.SolrCore.<init>(SolrCore.java:588)
     at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
     at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
     at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
     at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
     at org.apache.catalina.core.StandardService.start(StandardService.java:519)
     at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

原因:原先solr未配置主从同步,现在在solr中配置了主从同步;以war包形式部署的solr会在tomcat的webapps中产生一个展开的apache-solr-1.4.1目录,将其删除即可解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值