Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-5310

FIWARE.Question.Tech.IoT.IDAS.Centos 7: Auto restart application if it stopped

    Details

      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

        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-15 00:05|CREATED monitor | # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-15 00:05|CREATED monitor | # answers= 2, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-15 03:05|UPDATED status: transition Answer| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-15 03:05|UPDATED status: transition Answer| # answers= 2, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-15 06:05|UPDATED status: transition Answered| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-15 06:05|UPDATED status: transition Answered| # answers= 2, accepted answer= True

          People

          • Assignee:
            ralli Carlos Ralli Ucendo
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: