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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 59m 1 Backlog Manager 15/Nov/15 3:04 AM
        In Progress In Progress Answered Answered
        2h 59m 1 Backlog Manager 15/Nov/15 6:04 AM
        Answered Answered Closed Closed
        1d 3h 7m 1 Manuel Escriche 16/Nov/15 9:12 AM

          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: