(from osdn.net/users/masuda_mitsuo)
以下のマニュアルページに、FessのElasticsearchは組み込んだものを使ってますが、別サーバにElasticsearchを切り出すことも可能と書かれております。
http://fess.codelibs.org/ja/articles/article-1.html#elasticsearch
Fess の配布物には Elasticsearch を組み込んだ形で配布していますが、 Fess サーバーとは別なサーバーへ切り出して利用することも可能です。
また、 Fess と Elasticsearch でそれぞれで冗長構成を組むことができ、高い拡張性を活かすことができる設計になっています。
マニュアルには切り出し方法が書かれていないのですが、どのように設定すれば良いのか教えていただけないでしょうか。
試しにですが、私のCentOS7の環境でElasticsearch2.4をインストールし、
fess.in.shを以下のように変更してElasticsearch、Fessを順番に起動しました。
ES_HTTP_URL=http://localhost:9200
ES_TRANSPORT_URL=localhost:9300
FESS_DICTIONARY_PATH=/var/lib/elasticsearch/config/
ES_HOME=/usr/share/elasticsearch
ブラウザで確認すると画面が表示れない状態となります。
fess.logを確認すると以下のようなログが発生しておりました。
上記設定に誤りまたは設定に不備があるようでしたら、教えてください。
2017-03-23 11:28:54,544 [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]
esclient.xml
[Namespace]
null
[Included by]
esflute_config.xml
esflute_user.xml
esflute_log.xml
-
-
-
-
-
-
-
-
- */
at org.lastaflute.di.core.meta.impl.LaContainerImpl.throwContainerInitFailureException(LaContainerImpl.java:463)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:415)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.doInit(LaContainerImpl.java:431)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:413)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.doInit(LaContainerImpl.java:431)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:413)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.doInit(LaContainerImpl.java:431)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:413)
at org.lastaflute.di.core.factory.SingletonLaContainerFactory.init(SingletonLaContainerFactory.java:66)
at org.lastaflute.web.container.WebLastaContainerInitializer.doInitContainer(WebLastaContainerInitializer.java:81)
at org.lastaflute.web.container.WebLastaContainerInitializer.initialize(WebLastaContainerInitializer.java:45)
at org.lastaflute.web.servlet.filter.LastaPrepareFilter.initializeContainer(LastaPrepareFilter.java:136)
at org.lastaflute.web.servlet.filter.LastaPrepareFilter.init(LastaPrepareFilter.java:94)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4561)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5204)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
- */
-
-
-
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5204)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.lastaflute.di.core.exception.IllegalMethodRuntimeException: [ESSR0060]Can not configure method(open) of org.codelibs.fess.es.client.FessEsClient, because org.codelibs.fess.exception.FessSystemException: Configsync is not available.
at org.lastaflute.di.core.assembler.AbstractMethodAssembler.invoke(AbstractMethodAssembler.java:61)
at org.lastaflute.di.core.assembler.DefaultInitMethodAssembler.assemble(DefaultInitMethodAssembler.java:40)
at org.lastaflute.di.core.deployer.SingletonComponentDeployer.assemble(SingletonComponentDeployer.java:57)
at org.lastaflute.di.core.deployer.SingletonComponentDeployer.deploy(SingletonComponentDeployer.java:41)
at org.lastaflute.di.core.deployer.SingletonComponentDeployer.init(SingletonComponentDeployer.java:35)
at org.lastaflute.di.core.meta.impl.ComponentDefImpl.init(ComponentDefImpl.java:83)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.doInit(LaContainerImpl.java:434)
at org.lastaflute.di.core.meta.impl.LaContainerImpl.init(LaContainerImpl.java:413)
… 23 common frames omitted
Caused by: org.codelibs.fess.exception.FessSystemException: Configsync is not available.
at org.codelibs.fess.es.client.FessEsClient.waitForConfigSyncStatus(FessEsClient.java:543)
at org.codelibs.fess.es.client.FessEsClient.lambda$open$231(FessEsClient.java:337)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.codelibs.fess.es.client.FessEsClient.open(FessEsClient.java:316)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.lastaflute.di.util.LdiMethodUtil.invoke(LdiMethodUtil.java:49)
at org.lastaflute.di.core.assembler.AbstractMethodAssembler.invoke(AbstractMethodAssembler.java:59)
… 30 common frames omitted
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:9200/_configsync/wait?status=green
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at org.codelibs.elasticsearch.runner.net.CurlRequest$1$1.open(CurlRequest.java:164)
at org.codelibs.elasticsearch.runner.net.CurlRequest$1.writeContent(CurlRequest.java:194)
at org.codelibs.elasticsearch.runner.net.CurlRequest$1.onResponse(CurlRequest.java:161)
at org.codelibs.elasticsearch.runner.net.CurlRequest.execute(CurlRequest.java:143)
at org.codelibs.elasticsearch.runner.net.CurlRequest.execute(CurlRequest.java:155)
at org.codelibs.fess.es.client.FessEsClient.waitForConfigSyncStatus(FessEsClient.java:538)
… 39 common frames omitted
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:9200/_configsync/wait?status=green
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at org.codelibs.elasticsearch.runner.net.CurlRequest$1.onResponse(CurlRequest.java:160)
… 42 common frames omitted -
-
-
-