0

I make a file in my rails app /bin/restart_resque.sh

kill  `cat tmp/pids/scheduler.pid`

When I execute bin/restart_resque.sh,I got the error

: arguments must be process or job IDs624

and the process is still working.

Then I change the file to :

kill  2624

I got the same error,but the process 2624 is do exist.why?

HXH
  • 1,643
  • 4
  • 19
  • 31

2 Answers2

0

You have invalid PID in scheduler.pid or file is not exists.

Check file and permissions:

namei -lm tmp/pids/scheduler.pid

Check PID (resque process must have PID from pid file):

cat tmp/pids/scheduler.pid
ps aux | grep `cat tmp/pids/scheduler.pid`
Maxim
  • 9,701
  • 5
  • 60
  • 108
0

I found the issue.

when I execute file bin/resque_restart.sh

bin/resque_restart.sh: ASCII text, with CRLF line terminators

so the file format is the reason.but I don't know why.

HXH
  • 1,643
  • 4
  • 19
  • 31