codelibs / fess

Fess is very powerful and easily deployable Enterprise Search Server.
https://fess.codelibs.org
Apache License 2.0
1k stars 166 forks source link

Fess 12.2.0 can't start with elasticsearch 6.3.2 #1809

Closed kapikapikapibarah closed 6 years ago

kapikapikapibarah commented 6 years ago

I'm trying to build fess server with elasticsearch on windows10 Pro 64bit. But the errror occured at the startup process. Elasticsearch would start with no error. Please help me.

fess-12.2.0.zip elasticsearch-6.3.2.zip windows 10 pro

Below is the 'fess.log'

2018-08-17 18:33:18,067 [localhost-startStop-1] ERROR Failed to initialize Lasta Di.
org.lastaflute.di.exception.ContainerInitFailureException: Look! Read the message below.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Failed to initialize the container.

[Path]
app.xml

[Namespace]
null
* * * * * * * * * */
    at org.lastaflute.di.core.meta.impl.LaContainerImpl.throwContainerInitFailureException(LaContainerImpl.java:463) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:415) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.factory.SingletonLaContainerFactory.init(SingletonLaContainerFactory.java:66) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.web.container.WebLastaContainerInitializer.doInitContainer(WebLastaContainerInitializer.java:81) ~[lastaflute-1.0.8.jar:?]
    at org.lastaflute.web.container.WebLastaContainerInitializer.initialize(WebLastaContainerInitializer.java:45) ~[lastaflute-1.0.8.jar:?]
    at org.lastaflute.web.servlet.filter.LastaPrepareFilter.initializeContainer(LastaPrepareFilter.java:136) [lastaflute-1.0.8.jar:?]
    at org.lastaflute.web.servlet.filter.LastaPrepareFilter.init(LastaPrepareFilter.java:94) [lastaflute-1.0.8.jar:?]
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285) [classes/:?]
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266) [classes/:?]
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108) [classes/:?]
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4621) [classes/:?]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5266) [classes/:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [classes/:?]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) [classes/:?]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) [classes/:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: org.lastaflute.di.core.exception.IllegalMethodRuntimeException: [ESSR0060]Can not configure method(init) of org.codelibs.fess.helper.SuggestHelper, because java.lang.SecurityException: access denied ("java.io.FilePermission" "e:\elasticsearch\configar\protwords.txt" "read")
    at org.lastaflute.di.core.assembler.AbstractMethodAssembler.invoke(AbstractMethodAssembler.java:61) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.assembler.DefaultInitMethodAssembler.assemble(DefaultInitMethodAssembler.java:40) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.deployer.SingletonComponentDeployer.assemble(SingletonComponentDeployer.java:57) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.deployer.SingletonComponentDeployer.deploy(SingletonComponentDeployer.java:41) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.deployer.SingletonComponentDeployer.init(SingletonComponentDeployer.java:35) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.meta.impl.ComponentDefImpl.init(ComponentDefImpl.java:85) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.meta.impl.LaContainerImpl.doInit(LaContainerImpl.java:434) ~[lasta-di-0.7.6.jar:?]
    at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:413) ~[lasta-di-0.7.6.jar:?]
    ... 17 more
Caused by: java.lang.SecurityException: access denied ("java.io.FilePermission" "e:\elasticsearch\configar\protwords.txt" "read")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_171]
    at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_171]
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_171]
    at java.lang.SecurityManager.checkRead(SecurityManager.java:888) ~[?:1.8.0_171]
    at sun.nio.fs.WindowsChannelFactory.open(WindowsChannelFactory.java:293) ~[?:1.8.0_171]
    at sun.nio.fs.WindowsChannelFactory.newFileChannel(WindowsChannelFactory.java:162) ~[?:1.8.0_171]
    at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:225) ~[?:1.8.0_171]
    at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_171]
    at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_171]
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_171]
    at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_171]
    at java.nio.file.Files.newBufferedReader(Files.java:2784) ~[?:1.8.0_171]
    at org.elasticsearch.index.analysis.Analysis.getWordList(Analysis.java:245) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.analysis.Analysis.getWordSet(Analysis.java:215) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.analysis.common.KeywordMarkerTokenFilterFactory.<init>(KeywordMarkerTokenFilterFactory.java:71) ~[analysis-common-6.3.2.jar:6.3.2]
    at org.elasticsearch.plugins.AnalysisPlugin$1.get(AnalysisPlugin.java:130) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.analysis.AnalysisRegistry.buildMapping(AnalysisRegistry.java:344) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.analysis.AnalysisRegistry.buildTokenFilterFactories(AnalysisRegistry.java:172) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:156) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.IndexService.<init>(IndexService.java:162) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:367) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:453) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:407) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$IndexCreationTask.execute(MetaDataCreateIndexService.java:438) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:45) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:630) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:267) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:197) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:132) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:626) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) ~[elasticsearch-6.3.2.jar:6.3.2]
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) ~[elasticsearch-6.3.2.jar:6.3.2]
    ... 3 more
marevol commented 6 years ago

It's better to check the following setting in Installation Guide

set FESS_PARAMS=%FESS_PARAMS% -Dfess.dictionary.path="c:/<elasticsearch-<version>/config/"

and then delete fess.YYYYMMDD index and start Fess.

kapikapikapibarah commented 6 years ago

Thanks for your answer, @marevol .

I checked that url and tried. I got some changes, but couldn't success. I added below settings to fess.in.bat. I installed to 'e-drive'.

set FESS_PARAMS=%FESS_PARAMS% -Dfess.es.http_address=http://localhost:9200
set FESS_PARAMS=%FESS_PARAMS% -Dfess.es.transport_addresses=localhost:9300
set FESS_PARAMS=%FESS_PARAMS% -Dfess.dictionary.path="e:/elasticsearch/config/"

I deleted index 'fess.yymmdd' from elasticsearch. and I re-install the fess-service, start it, after elasticsearch-service start. Fess started with inside-elasticsearch, port 9201. External elasticsearch was working with port 9200. I tried to below setting, but same result. set FESS_PARAMS=%FESS_PARAMS% -Dfess.dictionary.path="e:/elasticsearch/config/

The extra elasticsearch is running. http://localhost:9200/

{
  "name" : "Y5kUTXy",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "txjvwLQdSF231Y5xK9chyg",
  "version" : {
    "number" : "6.3.2",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "053779d",
    "build_date" : "2018-07-20T05:20:23.451332Z",
    "build_snapshot" : false,
    "lucene_version" : "7.3.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

E:\elasticsearch\bin\elasticsearch-plugin list

analysis-extension
analysis-fess
configsync
dataformat
langfield
learning-to-rank
minhash

'elasticsearch.yml' was added below line. configsync.config_path: "e:/elasticsearch/config"

What can I do for it works. Thanks.

marevol commented 6 years ago

Fess started with inside-elasticsearch, port 9201

If setting fess.es.transport_addresse correctly, embedded elasticsearch does not start with 9201 port in Fess.

Settings in fess.in.bat are stored into Windows service by running service.bat. So, you need to modify settings before registering Windows service. Settings in Windows service might not be correct...

kapikapikapibarah commented 6 years ago

Thanks for quickly reply! @marevol

I think theses setting is good. I nerver typed '9201'.

fess.in.bat
set FESS_PARAMS=%FESS_PARAMS% -Dfess.es.http_address=http://localhost:9200
set FESS_PARAMS=%FESS_PARAMS% -Dfess.es.transport_addresses=localhost:9300

I modified 'elasticsearch.http.url=http://localhost:9201' to 'elasticsearch.http.url=http://localhost:9200' in fess/app/WEB-INF/classes/fess_config.properties, and re-registed Windows service. Also two elasticsearch wakeup on port 9200 and 9201. But FESS dashbord shows 'Y5kUTXy'. This name shows a external elasticsearch. But alert message on FEDD dashbord was keeping on displayed 'Running as Development mode. For Production use...'

Does embedded elasticsearch collision other elasticsearch on port 9200? Port 9300 is only LISTENING, it is not ESTABLISHED. Port 9301 is ESTABLISHED. Is it wrong setting?

Thanks.

marevol commented 6 years ago

If settings for external elasticsearch are not configured(or not correct), Fess starts embedded elasticsearch with 9201 port. So, I think that settings in config files or Windows service are not proper.

But alert message on FEDD dashbord was keeping on displayed 'Running as Development mode. For Production use...'

It's displayed when Fess starts embedded elasticsearch.

Registered Windows service might not be correct...

kapikapikapibarah commented 6 years ago

Thank you for youre reply, @marevol

I got it. Cause I changed the setting of fess.in.bat.

set FESS_JAVA_OPTS=%FESS_JAVA_OPTS% -Dfess.es.http_address=http://localhost:9200
set FESS_JAVA_OPTS=%FESS_JAVA_OPTS% -Dfess.es.transport_addresses=localhost:9300
set FESS_JAVA_OPTS=%FESS_JAVA_OPTS% -Dfess.dictionary.path="e:/elasticsearch/config/"

Fess start without any ploblem, and no dashbord-message. Awesome!! I appriciate you've helped me out so mutch.

But It can't crawl any documents without local file. It says 'WARN Referral failed, trying next'. I can make another issue about this, I couldn't make breakethrough.

Thaks!!