Hudson 在 Solaris 10 上处于持续维护模式

发布于 2024-11-08 05:48:45 字数 4419 浏览 0 评论 0原文

我刚刚按照 Paul Oswald 的指示安装了最新版本的 Hudson 作为 Solaris 的服务。遗憾的是,该服务从未上线(始终处于维护模式):

# svcs -xv hudson                                
svc:/application/hudson:default (Hudson Continuous Build Server)
 State: maintenance since Mon May 16 07:05:20 2011
Reason: Method failed.
   See: http://sun.com/msg/SMF-8000-8Q
   See: /var/svc/log/application-hudson:default.log
Impact: This service is not running.

日志没有显示任何有趣的内容......

# cat /var/svc/log/application-hudson:default.log
[ May 12 12:28:01 Disabled. ]
[ May 12 12:28:01 Rereading configuration. ]
[ May 12 12:28:13 Enabled. ]
[ May 16 07:05:19 Leaving maintenance because clear requested. ]
[ May 16 07:05:20 Enabled. ]

有谁知道我如何进一步解决这个问题,或者更好地解决问题是什么?我在下面包含了我的清单文件。我已尝试重新启动该服务。谢谢,-戴夫

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>

<!-- 

Copyright (C) 2007 Paul Oswald

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<service_bundle type="manifest" name="Hudson">
    <service name="application/hudson" type="service" version="1">

            <!-- Initial state of the service is disabled -->
            <create_default_instance enabled="false" />

            <!-- Only one instance of Hudson should ever run per server -->
            <single_instance />

            <dependency name="multi-user-server" type="service" grouping="require_all" restart_on="none">
                    <service_fmri value="svc:/milestone/multi-user-server" />
            </dependency>

            <method_context>
                    <method_credential user='hudson' group='other' />
                    <method_environment>
                            <envvar name='PATH' value='/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/usr/sfw/bin' />
                    </method_environment>
            </method_context>

            <!-- Set the HUDSON_HOME env variable, and run the war file in /apps/hudson/hudson.war -->
            <exec_method type="method" name="start" exec="java -Xmx512m -DHUDSON_HOME=/apps/hudson/ -classpath /apps/hudson/WEB-INF/lib/ss.jar:/apps/hudson/WEB-INF/lib/starteam-sdk.jar:/apps/hudson/WEB-INF/lib/starteam110-resources.jar:/apps/hudson/WEB-INF/lib/starteam110.jar:/apps/hudson/WEB-INF/lib/swingall.jar -jar /apps/hudson/hudson.war --prefix=/hudson" timeout_seconds="0"/>
            <exec_method type="method" name="stop" exec=":kill -TERM" timeout_seconds="30"/>

            <!-- We are going to be kicking off a single child process so we want Wait mode-->
            <property_group name='startd' type='framework'>
                    <propval name='duration' type='astring' value='child' />
            </property_group>

            <stability value="Unstable" />

            <template>
                    <common_name>
                            <loctext xml:lang='C'>Hudson Continuous Build Server</loctext>
                    </common_name>
                    <documentation>
                            <doc_link name='hudson.dev.java.net' uri='http://hudson.dev.java.net' />
                    </documentation>
            </template>
    </service>
</service_bundle>

I just installed the latest version of Hudson as a service for Solaris using Paul Oswald's instructions. Sadly, the service never comes online (always in maintenance mode):

# svcs -xv hudson                                
svc:/application/hudson:default (Hudson Continuous Build Server)
 State: maintenance since Mon May 16 07:05:20 2011
Reason: Method failed.
   See: http://sun.com/msg/SMF-8000-8Q
   See: /var/svc/log/application-hudson:default.log
Impact: This service is not running.

The log doesn't reveal anything interesting ...

# cat /var/svc/log/application-hudson:default.log
[ May 12 12:28:01 Disabled. ]
[ May 12 12:28:01 Rereading configuration. ]
[ May 12 12:28:13 Enabled. ]
[ May 16 07:05:19 Leaving maintenance because clear requested. ]
[ May 16 07:05:20 Enabled. ]

Does anyone know how I can troubleshoot this issue further, or even better, what the problem is? I am including my manifest file below. I have tried restarting the service. Thanks, - Dave

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>

<!-- 

Copyright (C) 2007 Paul Oswald

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<service_bundle type="manifest" name="Hudson">
    <service name="application/hudson" type="service" version="1">

            <!-- Initial state of the service is disabled -->
            <create_default_instance enabled="false" />

            <!-- Only one instance of Hudson should ever run per server -->
            <single_instance />

            <dependency name="multi-user-server" type="service" grouping="require_all" restart_on="none">
                    <service_fmri value="svc:/milestone/multi-user-server" />
            </dependency>

            <method_context>
                    <method_credential user='hudson' group='other' />
                    <method_environment>
                            <envvar name='PATH' value='/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/usr/sfw/bin' />
                    </method_environment>
            </method_context>

            <!-- Set the HUDSON_HOME env variable, and run the war file in /apps/hudson/hudson.war -->
            <exec_method type="method" name="start" exec="java -Xmx512m -DHUDSON_HOME=/apps/hudson/ -classpath /apps/hudson/WEB-INF/lib/ss.jar:/apps/hudson/WEB-INF/lib/starteam-sdk.jar:/apps/hudson/WEB-INF/lib/starteam110-resources.jar:/apps/hudson/WEB-INF/lib/starteam110.jar:/apps/hudson/WEB-INF/lib/swingall.jar -jar /apps/hudson/hudson.war --prefix=/hudson" timeout_seconds="0"/>
            <exec_method type="method" name="stop" exec=":kill -TERM" timeout_seconds="30"/>

            <!-- We are going to be kicking off a single child process so we want Wait mode-->
            <property_group name='startd' type='framework'>
                    <propval name='duration' type='astring' value='child' />
            </property_group>

            <stability value="Unstable" />

            <template>
                    <common_name>
                            <loctext xml:lang='C'>Hudson Continuous Build Server</loctext>
                    </common_name>
                    <documentation>
                            <doc_link name='hudson.dev.java.net' uri='http://hudson.dev.java.net' />
                    </documentation>
            </template>
    </service>
</service_bundle>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

童话里做英雄 2024-11-15 05:48:45

我有类似的问题。问题是 - 在 SMF 文件上配置的用户名 [hudson] 和组 [cibuild] 不可用。我创建了它们,然后将目录 /apps/hudson 所有权更改为 hudson usercibuild group。更改后,我通过禁用和启用重新启动了该服务,然后它就工作了。

要禁用使用:

svcadm -v 禁用 hudson

要启用使用:

svcadm -v 启用 hudson

检查状态:

svcs -xv 哈德森

I had similar problem. The issue was - the user name [hudson] and the group [cibuild] which were configured on the SMF file were not available. I created both of them and then changed the directory /apps/hudson ownership to hudson user and cibuild group. After the change I have restarted the service by disable and enable and then it worked.

To disable use:

svcadm -v disable hudson

To enable use:

svcadm -v enable hudson

To check the status:

svcs -xv hudson

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文