我正在尝试在没有运气的情况下,在快乐的smartOs实例上将Elasticsearch作为服务启动。我正在使用的实例是标准的64位Java实例。 This是我正在使用的服务 list 文件:
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="es">
<service name="database/es" type="service" version="1">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="network" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/milestone/network:default"/>
</dependency>
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/system/filesystem/local"/>
</dependency>
<method_context>
<method_credential user='admin' />
</method_context>
<exec_method type="method" name="start" exec="/home/admin/elasticsearch/bin/elasticsearch"
timeout_seconds="60"/>
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="child"/>
<propval name="ignore_error" type="astring" value="core,signal"/>
</property_group>
<property_group name="application" type="application">
</property_group>
<stability value="Evolving"/>
<template>
<common_name>
<loctext xml:lang="C">
es
</loctext>
</common_name>
</template>
</service>
</service_bundle>
我导入并启用 list 文件
svccfg import es.xml
svcadm enable es
然后,我希望该服务能够运行,但是elasticsearch服务器没有响应。如果我使用svcs检查服务,我有时会
offline* 16:21:53 svc:/database/es:default
有时:
online* 16:22:24 svc:/database/es:default
甚至有时没有星号。
最佳答案
看着:
/var/svc/log/database-es:default.log
并检查您的
JAVA_HOME
和PATH
变量。关于elasticsearch - 如何在Joyent上将Elasticsearch设置为服务,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19454531/