[rt-users] "Can't load a principal" in initial database setup

Beachey, Kendric Kendric.Beachey at garmin.com
Wed Jun 17 11:39:41 EDT 2009


The plot thickens...

I had the admin blow away our RT install and re-do it from scratch.  It
should be totally stock 3.6.5 now, no customizations of any kind.

Running rt-setup-database-3.6 still has errors (although it happily runs
to completion):

Now creating a database for RT.
Creating mysql database rtdb.
Now populating database schema.
Creating database schema.
Done setting up database schema.
Now inserting database ACLs
Done setting up database ACLs.
Now inserting RT core system objects
Checking for existing system user...not found.  This appears to be a new
installation.
Creating system user...done.
Now inserting RT data
Creating Superuser  ACL...done.
Creating groups...3.4.5.6.7.8.9.done.
Creating users...(Error: Could not set user info)0.(Error: Could not set
user info)0.done.
Creating queues...1.2.done.
Creating ACL...[Wed Jun 17 15:30:16 2009] [crit]: 1
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:909)
[Wed Jun 17 15:30:16 2009] [crit]: Can't load a principal for id
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:910)
Principal  not found..[Wed Jun 17 15:30:16 2009] [crit]: 1
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:909)
[Wed Jun 17 15:30:16 2009] [crit]: Can't load a principal for id
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:910)
Principal  not found..done.
Creating ScripActions...1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.done.
Creating ScripConditions...1.2.3.4.5.6.7.8.9.10.done.
Creating templates...1.2.3.4.5.6.7.8.9.10.11.12.done.
Creating scrips...1.2.3.4.5.6.7.8.9.10.11.12.13.14.done.
Creating predefined searches...1.2.3.done.
Done setting up database content.

What could make the initial database setup fail in this way?

The machine is running Ubuntu 8.04 Server in case that helps pin
anything down.
--
Kendric Beachey

 

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Beachey,
Kendric
Sent: Wednesday, June 10, 2009 8:59 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] "Can't load a principal" in initial database setup
(wasRE: How do you "reset" an RT database to "freshly installed"status?)

To answer my own question about "resetting" the database...the course of
action we settled on was to drop the database and re-run the script
called rt-setup-database-3.6.

At first this had some timeouts trying to hit LDAP while setting up
users, so I removed the settings in RT_SiteConfig.pm that told it to
authenticate against LDAP.  (It should be back to fresh-out-of-the-box
status now.)  Then I dropped the database and tried again.

After that it went more quickly...although I still do see an oddity...


[first part of output snipped]
Now inserting RT data
Creating Superuser  ACL...done.
Creating groups...3.4.5.6.7.8.9.done.
Creating users...(Error: Could not set user info)0.(Error: Could not set
user info)0.done.
Creating queues...1.2.done.
Creating ACL...[Wed Jun 10 13:48:47 2009] [crit]: 1
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:909)
[Wed Jun 10 13:48:47 2009] [crit]: Can't load a principal for id
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:910)
Principal  not found..[Wed Jun 10 13:48:47 2009] [crit]: 1
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:909)
[Wed Jun 10 13:48:47 2009] [crit]: Can't load a principal for id
(/usr/share/request-tracker3.6/lib/RT/ACE_Overlay.pm:910)
Principal  not found..done.
Creating ScripActions...1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.done.
Creating ScripConditions...1.2.3.4.5.6.7.8.9.10.done.
Creating templates...1.2.3.4.5.6.7.8.9.10.11.12.done.
Creating scrips...1.2.3.4.5.6.7.8.9.10.11.12.13.14.done.
Creating predefined searches...1.2.3.done.
Done setting up database content.
[script exits normally at this point]


Those errors in the middle where it says "Can't load a principal"...what
could cause that when starting with a brand-new database?

The setup script does run to completion...so, hoping those errors
weren't a problem, I ran the import again...it created users, queues,
etc. pretty quickly, but while importing tickets it bombed out after
just a few seconds:


t-10504: w[Wed Jun 10 13:50:01 2009] [crit]: Couldn't create a ticket:
Internal Error: Couldn't execute the query 'INSERT INTO Tickets (Status,
Queue, Started, Type, InitialPriority, Starts, LastUpdated, Subject,
FinalPriority, Creator, Owner, LastUpdatedBy, Resolved, Created,
Priority, Due) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?)'Column 'Owner' cannot be null
(/usr/share/request-tracker3.6/lib/RT/Ticket_Overlay.pm:602)


Am I right in thinking the errors while setting up the database are what
caused this problem?  I looked at ticket 10504 on the old RT, and it's
one that doesn't have an owner.
--
Kendric Beachey



-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Beachey,
Kendric
Sent: Monday, June 08, 2009 10:08 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] How do you "reset" an RT database to "freshly
installed"status?

I'm working on converting from an old RT2 to a 3.6.x vintage RT3.  So
far, mostly pretty successfully.  I got the new one set up to
authenticate off of our Active Directory, and also to create new RT
accounts from AD.  And I got the email interface up and running.

I downloaded the latest "rt2-to-rt3" scripts, and over the weekend I ran
the export.  It went just fine.

The import that I ran this morning ran great for quite a while, then
crashed when it got a duplicate key error on the Attachments table.
There was some data in the system already before I started the
import...I deleted everything from the Tickets table but not
Attachments.  Oops.

Anyway, it looks like the import plausibly pulled in everything we
really care about...any ticket with an id less than 10000 is too old to
really care about...but I'm not 100% sure.  The export directories show
exactly 1000 tickets in every 1000-ticket range, but when I do a search
in the new RT for tickets between, say, 10000 and 11000, I seem to be
short by a few dozen.  Doing 'select count(*) from Tickets" on the old
shows 11801 rows, but on the new one it only shows 7135.

So I think I'd like to "hit the reset button" on the database and try
the import again.  What do I need to do to make the database look like a
fresh install with no activity in it yet?  Do I just delete all rows
from all tables?  That sounds a little dangerous...I'm assuming even a
fresh install has SOME rows that govern some basic system behavior.

I don't want to reinstall all of RT if I can help it...the perl code is
working fine; it's just the database I want to reset.

Thanks for any help...
--
Kendric Beachey

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient. If you are not the intended
recipient, please be aware that any disclosure, copying, distribution or
use of this e-mail or any attachment is prohibited. If you have received
this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient. If you are not the intended
recipient, please be aware that any disclosure, copying, distribution or
use of this e-mail or any attachment is prohibited. If you have received
this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com



More information about the rt-users mailing list