Sidekiq logging in Runit

瀏覽次數:36 次
跳到第一則未讀訊息

Gary Malouf

未讀,
2015年3月3日 上午9:15:572015/3/3
收件者:sid...@googlegroups.com
I've run into a confusing issue capturing sidekiq sysout data and am hoping to get some assistance.

We have been running sidekiq via runit for a while with great success.  This was on an ubuntu vm where the sidekiq run script itself ran the command as the ubuntu user.  Recently we upgraded our Ruby version from 2.0.x to 2.2.0 and for permission reasons needed to move the 'bundle' command from being global to being owned by our ubuntu user.  At the same time, we upgrade to the latest 3.x release of sidekiq from a 2.x release.  We thus changed our run script to the following:

#!/bin/sh
cd my_app_home
exec 2>&1
exec chpst -uubuntu -e /etc/sv/sidekiq/environment bash -c "source ~/.profile && bundle exec sidekiq -C config/sidekiq.yml -P tmp/pids/sidekiq.pid"

When I run the command directly (outside of runit), I get the expected output from sidekiq directly in sysout.  However, when inside runit, that app starts but the output is not going to my configured log location like it used to.

log/run:

#!/bin/sh
exec chpst -uubuntu svlogd -tt /var/log/sidekiq


I've checked all my file permissions to ensure ubuntu user has access (have actually run svlogd as root too to test) and have no issues there.  From checks via 'ps aux' and the rails console, sidekiq is running but I'm clearly not capturing the output anymore.  

I am really confused as to what could be happening, am I not configuring the logging properly?

Thank you,

Gary
回覆所有人
回覆作者
轉寄
0 則新訊息