It seems that solr is not coming back up cleanly after logrotate. I’m using the opscode provided .deb packages on Ubuntu 10.04.
% cat /var/log/chef/solr.log
[Sun, 22 Aug 2010 06:30:03 +0100] INFO: About to change privilege to chef:chef
[Sun, 22 Aug 2010 06:30:03 +0100] FATAL: Chef is already running pid 11974
Looking back over the log, it seems that its trying to restart it before the old one has shutdown:
% sudo kill -0 11974
kill: No such process
% zgrep -e ‘Forked, in|FATAL’ /var/log/chef/solr.log*
/var/log/chef/solr.log:[Sun, 22 Aug 2010 06:30:03 +0100] FATAL: Chef is already running pid 11974
/var/log/chef/solr.log.1.gz:[Sun, 15 Aug 2010 06:39:00 +0100] FATAL: Chef is already running pid 16429
/var/log/chef/solr.log.1.gz:[Mon, 16 Aug 2010 15:12:05 +0100] INFO: Forked, in 11923. Priveleges: 111 112
/var/log/chef/solr.log.1.gz:[Mon, 16 Aug 2010 15:12:12 +0100] INFO: Forked, in 11974. Priveleges: 111 112
/var/log/chef/solr.log.2.gz:[Tue, 10 Aug 2010 14:01:12 +0100] INFO: Forked, in 9285. Priveleges: 111 112
/var/log/chef/solr.log.2.gz:[Tue, 10 Aug 2010 14:08:05 +0100] INFO: Forked, in 10231. Priveleges: 111 112
/var/log/chef/solr.log.2.gz:[Tue, 10 Aug 2010 14:11:11 +0100] INFO: Forked, in 12761. Priveleges: 111 112
/var/log/chef/solr.log.2.gz:[Tue, 10 Aug 2010 14:17:58 +0100] INFO: Forked, in 16429. Priveleges: 111 112
Anyone else noticed this problem? Better yet anyone got a solution?
-ash
On 22 August 2010 20:04, Ash Berlin ash_opscode@firemirror.com wrote:
It seems that solr is not coming back up cleanly after logrotate. I'm using the opscode provided .deb packages on Ubuntu 10.04.
% cat /var/log/chef/solr.log
[Sun, 22 Aug 2010 06:30:03 +0100] INFO: About to change privilege to chef:chef
[Sun, 22 Aug 2010 06:30:03 +0100] FATAL: Chef is already running pid 11974
Anyone else noticed this problem? Better yet anyone got a solution?
Yup, I'm looking into it at the moment. It looks like it's actually a
bug in chef-solr's init script, probably due to this:
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
errcode=0
stop_server || errcode=$?
[ -n "$DIETIME" ] && sleep $DIETIME
start_server || errcode=$?
[ -n "$STARTTIME" ] && sleep $STARTTIME
running || errcode=$?
log_end_msg $errcode
;;
I have a feeling $DIETIME is too short, but I've not been able to
track down where it's defined yet.
Hello!
On Aug 23, 2010, at 3:47 AM, Jon Wood wrote:
Yup, I'm looking into it at the moment. It looks like it's actually a
bug in chef-solr's init script, probably due to this:
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
errcode=0
stop_server || errcode=$?
[ -n "$DIETIME" ] && sleep $DIETIME
start_server || errcode=$?
[ -n "$STARTTIME" ] && sleep $STARTTIME
running || errcode=$?
log_end_msg $errcode
;;
I have a feeling $DIETIME is too short, but I've not been able to
track down where it's defined yet.
$DIETIME and $STARTTIME aren't defined anywhere. You can add them to /etc/default/chef-solr and /etc/default/chef-solr-indexer to have the init scripts utilize the sleep to give the process time to stop or start.
That said, I'm updating the scripts, and the chef-server init scripts as well, with ticket CHEF-1614
http://tickets.opscode.com/browse/CHEF-1614
Thanks!
--
Opscode, Inc
Joshua Timberman, Technical Evangelist
C: 720.334.RUBY E: joshua@opscode.com