0Answer
  • 15
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Keep Service Running with Upstart

I am trying to use upstart to keep a service running: rabbitmq-server.

I have written an upstart configuration file in /etc/init/rabbitmq.conf

  1
  2 start on runlevel [2345]
  3 stop on runlevel [016]
  4
  5 respawn
  6 exec /etc/init.d/rabbitmq-server start

The problem is that this script thinks that rabbitmq-server has crashed right after it runs and it continues to try and restart it until upstart determines it has restarted too many times and ultimatly exits:

Aug 29 19:01:47 WORKER1 kernel: [ 1334.301258] init: rabbitmq main process ended, respawning
Aug 29 19:01:48 WORKER1 kernel: [ 1334.740770] init: rabbitmq main process ended, respawning
Aug 29 19:01:48 WORKER1 kernel: [ 1335.227660] init: rabbitmq main process ended, respawning
Aug 29 19:01:49 WORKER1 kernel: [ 1335.721948] init: rabbitmq respawning too fast, stopped

How can I write an upstart script to keep a service running?

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags