Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
HD-Chapter:IoT
-
HD-Enabler:IDAS
Description
Created question in FIWARE Q/A platform on 07-08-2015 at 15:08
Please, ANSWER this question AT http://stackoverflow.com/questions/31878401/centos-7-auto-restart-application-if-it-stopped
Question:
Centos 7: Auto restart application if it stopped
Description:
I want to auto restart my application "Fiware IoT Agent" if it stopped, the problem is that it depends of Mongo Db Data Base and the Mosquitto broker. My OS is centOS 7
Here is the commands that I use to launch my three application in the following order:
*Mongo:
/usr/local/iot/mongodb-linux-x86_64-3.0.5/bin/mongod --dbpath /usr/local/iot/mongodb-linux-x86_64-3.0.5/data/db$
*Mosquitto broker
/usr/sbin/mosquitto -c /etc/iot/mosquitto.conf &
pid=$!
echo $pid > /var/run/iot/mosquitto.pid
Iot Agent:
than I start my application using this command
export LD_LIBRARY_PATH=/usr/local/iot/lib
/usr/local/iot/bin/iotagent -i 192.168.1.11 -p 80 -v DEBUG -d /usr/local/iot/lib -c /etc/iot/config.json
how can I start my application if it stopped known that it depends of the other two application? If for example Mongo DB stopped, I must be able to restart it and then to restart my application.
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Assignee | Carlos Ralli Ucendo [ ralli ] |
Summary | [fiware-stackoverflow] Centos 7: Auto restart application if it stopped | FIWARE.Question.Tech.Centos 7: Auto restart application if it stopped |
Summary | FIWARE.Question.Tech.Centos 7: Auto restart application if it stopped | FIWARE.Question.Tech.IoT.IDAS.Centos 7: Auto restart application if it stopped |
HD-Enabler | IDAS [ 10884 ] | |
HD-Chapter | IoT [ 10839 ] |
Fix Version/s | 2021 [ 12600 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
2h 59m | 1 | Backlog Manager | 15/Nov/15 3:04 AM | |||||
|
2h 59m | 1 | Backlog Manager | 15/Nov/15 6:04 AM | |||||
|
1d 3h 7m | 1 | Manuel Escriche | 16/Nov/15 9:12 AM |
2015-11-15 00:05|CREATED monitor | # answers= 2, accepted answer= True