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