<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — sa-update.cron hangs]]></title>
		<link>http://www.iredmail.org/forum/topic4171-saupdatecron-hangs.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic4171.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in sa-update.cron hangs.]]></description>
		<lastBuildDate>Wed, 28 Nov 2012 06:13:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19278.html#p19278</link>
			<description><![CDATA[<p>Weird.&nbsp; Amavisd + SpamAssassin are written in Perl, they don&#039;t use either web.py and cherrypy at all.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 28 Nov 2012 06:13:11 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19278.html#p19278</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19264.html#p19264</link>
			<description><![CDATA[<p>Hi ZhangHuangbin ! </p><p>You can close this post ! <br />The problem was on the webpy (old version), with the new update of python-webpy-0.37-2.el6.noarch and his new dependency:&nbsp; python-cherrypy-3.2.2-3.el6.noarch this problem got solved (rebooting the related services: iredapd, amavisd ... etc)</p><p>Thanks for the support</p>]]></description>
			<author><![CDATA[null@example.com (digitalbit)]]></author>
			<pubDate>Tue, 27 Nov 2012 18:29:56 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19264.html#p19264</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19153.html#p19153</link>
			<description><![CDATA[<p>Hi ZhangHuangbin !</p><br /><p>Got this workaround for now ...</p><br /><p>Replace this line:<br />/sbin/pidof $daemon &gt;&amp; /dev/null</p><br /><p>with this:<br />/usr/bin/pgrep $daemon &gt;&amp; /dev/null</p><br /><p>and this line:</p><p>sleep $(expr $RANDOM % 7200)</p><p>with this:</p><p>sleep $(expr $RANDOM % 60)</p><br /><p>Let me check the next days behave!<br />Any better ideas ?!</p>]]></description>
			<author><![CDATA[null@example.com (digitalbit)]]></author>
			<pubDate>Mon, 19 Nov 2012 17:38:11 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19153.html#p19153</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19150.html#p19150</link>
			<description><![CDATA[<p>Thanks again for the support ! </p><p>#&gt; /etc/init.d/amavisd status</p><p>amavisd (pid 13880 13775 1373) is running...</p><br /><br /><p>#&gt; ps -ef | grep amavisd</p><p>amavis&nbsp; &nbsp; 1373&nbsp; &nbsp; &nbsp;1&nbsp; 0 Nov17 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:05 amavisd (master)<br />amavis&nbsp; &nbsp;13775&nbsp; 1373&nbsp; 0 14:49 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:07 amavisd (ch13-avail)<br />amavis&nbsp; &nbsp;13880&nbsp; 1373&nbsp; 0 14:54 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:06 amavisd (ch10-avail)</p><br /><br /><p>#&gt; /etc/init.d/amavisd condrestart</p><p>Shutting down amavisd: The amavisd daemon is not running&nbsp; &nbsp; &nbsp; [FAILED]</p><p>Starting amavisd:&nbsp; &nbsp; [&nbsp; OK&nbsp; ]</p><br /><br /><p>.... if I retype the command &quot;/etc/init.d/amavisd condrestart&quot; again the output fails again &quot;Shutting down amavisd: The amavisd daemon is not running&quot; <img src="http://www.iredmail.org/forum/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>Got no idea why this is happening !<br />Any tip/debug please !!</p>]]></description>
			<author><![CDATA[null@example.com (digitalbit)]]></author>
			<pubDate>Mon, 19 Nov 2012 15:16:42 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19150.html#p19150</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19148.html#p19148</link>
			<description><![CDATA[<div class="quotebox"><cite>digitalbit wrote:</cite><blockquote><p>+ /sbin/service amavisd condrestart</p></blockquote></div><p>Make sure above command can correctly detect Amavisd service status first.</p><p>Works fine for me here (CentOS 6.3, x86_64):<br /></p><div class="codebox"><pre><code># /etc/init.d/amavisd condrestart
Shutting down amavisd: Daemon [1250] terminated by SIGTERM
                                                           [  OK  ]
amavisd stopped
Starting amavisd:                                          [  OK  ]

# echo $?
0</code></pre></div><p>Executing /etc/cron.d/sa-update manually looks fine:<br /></p><div class="codebox"><pre><code>...
+ &#039;[&#039; 0 -eq 0 &#039;]&#039;
+ /sbin/service spamassassin condrestart
+ &#039;[&#039; -f /etc/init.d/amavisd &#039;]&#039;
+ /sbin/service amavisd condrestart
+ &#039;[&#039; -f /var/run/mimedefang.pid &#039;]&#039;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 19 Nov 2012 13:29:50 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19148.html#p19148</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19147.html#p19147</link>
			<description><![CDATA[<p>Thanks for the solution ... but still: </p><p>IF you comment this line to remove the delay ... the sa-update.cron output shows me:</p><p>(...)<br />+ &#039;[&#039; 0 -eq 0 &#039;]&#039;<br />+ /sbin/service spamassassin condrestart<br />+ &#039;[&#039; -f /etc/init.d/amavisd &#039;]&#039;<br />+ /sbin/service amavisd condrestart<br />The amavisd daemon is not running<br />+ &#039;[&#039; -f /var/run/mimedefang.pid &#039;]&#039;</p><br /><p>then I checked ...</p><p>#&gt; ps -ef | grep amavis<br />amavis&nbsp; &nbsp; 1373&nbsp; &nbsp; &nbsp;1&nbsp; 0 Nov17 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:03 amavisd (master)<br />amavis&nbsp; &nbsp; 1490&nbsp; 1373&nbsp; 0 Nov17 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:17 amavisd (ch18-avail)<br />amavis&nbsp; &nbsp; 5100&nbsp; 1373&nbsp; 0 09:30 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:00 amavisd (ch1-avail)<br />root&nbsp; &nbsp; &nbsp; 6529&nbsp; 6452&nbsp; 0 17:47 pts/0&nbsp; &nbsp; 00:00:00 grep amavis</p><p>Why it outputs me &quot; The amavisd daemon is not running &quot; ... if it is ON ?!</p>]]></description>
			<author><![CDATA[null@example.com (digitalbit)]]></author>
			<pubDate>Mon, 19 Nov 2012 13:06:08 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19147.html#p19147</guid>
		</item>
		<item>
			<title><![CDATA[Re: sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19145.html#p19145</link>
			<description><![CDATA[<p>Looks like caused by this line &quot;sleep $(expr $RANDOM % 7200)&quot;.<br />$RANDOM will return a integer number larger than 10000 and smaller than 99999, so the sleep seconds will be between 1 second (10000 % 7200) and 6399 seconds. If it&#039;s too long, it looks like &quot;hangs&quot;, but it doesn&#039;t.<br />Try hard-coding sleep seconds to avoid &quot;hangs&quot;. For example, replace it by &quot;sleep 60&quot; to sleep 1 minute, or &quot;sleep 3600&quot; to sleep 1 hour.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 19 Nov 2012 12:33:15 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19145.html#p19145</guid>
		</item>
		<item>
			<title><![CDATA[sa-update.cron hangs]]></title>
			<link>http://www.iredmail.org/forum/post19140.html#p19140</link>
			<description><![CDATA[<p>==== Required information ====<br />- iRedMail version: 0.8.3<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL<br />- Linux/BSD distribution name and version: CentOS 6.3<br />- Related log if you&#039;re reporting an issue: <br />==== </p><p>Greetings community <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Got my self an odd issue with sa-update.cron !</p><p>If I run manually<br />#&gt; sa-update -D </p><p>everything works smooth !</p><br /><p>The problem starts in /etc/cron.d/sa-update</p><p>10 4 * * * root /usr/share/spamassassin/sa-update.cron 2&gt;&amp;1 | tee -a /var/log/sa-update.log</p><p>... executing this sa-update with:</p><p>sh -x /usr/share/spamassassin/sa-update.cron</p><p>the script code line .....&nbsp; &quot;sleep $(expr $RANDOM % 7200)&quot; hangs here !</p><p>Found this <a href="https://bugzilla.redhat.com/show_bug.cgi?id=561568">https://bugzilla.redhat.com/show_bug.cgi?id=561568</a> </p><p>IF you comment this line to remove the delay ... the sa-update.cron output shows me:</p><p>(...)<br />+ /sbin/service spamassassin condrestart<br />+ &#039;[&#039; -f /etc/init.d/amavisd &#039;]&#039;<br />+ /sbin/service amavisd condrestart<br />The amavisd daemon is not running<br />+ &#039;[&#039; -f /var/run/mimedefang.pid </p><p>then I checked ...</p><p>#&gt; ps -ef | grep amavis</p><p>amavis&nbsp; &nbsp; 1373&nbsp; &nbsp; &nbsp;1&nbsp; 0 Nov17 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:03 amavisd (master)<br />amavis&nbsp; &nbsp; 1490&nbsp; 1373&nbsp; 0 Nov17 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:17 amavisd (ch18-avail)<br />amavis&nbsp; &nbsp; 5100&nbsp; 1373&nbsp; 0 09:30 ?&nbsp; &nbsp; &nbsp; &nbsp; 00:00:00 amavisd (ch1-avail)<br />root&nbsp; &nbsp; &nbsp; 6529&nbsp; 6452&nbsp; 0 17:47 pts/0&nbsp; &nbsp; 00:00:00 grep amavis</p><p>It was running already !! </p><p>Does anyone experiencing this issue in sa-update.cron !?</p><p>All comments and ideas are welcome <img src="http://www.iredmail.org/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (digitalbit)]]></author>
			<pubDate>Mon, 19 Nov 2012 11:32:36 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post19140.html#p19140</guid>
		</item>
	</channel>
</rss>
