我有一个数据管理软件,但似乎无法运行。每当我启动该程序时,它都会给我这个
[root@001 install]# bash niagarad_generic start
Starting Niagara Daemon: [ OK ]
但当我检查状态时我得到了
[root@001 install]# bash niagarad_generic status
niagarad is stopped
我如何知道服务无法启动的原因?
我在调试模式下运行它,这就是我得到的结果
[root@001 install]# Niagara-3.8.41bash -x niagarad_generic start
-bash: Niagara-3.8.41bash: command not found
[root@001 install]# bash -x niagarad_generic start
+ DAEMON=/bin/niagarad
+ PROG='Niagara Daemon'
+ SERVICE_NAME=naxd
+ PIDDIR=/var/run/niagarad
+ PIDFILE=/var/run/niagarad/niagarad.pid
+ REDHAT=false
+ DEBIAN=false
+ '[' -f /etc/init.d/functions ']'
+ . /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' 676 -ne 1 -a -z '' ']'
++ /bin/mountpoint -q /cgroup/systemd
++ /bin/mountpoint -q /sys/fs/cgroup/systemd
++ case "$0" in
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
++ '[' -c /dev/stderr -a -r /dev/stderr ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -z '' ']'
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/i18n -o -f /etc/locale.conf ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
++ '[' '' = 1 ']'
+ REDHAT=true
+ DEBIAN=false
+ LOCKFILE=/var/lock/subsys/niagarad
+ '[' '!' -d /var/run/niagarad ']'
+ true
+ . /etc/sysconfig/network
++ NETWORKING=yes
++ GATEWAYDEV=venet0
++ NETWORKING_IPV6=yes
++ IPV6_DEFAULTDEV=venet0
+ '[' yes = no ']'
+ '[' root '!=' niagarad ']'
+ SUDO_REQUIRES_TTY=true
+ true
+ '[' root = root ']'
+ cat /etc/sudoers
+ grep '^Defaults.*\!requiretty'
+ cat /etc/sudoers
+ grep '^Defaults.*requiretty'
+ SUDO_REQUIRES_TTY=true
+ HAS_TTY=false
+ tty -s
+ '[' -t 0 ']'
++ who
+ WHO_OUTPUT='root pts/0 2016-01-07 14:54 (dhcp-d0-3-4b-d1-33-5a.cpe.wightman.ca)'
+ '[' 78 '!=' 0 ']'
+ HAS_TTY=true
+ true
+ true
+ sudo -u niagarad /usr/bin/niagaradctl start
Starting Niagara Daemon: [ OK ]
+ exit 0
答案1
也许您可以尝试使用以下命令运行它:
bash -x niagarad_generic start
这将启用调试。