我想在我的JBoss 6.4上将elasticsearch作为.war库部署。
首先,我按照以下准则将elasticsearch打包为.war:https://github.com/javanna/elasticsearch-war-example 工作!
在我的JBoss实例上部署此.war文件会产生以下输出:
Starting deployment of "elasticsearch-1.5.2.war" (runtime-name: "elasticsearch-1.5.2.war")
10:33:40,718 INFO [org.jboss.web] Register web context: /elasticsearch-1.5.2
10:33:40,774 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/elasticsearch-1.5.2]] Initializing elasticsearch Node 'node'
10:33:41,740 INFO [org.elasticsearch.node] [My Node Name] version[1.5.2], pid[21232], build[62ff986/2015-04-27T09:21:06Z]
10:33:41,740 INFO [org.elasticsearch.node] [My Node Name] initializing ...
10:33:41,744 INFO [org.elasticsearch.plugins] [My Node Name] loaded [], sites []
10:33:42,830 INFO [org.elasticsearch.node] [My Node Name] initialized
10:33:42,830 INFO [org.elasticsearch.node] [My Node Name] starting ...
10:33:45,739 INFO [org.elasticsearch.transport] [My Node Name] bound_address {inet[/0.0.0.0:9300]}, publish_address {inet[/123.12.123.123:9300]}
10:33:45,750 INFO [org.elasticsearch.discovery] [My Node Name] my-cluster/NILFFG5LRHyWIOk_X9hv4w
10:33:48,788 INFO [org.elasticsearch.cluster.service] (elasticsearch[My Node Name][clusterService#updateTask][T#1]) [My Node Name] new_master [My Node Name][NILFFG5LRHyWIOk_X9hv4w][MYDOMAIN][inet[/123.12.123.123:9300]], reason: zen-disco-join (elected_as_master)
10:33:48,803 INFO [org.elasticsearch.node] [My Node Name] started
10:33:48,831 INFO [org.elasticsearch.gateway] (elasticsearch[My Node Name][clusterService#updateTask][T#1]) [My Node Name] recovered [0] indices into cluster_state
10:33:48,859 INFO [org.jboss.as.server] : Deployed "elasticsearch-1.5.2.war" (runtime-name : "elasticsearch-1.5.2.war")
显然,与通常的elasticsearch.bat安装相比,端口9200上没有使用elasticsearch的REST API的地址绑定。
将我的模块添加为扩展名时,出现以下错误。
[standalone@localhost:9999 /] /extension=org.elasticsearch:add()
{
"outcome" => "failed",
"failure-description" => "org.jboss.modules.ModuleLoadException: Error loading module from C:\\jboss-eap-6.4\\modules\\org\\elasticsearch\\main\\module.xml",
"rolled-back" => true
答案 0 :(得分:0)
对于那些也想在JBoss上部署elasticsearch的人,请查看elasticsearch.com上的这个主题
https://discuss.elastic.co/t/elasticsearch-deployment-on-jboss/304