![]() |
![]() |
Subject: | zenoss 5 on debian |
Author: | [Not Specified] |
Posted: | 2016-02-02 00:32 |
so, I've managed to get far with installing zenoss 5 on debian jessie following the ubuntu manual installation and customise a few things due to dependancy failures.
Currently I am stuck starting serviced because I am unable to start it via systemctl, for some reason I am able to run the daemon in for example --master mode but I am not sure if that is the correct way to start it to make it pick up the remaining packages.
Is there someone who can tell me which serviced command I gotta run after installing the zenoss-core-service package
root@zenoss5test:/home/stefan# systemctl enable serviced
Failed to execute operation: No such file or directory
root@zenoss5test:/home/stefan# systemctl start serviced
Failed to start serviced.service: Unit serviced.service failed to load: No such file or directory.
https://paste.xsnews.nl/view/r347dJ4janv1OX
small update, got some errors starting serviced in master mode:
root@zenoss5test:/opt/serviced# ./bin/serviced --master
This master has been configured to be in pool: default
I0202 07:49:09.341950 32242 api.go:110] StartServer: [] (0)
I0202 07:49:09.344200 32242 daemon.go:175] Listening on [::]:4979
I0202 07:49:09.347348 32242 daemon.go:221] Checking interface address at 10.100.0.97/24
I0202 07:49:09.347392 32242 daemon.go:224] Host zenoss5test is a local address at 10.100.0.97
I0202 07:49:09.347533 32242 manager.go:123] setting elasticsearch-serviced, cluster: 7c0buqx4w66p0v73rx6hpj0wv
I0202 07:49:09.347572 32242 manager.go:123] setting elasticsearch-logstash, cluster: ayeqgu3bjdu6i5r1htfq3dt08
I0202 07:49:09.481065 32242 container.go:479] Starting isvc elasticsearch-serviced
I0202 07:49:09.481215 32242 container.go:479] Starting isvc elasticsearch-logstash
I0202 07:49:09.481299 32242 container.go:479] Starting isvc zookeeper
I0202 07:49:09.481379 32242 container.go:479] Starting isvc opentsdb
I0202 07:49:09.481471 32242 container.go:479] Starting isvc celery
I0202 07:49:09.481547 32242 container.go:479] Starting isvc docker-registry
I0202 07:49:09.481673 32242 container.go:353] Creating a new container for isvc serviced-isvcs_elasticsearch-serviced
W0202 07:49:09.481790 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
I0202 07:49:09.482271 32242 container.go:353] Creating a new container for isvc serviced-isvcs_elasticsearch-logstash
W0202 07:49:09.482362 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
I0202 07:49:09.482517 32242 container.go:353] Creating a new container for isvc serviced-isvcs_zookeeper
W0202 07:49:09.482602 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
I0202 07:49:09.482758 32242 container.go:353] Creating a new container for isvc serviced-isvcs_opentsdb
W0202 07:49:09.482846 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
I0202 07:49:09.483009 32242 container.go:353] Creating a new container for isvc serviced-isvcs_celery
W0202 07:49:09.483090 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
I0202 07:49:09.483242 32242 container.go:353] Creating a new container for isvc serviced-isvcs_docker-registry
W0202 07:49:09.483330 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
W0202 07:49:10.134359 32242 es.go:229] Problem looking up http://localhost:9100/_cluster/health: Get http://localhost:9100/_cluster/health: read tcp 127.0.0.1:9100: connection reset by peer
Subject: | W0202 07:49:09.481790 32242 |
Author: | [Not Specified] |
Posted: | 2016-02-02 04:13 |
W0202 07:49:09.481790 32242 container.go:319] Could not mount source /go/src/github.com/control-center/serviced/isvcs/resources: path does not exist
does anybody know how to fix the above error
Subject: | Yes, I will help you this |
Author: | [Not Specified] |
Posted: | 2016-09-14 05:47 |
Yes, I will help you this evening because I am unable to check the servers now
Subject: | you need init scripts, I made |
Author: | [Not Specified] |
Posted: | 2016-09-14 09:08 |
you need init scripts, I made custom scripts but feel free to edit them where you need.
Please dont mind the awefull scripting, I am fairly new to it.
/etc/init.d/zenoss
#!/bin/bash
SERVICED_PIDFILE=/var/run/serviced.pid
serviced_pid=`cat "$SERVICED_PIDFILE" 2>/dev/null`
fail_unless_root() {
if [ "$(id -u)" != '0' ]; then
echo "Zenoss must be run as root"
exit 1
fi
}
start_zenoss() {
if [ "$serviced_pid" ]; then
serviced service start zenoss.core 2> /dev/null
DATE=`date "+%d%m%y-%H%M%S"`
exit 0
else
echo "Unable to start Zenoss, Serviced is not running"
exit 3
fi
}
stop_zenoss() {
if [ "$serviced_pid" ]; then
serviced service stop zenoss.core 2> /dev/null
while ; do
sleep 5
done
echo "."
exit 3
else
echo "Zenoss is not running"
exit 3
fi
}
restart_zenoss() {
stop_zenoss
sleep 5
start_zenoss
}
zenoss_status() {
if [ "$serviced_pid" ]; then
STATUS=`serviced service status zenoss.core 2> /dev/null | tail -n 1 | awk '{print $3}'`
if [ "${STATUS}" == "Stopped" ]; then
echo "Zenoss is not running"
exit 3
else
echo "Zenoss is running"
zenoss_services=`timeout 5 serviced service status 2> /dev/null`
zenoss_running=`echo "$zenoss_services" | grep 'Running' | wc -l`
zenoss_stopped=`echo "$zenoss_services" | grep 'Stopped' | wc -l`
zenoss_starting=`echo "$zenoss_services" | grep 'Starting' | wc -l`
zenoss_stopping=`echo "$zenoss_services" | grep 'Stoping' | wc -l`
echo "Zenoss instance status: $zenoss_running running | $zenoss_stopped stopped | $zenoss_starting starting | $zenoss_stopping stopping"
exit 0
fi
else
echo "Zenoss is not running"
exit 3
fi
}
case "$1" in
start)
fail_unless_root
start_zenoss
;;
stop)
fail_unless_root
stop_zenoss
exit 3
;;
restart)
fail_unless_root
restart_zenoss
;;
status)
zenoss_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
/etc/init.d/serviced
#!/bin/bash
### BEGIN INIT INFO
# Provides: serviced
# Description:
# Control Center (serviced) is an open source application management and orchestration system.
# Control Center can not only manage the Zenoss platform but other Docker applications,
# from a simple web application to a multi-tiered stateful application stack.
### END INIT INFO
BASE="serviced"
SERVICED=/opt/serviced/bin/$BASE
SERVICED_PIDFILE=/var/run/$BASE.pid
SERVICED_LOGFILE=/var/log/$BASE.log
SERVICED_DESC="Serviced"
SERVICED_ENV="HOME=/root GOMAXPROCS=12 TZ=CET SERVICED_HOME=/opt/serviced SERVICED_AGENT=1 SERVICED_MASTER=1 SERVICED_REGISTRY=1 SERVICED_FS_TYPE=btrfs SERVICED_SNAPSHOT_TTL=604800 SERVICED_KEY_FILE=/opt/zenoss/ssl/wildcard.key SERVICED_CERT_FILE=/opt/zenoss/ssl/wildcard.cert"
# Check serviced is present
if [ ! -x $SERVICED ]; then
echo "$SERVICED not present or not executable"
exit 1
fi
fail_unless_root() {
if [ "$(id -u)" != '0' ]; then
echo "$SERVICED_DESC must be run as root"
exit 1
fi
}
start_zenoss() {
serviced_pid=`/bin/cat "$SERVICED_PIDFILE" 2>/dev/null`
if [ "$serviced_pid" ]; then
echo "Serviced already running (pid:$serviced_pid)"
exit 0
fi
touch "$SERVICED_LOGFILE"
ulimit -n 1048576
echo "Starting Serviced"
/sbin/start-stop-daemon --start --background \
--no-close \
--exec \
/usr/bin/env $SERVICED_ENV \
$SERVICED \
--pidfile "$SERVICED_PIDFILE" \
--make-pidfile \
-- >> "$SERVICED_LOGFILE" 2>&1
until ; do
sleep 5
done
}
stop_zenoss() {
serviced_pid=`cat "$SERVICED_PIDFILE" 2>/dev/null`
if [ -z "$serviced_pid" ]; then
echo "Serviced already stopped"
exit 3
fi
#RUNNING=`serviced service status 2> /dev/null | grep -E "Running|Stopping|Starting"`
#if [ "$RUNNING" ]; then
# echo "Zenoss.core still running (/etc/init.d/zenoss stop)"
# exit 0
#fi
echo "Stopping Serviced"
/sbin/start-stop-daemon --stop --pidfile "$SERVICED_PIDFILE"
while ; do
sleep 5
done
rm /var/run/serviced.pid
echo "Serviced stopped"
}
restart_zenoss() {
stop_zenoss
sleep 5
start_zenoss
}
zenoss_status() {
serviced_pid=`cat "$SERVICED_PIDFILE" 2>/dev/null`
if [ -n "$serviced_pid" ]; then
echo "Serviced is running (pid:$serviced_pid)"
zenoss_services=`timeout 5 serviced service status 2> /dev/null`
zenoss_running=`echo "$zenoss_services" | grep 'Running' | wc -l`
zenoss_stopped=`echo "$zenoss_services" | grep 'Stopped' | wc -l`
zenoss_starting=`echo "$zenoss_services" | grep 'Starting' | wc -l`
zenoss_stopping=`echo "$zenoss_services" | grep 'Stoping' | wc -l`
echo "Zenoss instance status: $zenoss_running running | $zenoss_stopped stopped | $zenoss_starting starting | $zenoss_stopping stopping"
exit 0
else
echo "Serviced is not running"
exit 3
fi
}
case "$1" in
start)
fail_unless_root
start_zenoss
;;
stop)
fail_unless_root
stop_zenoss
exit 3
;;
restart)
fail_unless_root
restart_zenoss
;;
status)
zenoss_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
< |
Previous Zenoss does not connect to Server running Cygwin openSSH |
Next Zenoss install guide lastest error - Zenoss 5.0.9 |
> |