我在运行 Ubuntu 14.04 LTS 的 Dell PowerEdge 2850 上安装了 Dell 的 Ubuntu OpenManage 7.4.0 软件包。但是,我无法启动 Web 界面。
所有其他工具均按预期工作,包括omreport
、omconfig
和omhelp
。
$ sudo service dsm_om_connsvc start
Starting DSM SA Connection Service: *
$ sudo service dsm_om_connsvc status
dsm_om_connsvcd is stopped
检查日志可以清楚表明该进程未能正常启动。
$ tail -n 100 /opt/dell/srvadmin/var/log/openmanage/dsm_om_connsvcdIO.log
status(-3) 38:32 2016] (1504) RunServer:daemon worker forked
[Jul 7 18:38:32 2016] (1505) RunServer:worker process entry
[Jul 7 18:38:32 2016] (1504) RunServer:daemon waiting for worker init status
[Jul 7 18:38:32 2016] (1505) ModuleAttach: entry 0
[Jul 7 18:38:32 2016] (1505) ModuleAttach: starting the startserver thread
[Jul 7 18:38:32 2016] (1505) ModuleAttach(ERROR): startserver thread exited prematurely, aborting!
[Jul 7 18:38:32 2016] (1505) ModuleAttach: exit with errors!
[Jul 7 18:38:32 2016] (1505) RunServer: ModuleAttach failed
[Jul 7 18:38:32 2016] (1505) RunServer:worker process EXIT status(-3)
[Jul 7 18:38:32 2016] (1504) RunServer:daemon process EXIT status(-3)
[Jul 7 18:38:32 2016] (1505) RunServer exit with status(-3)
[Jul 7 18:38:32 2016] (1502) RunServer:parent process EXIT status(-3)
根据此主题,过时的 JRE 有时是罪魁祸首,但经检查,它是最新的。
/opt/dell/srvadmin/sbin/srvadmin-services.sh
使用和执行 shell 服务sh /opt/dell/srvadmin/sbin/srvadmin-services.sh start
会sh /opt/dell/srvadmin/sbin/srvadmin-services.sh stop
在同一行产生语法错误:/opt/dell/srvadmin/sbin/srvadmin-services.sh: 26: /opt/dell/srvadmin/sbin/srvadmin-services.sh: Syntax error: "(" unexpected
。但是,查看文件并没有发现任何异常。
#!/usr/bin/env bash
###############################################################################
#
# Dell Inc. PROPRIETARY INFORMATION
# This software is supplied under the terms of a license agreement or
# nondisclosure agreement with Dell Inc. and may not
# be copied or disclosed except in accordance with the terms of that
# agreement.
#
# Copyright (c) 2000-2009 Dell Inc. All Rights Reserved.
#
# Abstract/Purpose:
#
# This Script will start/stop/restart/status all the services installed
# by Systems Management.
#
###############################################################################
# ensure sbin utilities are available in path, so that su will also work
export PATH=/usr/kerberos/sbin:/usr/local/sbin:/sbin:/usr/sbin:$PATH
PATH="${PATH}:/sbin:/usr/sbin:/bin:/usr/bin"
# Server Administrator package prefix
SRVADMIN_STR="Server Administrator"
startDeps=(mptctl)
# list of services start
arrayStart=(racsvc instsvcdrv dataeng dsm_om_connsvc racser racvnc racsrvc)
# list of services to stop
arrayStop=(racsvc dsm_om_connsvc racser racvnc racsrvc dataeng instsvcdrv)
# list of services to find status
arrayStatus=(racsvc instsvcdrv dataeng dsm_om_connsvc racser racvnc racsrvc)
#
# start/stop/status for multiple services
#
serviceAction() {
action=$1
shift
services=$@
RET=0
for svc in $services; do
if [ -e /etc/init.d/$svc ]; then
/etc/init.d/$svc $action
RET=$?
fi
done
return $RET
}
#
# enable/disable multiple services
#
serviceCtl () {
ctl=$1
shift
services=$@
for svc in $services
do
chkconfig --list $svc 2>/dev/null || continue
chkconfig $svc $ctl
done
}
##
## Usage
##
function Usage {
cat <<EOF
Usage: srvadmin-services.sh {start|stop|status|restart|enable|disable|help}
start : starts ${SRVADMIN_STR} services
stop : stops ${SRVADMIN_STR} services
status : display status of ${SRVADMIN_STR} services
restart: restart ${SRVADMIN_STR} services
enable : Enable ${SRVADMIN_STR} services in runlevels 2, 3, 4, and 5
disable: Disable ${SRVADMIN_STR} services in runlevels 2, 3, 4, and 5
help : Displays this help text
EOF
exit 1
}
# make sure services dont busy out any mountpoints
cd /
# check for root privileges
if [ "${UID}" != "0" ]; then
echo "This utility requires root privileges"
exit 1
fi
action=$1
shift
# Note the ${@:- ... } set up this way so that we either stop/start/etc full
# set of services, or specific service if passed. ${@} is set to cmdline
# params. If these are not set, then the stuff after :- is used as a default.
if [ "${action}" == "start" ]; then
serviceAction start ${@:-${startDeps[*]} ${arrayStart[*]}}
elif [ "${action}" == "stop" ]; then
serviceAction stop ${@:-${arrayStop[*]}}
elif [ "${action}" == "status" ]; then
serviceAction status ${@:-${arrayStatus[*]}}
elif [ "${action}" == "restart" ]; then
serviceAction stop ${@:-${arrayStop[*]}}
serviceAction start ${@:-${startDeps[*]} ${arrayStart[*]}}
elif [ "${action}" == "freeze" ]; then
for service in ${@:-${startDeps[*]} ${arrayStart[*]}}; do
if serviceAction status $service; then
touch /opt/dell/srvadmin/var/run/freeze-$service
serviceAction stop $service
fi
done
elif [ "${action}" == "thaw" ]; then
for service in ${@:-${startDeps[*]} ${arrayStart[*]}}; do
if [ -e /opt/dell/srvadmin/var/run/freeze-$service ]; then
rm -f /opt/dell/srvadmin/var/run/freeze-$service
serviceAction start $service
fi
done
elif [ "${action}" == "condrestart" ]; then
# condrestart will restart a service if it is running, else noop
# used in rpm %post
for service in ${@:-${startDeps[*]} ${arrayStart[*]}}; do
if serviceAction status $service; then
serviceAction stop $service
serviceAction start $service
fi
done
elif [ "${action}" == "enable" ]; then
serviceCtl on ${@:-${arrayStatus[*]} ipmi}
elif [ "${action}" == "disable" ]; then
serviceCtl off ${@:-${arrayStatus[*]} ipmi}
else
[ -z "${action}" ] || echo -e "Invalid option '${action}', please see the usage below\n"
Usage
fi
我知道有一个非常相似的问题这里:然而,它已经很老了,没有答案,而且主人不再能使用机器进行工作,而我却可以随时用我的机器进行实验。因此我决定用我进一步的发现来提出一个新问题