Daemon lxd-client client is not running
by gustav3000 from LinuxQuestions.org on (#5P2GM)
I have a problem with my init service. After I started the service lxd-agent I tried to check its status. I can see in the output of /etc/rc.d/rc.lxd-agent status below message:
Code:daemon: lxd-agent is running (pid 3351) (client is not running)Command lxc exec slackware-vm -- sudo -i redirects me into the proper bash shell. Can I just ignore the above message complaining about that client is not running and everything will work fine? daemon is the following program: http://libslack.org/daemon/.
Here's my /etc/rc.d/rc.lxd-agent script:
Code:#!/bin/sh
PRGNAM="lxd-agent"
BIN="/run/lxd_config/drive/lxd-agent"
PID="/run"
CHDIR="/run/lxd_config/drive"
lxd_agent_start() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo "${PRGNAM} is already running."
else
echo -n "Starting ${PRGNAM}..."
/usr/bin/daemon --respawn --name "${PRGNAM}" --pidfiles "${PID}" \
--chdir "${CHDIR}" -- "${BIN}"
echo "done."
fi
}
lxd_agent_stop() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Stopping ${PRGNAM}..."
/usr/bin/daemon --stop --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
fi
}
lxd_agent_restart() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Restarting ${PRGNAM}..."
/usr/bin/daemon --restart --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
exit 1
fi
}
lxd_agent_status() {
/usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}" --verbose
}
case $1 in
"start")
lxd_agent_start
;;
"stop")
lxd_agent_stop
;;
"restart")
lxd_agent_restart
;;
"status")
lxd_agent_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
Code:daemon: lxd-agent is running (pid 3351) (client is not running)Command lxc exec slackware-vm -- sudo -i redirects me into the proper bash shell. Can I just ignore the above message complaining about that client is not running and everything will work fine? daemon is the following program: http://libslack.org/daemon/.
Here's my /etc/rc.d/rc.lxd-agent script:
Code:#!/bin/sh
PRGNAM="lxd-agent"
BIN="/run/lxd_config/drive/lxd-agent"
PID="/run"
CHDIR="/run/lxd_config/drive"
lxd_agent_start() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo "${PRGNAM} is already running."
else
echo -n "Starting ${PRGNAM}..."
/usr/bin/daemon --respawn --name "${PRGNAM}" --pidfiles "${PID}" \
--chdir "${CHDIR}" -- "${BIN}"
echo "done."
fi
}
lxd_agent_stop() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Stopping ${PRGNAM}..."
/usr/bin/daemon --stop --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
fi
}
lxd_agent_restart() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Restarting ${PRGNAM}..."
/usr/bin/daemon --restart --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
exit 1
fi
}
lxd_agent_status() {
/usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}" --verbose
}
case $1 in
"start")
lxd_agent_start
;;
"stop")
lxd_agent_stop
;;
"restart")
lxd_agent_restart
;;
"status")
lxd_agent_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac