Member since
03-27-2015
9
Posts
0
Kudos Received
0
Solutions
05-13-2015
03:57 AM
Thanks for the reply. dlo. It works.
... View more
05-13-2015
03:56 AM
Thanks dlo, You were correct, my service were daemons which was causing the issue. I made them to run in forground and everything just works fine.
... View more
05-07-2015
10:53 PM
Thanks for the reply. I am new to cloudera manager and CSD. I tried by spliiting the process into roles. In the role`s startrunner i have written to start one of my linux service, but the the role failed to start as Cloudera Manager attemped multiple times to start the same. First time it succeeded to start the service but then it attemped again multiple times and found the service is already running and thus failed to start. Please Guide me. Following is the stdout Fri May 8 01:26:13 EDT 2015
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
Using /var/run/cloudera-scm-agent/process/887-xx-xx_SERVICE as conf dir
Using scripts/control.sh as process script
Starting the xx service
xx Service StartsStarting xx-service service: xxservice started ...
[ OK ]
Fri May 8 01:26:16 EDT 2015
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
Using /var/run/cloudera-scm-agent/process/887-xx-xx_SERVICE as conf dir
Using scripts/control.sh as process script
Starting the xx service
xx Service Starts xx-service already running
Fri May 8 01:26:18 EDT 2015
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
Using /var/run/cloudera-scm-agent/process/887-xx-xx_SERVICE as conf dir
Using scripts/control.sh as process script
Starting the xx service
xx Service Starts xx-service already running
Fri May 8 01:26:21 EDT 2015
JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
Using /var/run/cloudera-scm-agent/process/887-xx-xx_SERVICE as conf dir
Using scripts/control.sh as process script
Starting the xx service
xx Service Starts xx-service already running
... View more
05-06-2015
10:46 PM
Hello All, I have build a custom service. I am doing some pre task (installation of drivers, start database and other daemon services etc) before calling exec.This service started succefully. Duing stop from Cloudera Manager , along with the service started with exec I wanto stop the services started in pre task also.for that .I have written a script to stop all the daemon services But I found that the only the service which is started with exec stops not in the pre-task. Please Guide me , how to solve the isuue. My service.sdl is as foolows {
"name" : "MYAPP",
"label" : "Myapp",
"description" : "My App Custom CSD",
"version" : "2.1",
"runAs" : {
"user" : "root",
"group" : "root"
},
"maxInstances" : 1,
"icon" : "images/myapp.png",
"parcel" : {
"repoUrl" : "http://xx.xx.xx.xx:xxxx/latest/",
"requiredTags" : [ "myapp" ]
},
"roles" : [
{
"name" : "MY_WEBSERVER",
"label" : "My Web Server",
"pluralLabel" : "My Web Server",
"startRunner" :
{
"program" : "scripts/control.sh",
"args" : [ "start" ]
},
"stopRunner" :
{
"relevantRoleTypes" : ["MY_WEBSERVER"],
"runner" :
{
"program" : "scripts/control.sh",
"args" : ["stop"]
},
"timeout" : 180000,
"masterRole" : "MY_WEBSERVER"
},
"topology" :
{
"minInstances" : "1",
"maxInstances" : "1"
},
"logging" :
{
"dir" : "/var/log/myapp-2.1/",
"filename" : "myapp.log"
}
}
]
} and my control.sh is as follows- #!/bin/bash
CMD=$1
case $CMD in
(start)
echo "Starting the MyAPP Service"
cp -r /opt/cloudera/parcels/myapp-2.1 /opt/
chmod 777 -R /opt/myapp-2.1/
sh /opt/myapp-2.1/resource/scripts/installer/MainScript
exec python -m SimpleHTTPServer 8080
;;
(stop)
sh /opt/myapp-2.1/resource/scripts/installer/StopAll
;;
(restart)
sh /opt/myapp-2.1/resource/scripts/installer/RestartAll
;;
(*)
echo "Don't understand [$CMD]"
;;
esac
... View more
Labels:
- Labels:
-
Cloudera Manager
05-06-2015
10:14 PM
Hello All, I am building a custom Service using CSD. I want to install some of the dependencies prior to start the service(just one time) for. example installation of drivers, starting database servers etc. . I am doing that by calling a shell script prior to exec. But the problem is whenever there is a call to start to the service all the pre strart process run again. How can i achieve this. #!/bin/bash
CMD=$1
case $CMD in
(start)
echo "Starting the MyApp Service"
cp -r /opt/cloudera/parcels/myapp-2.1 /opt/
chmod 777 -R /opt/myapp-2.1/
sh /opt/myapp-2.1/resource/scripts/installer/MainScript
exec python -m SimpleHTTPServer 8080
;;
(stop)
sh /opt/myapp-2.1/resource/scripts/installer/StopAll
;;
(restart)
sh /opt/myapp-2.1/resource/scripts/installer/RestartAll
;;
(*)
echo "Don't understand [$CMD]"
;;
esac
... View more