Thanks Kevin, it was exactly that, I changed the ID from 0 to 1 and everything<br>seems to be working now. <br><br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 3:18 PM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, Aug 24, 2011 at 03:07:46PM +0100, Francisco Amaro wrote:<br>
> And a user id 1, is there one ? Could it be that someone/something changed that, a 1 to 0 ?<br>
> I've already asked around, and the usual suspects all say that didn't change<br>
> anything, and the logs agree with them...<br>
<br>
</div>The RT_System user should have an id of 1.<br>
Since LastUpdated isn't updated, this means any change happened at the<br>
DB level, or via corruption.<br>
<br>
-kevin<br>
<div class="im"><br>
> Where is the result from the user 0 fields:<br>
><br>
> mysql> select * from Users<br>
> -> WHERE id=0<br>
> -> ;<br>
> +----+-----------+---------------+----------------------------------------------------------------------------------------+-----------+--------------+---------------------+--------------+----------------------+----------+------+---------------+-------------+-----------------------+-------------------+----------------+------------+-------+-----------+-----------+-------------+------------+----------+----------+------+-------+------+---------+----------+--------+---------+---------------------+---------------+---------------------+<br>
> | id | Name | Password | Comments | Signature | EmailAddress | FreeformContactInfo |<br>
> Organization | RealName | NickName | Lang | EmailEncoding | WebEncoding |<br>
> ExternalContactInfoId | ContactInfoSystem | ExternalAuthId | AuthSystem | Gecos | HomePhone |<br>
> WorkPhone | MobilePhone | PagerPhone | Address1 | Address2 | City | State | Zip | Country |<br>
> Timezone | PGPKey | Creator | Created | LastUpdatedBy | LastUpdated |<br>
> +----+-----------+---------------+----------------------------------------------------------------------------------------+-----------+--------------+---------------------+--------------+----------------------+----------+------+---------------+-------------+-----------------------+-------------------+----------------+------------+-------+-----------+-----------+-------------+------------+----------+----------+------+-------+------+---------+----------+--------+---------+---------------------+---------------+---------------------+<br>
> | 0 | RT_System | *NO-PASSWORD* | Do not delete or modify this user. It is integral to RT's<br>
> internal database structures | NULL | NULL | NULL | NULL | The RT System itself | NULL | NULL<br>
> | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL |<br>
> NULL | NULL | NULL | NULL | NULL | NULL | 1 | 2006-03-10 17:33:35 | 1 | 2006-03-10 17:33:35 |<br>
> +----+-----------+---------------+----------------------------------------------------------------------------------------+-----------+--------------+---------------------+--------------+----------------------+----------+------+---------------+-------------+-----------------------+-------------------+----------------+------------+-------+-----------+-----------+-------------+------------+----------+----------+------+-------+------+---------+----------+--------+---------+---------------------+---------------+---------------------+<br>
> 1 row in set (0.00 sec)<br>
><br>
> The user fields seem correct, the comments, the creation time, etc.<br>
> But they refer to a user id 1, that is not on the table anymore.<br>
><br>
> I'm restoring yesterdays backup on another machine, but given the timelines<br>
> it probably has the same error. That means getting the tape from two days<br>
> ago, which is going to take some more time...<br>
><br>
</div><div><div></div><div class="h5">> On Wed, Aug 24, 2011 at 2:48 PM, Kevin Falcone <[1]<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>> wrote:<br>
><br>
> On Wed, Aug 24, 2011 at 02:32:10PM +0100, Francisco Amaro wrote:<br>
> > Hello all,<br>
> ><br>
> > We are having a problem with our RT install, after a few years of almost<br>
> > flawless service, today we noticed that emails weren't being sent.<br>
> > We are using version 3.4.5, on Linux (FC4, MySQL 4.1).<br>
> ><br>
> > The web interface works just fine, we can login, create/modify/close tickets,<br>
> > etc, but no emails are sent.<br>
> ><br>
> > There is no apparent problem with the machine or the MySQL database,<br>
> > and this is what appears on the RT log:<br>
> ><br>
> > [Wed Aug 24 12:23:50 2011] [err]: Couldn't load 0 from the users database.<br>
> > (/opt/rt3/lib/RT/CurrentUser.pm:146)<br>
> > [Wed Aug 24 12:23:50 2011] [warning]: Use of uninitialized value in concatenation (.) or<br>
> > string at /opt/rt3/lib/RT/Principal_Overlay.pm line 425. (/opt/rt3/lib/RT.pm:287)<br>
> > [Wed Aug 24 12:23:50 2011] [warning]: DBD::mysql::st execute failed: You have an error in<br>
> your<br>
> > SQL syntax; check the manual that corresponds to your MySQL server version for the right<br>
> > syntax to use near 'AND ((ACL.ObjectType = 'RT::Queue' AND ACL.ObjectId = 1) OR<br>
> > (ACL.ObjectType = 'R' at line 1 at<br>
> /usr/lib/perl5/site_perl/5.8.6/DBIx/SearchBuilder/Handle.pm<br>
> > line 505. (/opt/rt3/lib/RT.pm:287)<br>
> > [Wed Aug 24 12:23:50 2011] [warning]: RT::Handle=HASH(0x80c27d90) couldn't execute the<br>
> query<br>
> > 'SELECT ACL.id from ACL, Groups, Principals, CachedGroupMembers ...<br>
> ><br>
> > And them a few lines of failed SQL syntax erros and failed querys.<br>
> ><br>
> > We browsed the users table, user ID 0 is there, no problem. A MySQL check_table<br>
> > didn't returned any errors. The only thing we saw that seemed strange was that there<br>
> > is reference to a user 1 on the LastUpdatedBy field, but there is no user 1 id.<br>
><br>
> I'm not aware of an RT version that had a User ID 0.<br>
> Sounds like someone renumbered your RT_System user manually in the<br>
> database, or that you have database corruption.<br>
><br>
> You can try taking a backup and fixing this manually, but if it is<br>
> corruption, there may be other problems.<br>
> -kevin<br>
> --------<br>
</div></div>> RT Training Sessions ([2]<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
<div class="im">> * Chicago, IL, USA * September 26 & 27, 2011<br>
> * San Francisco, CA, USA * October 18 & 19, 2011<br>
> * Washington DC, USA * October 31 & November 1, 2011<br>
> * Melbourne VIC, Australia * November 28 & 29, 2011<br>
> * Barcelona, Spain * November 28 & 29, 2011<br>
><br>
> --<br>
> Francisco Amaro<br>
</div>> Email: [3]<a href="mailto:famaro@gmail.com">famaro@gmail.com</a><br>
><br>
> References<br>
><br>
> Visible links<br>
> 1. mailto:<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a><br>
> 2. <a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a><br>
> 3. mailto:<a href="mailto:famaro@gmail.com">famaro@gmail.com</a><br>
<div><div></div><div class="h5"><br>
> --------<br>
> RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
> * Chicago, IL, USA ? September 26 & 27, 2011<br>
> * San Francisco, CA, USA ? October 18 & 19, 2011<br>
> * Washington DC, USA ? October 31 & November 1, 2011<br>
> * Melbourne VIC, Australia ? November 28 & 29, 2011<br>
> * Barcelona, Spain ? November 28 & 29, 2011<br>
<br>
</div></div><br>--------<br>
RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
* Chicago, IL, USA — September 26 & 27, 2011<br>
* San Francisco, CA, USA — October 18 & 19, 2011<br>
* Washington DC, USA — October 31 & November 1, 2011<br>
* Melbourne VIC, Australia — November 28 & 29, 2011<br>
* Barcelona, Spain — November 28 & 29, 2011<br></blockquote></div><br><br clear="all"><br>-- <br>Francisco Amaro <br>Email: <a href="mailto:famaro@gmail.com">famaro@gmail.com</a><br>