2

looking for some troubleshooting suggestions...

I have an application installed running as a service under my user account (yes, I should likely create its own account).

Anyhow, every now and then it just stops running. When I go to restart it as such:

sudo start service couchpotato

It executes the start correctly, but in the syslog message I see:

kernel: [36187.466098] init: couchpotato main process (25738) terminated with status 2
kernel: [36187.466125] init: couchpotato main process ended, respawning
...
kernel: [36187.496753] init: couchpotato main process (25740) terminated with status 2
kernel: [36187.496779] init: couchpotato respawning too fast, stopped

I suspect this maybe related to an upgrade process inside that breaks permissions (or something?). I've reviewed all the directories and associated permissions. I've also reviewed the init config, but I can't seem to track down the issue. The application log has zero lines in it suggesting that the application is not instantiating far enough to even write a log entry (which I guess makes sense since the above is a kernel error).

Any suggestions on where else I can look to get a hint at what might be the problem here?

Thanks in advance for any suggestions!

  • Check the couchpotato documentation - an exit status of 2 may mean something. – waltinator Jun 26 '16 at 4:14
  • Thanks @waltinator, no luck in couch potato docs... – MotoDC Dec 15 '16 at 4:08
  • 1
    Using perror from the package mysql-server-5.7, one sees OS error code 2: No such file or directory, which could also mean "parent directory permission"). Not a kernel error, just a flavor of Fail. – waltinator Dec 16 '16 at 17:06
  • Thanks @waltinator, I'll hunt down how init.d is starting the process versus my cli start.... thought I covered that, but must be something in there. – MotoDC Dec 19 '16 at 2:49
2

You can try a few steps:

  • Check if it can find its libraries: ldd /path/to/couchpotato. If you installed it in a non-standard patch make sure it picks its libraries from where you installed it rather than from /usr/lib.
  • Run the program in the foreground: /path/to/couchpotato. If necessary add a parameter or 2 after checking the manual. It may print an error message saying what is wrong with it.
  • If you have some programming experience run the program under Strace. It will tell you which system call fails and that may help you decide what to do - create a directory, fix permissions, etc.
  • Thanks so much for your response smurf! to your questions... couchpotato is a python "app", so running 'ldd' gives me the output of 'not a dynamic executable'. The program runs in the foreground fine, and even with the '--daemon' switch is runs as expected. I only get this error condition when trying to start is using init.d. Part of my delay was that it was working fine.... now for some reason I'm back to this state. – MotoDC Dec 15 '16 at 4:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.