Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8575 closed defect (worksforme)

Timing and Estimation: Trac11 & 12 install error

Reported by: Russ Tyndall Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: waiting-for-feedback
Cc: matthew.crane@… Trac Release: 0.12


Stuck in a "need to upgrade database" -> upgrade -> "need to "... cycle

Trac 11.7

Attachments (3)

TTTest.log (45.0 KB) - added by Matt Crane 6 years ago.
Log File
TTFullLog.log (52.9 KB) - added by Matt Crane 6 years ago.
tracnew.log (38.7 KB) - added by Matt 6 years ago.

Download all attachments as: .zip

Change History (28)

comment:1 Changed 6 years ago by Russ Tyndall

Hi Bobby

Sorry to be bothering you with annoying questions but I'm struggling to install your timing and estimation plugin on Trak and I was hoping you might have a spare moment to point me in the right direction.

I'm running Trak 11.7 but whenever I install the timing plugin I get a 'The trak environment needs to be upgraded message'. I've tried running the upgrade and it ses all the right things, I reload apache but the message remains. I've tried different install methods, installing the version with/without permissions but I just keep killing Trak.

Again sorry to bother you on an open project you do in your spare time but I'm not sure where else to ask and my constant failings are getting somewhat demoralising.

Best Regards

Matthew Crane TrackTrans e-POD

Changed 6 years ago by Matt Crane

Attachment: TTTest.log added

Log File

comment:2 Changed 6 years ago by Russ Tyndall

Cc: matthew.crane@… added; anonymous removed

The lines I am looking for are things like:

2011-03-07 17:03:27,361 Trac[api] DEBUG: NEEDS UP?: sys:True, rep:True, stats:True, fields:True, man:True

This line is saying that every part of the plugin needs an upgrade. I only see one instance of this message. I need to see what is still not upgraded the next time you try to run upgrade. If its all of them that is mighty odd.

Hopefully we can get this figured out for you soon, Russ

comment:3 Changed 6 years ago by Matt Crane

Cc: bobbysmith007@… added; matthew.crane@… removed

I've run the upgrade command a couple more times now and each time I get the same responses. In the command line I receieve a message saying 'Database is up to date, no upgrade necessary'.

Looking at the log file each time it loads it goes through the various Trac[loader] messages, loads Trac[default workflow] leaves a blank line and then states

Trac[api] DEBUG: NEEDS UP?: sys:False, rep:False, stats:False, fields:False, man:False

If I then go to the webui however I'm still presented with 'Test: Error The Trac Environment needs to be upgraded'

comment:4 Changed 6 years ago by Russ Tyndall

Cc: matthew.crane@… added; bobbysmith007@… removed

Well my plugin is reporting that none of its pieces need updating. So that seems to indicate a bug elsewhere (but possibly still this plugins fault).

  • Can you please upload the full log from a couple runs of the extra trac-upgrades? There will be places in the log that look like the following that will allow us to determine what component is triggering the upgrade. There might be other useful log messages in there as well
    2011-03-07 17:02:50,616 Trac[env] WARNING: Component <componentname> requires environment upgrade
  • Which branch of the plugin are you installing?
  • Which database backend and versions are you using?

ps. You dont have to change the CC (unless you dont wish to receive replys). Because I own the ticket, I will be emailed.

Changed 6 years ago by Matt Crane

Attachment: TTFullLog.log added

comment:5 Changed 6 years ago by anonymous

Hmmm I've added the log after a couple more upgrade attempts although i can't see any instances of Trac[env] warning apart from the original timingandestimation one

comment:6 Changed 6 years ago by Russ Tyndall

Well that's a touch frustrating... I assume you tried the obvious apache/webserver reboots and everything. When you request the webui, do you see any new log messages that might be relevant?

I'm a bit at a loss.

  • Does trac still require an upgrade still if you disable timingandestimation in your trac.ini ?
    timingandestimationplugin.* = disabled 

It will require a bit of mucking about to revert my environment down to trac 11 and reinstall stuff, but if just having timingandestimationplugin enabled causes the problem I will look into doing this later today / tomorrow morning. Though, if there is nothing in your log, it sounds like it will be difficult to track down.

comment:7 Changed 6 years ago by Russ Tyndall

Resolution: worksforme
Status: newclosed

Hi Russ

Well that was a palava. One of our programmers had written a script file to install trac/add a project, I tried running that on a fresh VM and then installing Timing and it broke, tried modifying the script to install 12.2 and it still broke. I then tried to install trac on my own (which took a while), installed timingandestimation and it works! Hurrah! I'm playing with it now learning how it does things. The plan is to slowly add back the plugins I use hoping it doesn't break :p. One question, Is there a way of extracting (from the time data) between what periods work was done e.g. 15.3.11 0930 - 1220? Also thanks again for being so understanding your help has been invaluable.


comment:8 Changed 6 years ago by Russ Tyndall

Resolution: worksforme
Status: closedreopened
Trac Release: 0.110.12

Matt is now having trouble on trac12 with the permissions branch

comment:9 Changed 6 years ago by Russ Tyndall

(In [9989]) better logging and install re #8575

Changed 6 years ago by Matt

Attachment: tracnew.log added

comment:10 Changed 6 years ago by anonymous

I've added my latest log, my actions

Disabled third party plugins removed current (non permission branch) timing and estimation install permission branch enable new timingandestimation Trac then states it requires an upgrade, the first time i run it it states it's updating various components. The 'trac requires an upgrade message' remains however and no futher upgrade attempts or restarting of webservers fixes this.

I've also tried running the uninstall script and then installing the new branch. Doing it this way I still get the error message 'OperationalError: table bill_date already exists'

comment:11 in reply to:  10 Changed 6 years ago by Russ Tyndall

I've also tried running the uninstall script and then installing the new branch. Doing it this way I still get the error message 'OperationalError: table bill_date already exists'

  • Have you tried the latest version yet (1.1.2b for permissions branch)? I changed the updater to be a little more lenient. With the new update process, I can purposefully corrupt an install and still not get stuck in that loop. This should also allow you to avoid the 'table bill_date already exists' error on a reinstall to the same database. So one of the two paths should work :/

I wish I could recreate the error you are having on my side so that I could get to the bottom of it. It seems like there should be many more messages after the "Needs Update: False" message rather than just the next start of a trac environemnt. There should at least be an error indicating why it failed, or which thing DID need update.

The only error I can see is the following which doesnt seem like it could be causing the problem

2011-03-15 09:58:05,525 Trac[loader] ERROR: Skipping "ripe = ripe.web_ui": (can't import "ImportError: No module named simplejson")

It really should be much easier than your experience would indicate.

comment:12 Changed 6 years ago by Russ Tyndall

Keywords: waiting-for-feedback added

comment:13 in reply to:  12 Changed 6 years ago by mail@…

Want to follow this ticket. Am having the same issue.

comment:14 Changed 6 years ago by Russ Tyndall

Summary: Timing and Estimation: Trac11 install errorTiming and Estimation: Trac11 & 12 install error

I would like to help you, but I dont have any specifics about the problem you are experiencing (other than that you cannot get it installed).

Please provide relevant version numbers (trac, T&E (permissions or not), database etc) and a full log of your install process that is failing.

I can successfully install a fresh T&E against a fresh Trac instance, so obviously there is some difference between our setups that is causing this bug. Anything you can provide that would help me narrow down the options will get this fixed quicker.

comment:15 Changed 6 years ago by mail@…

I am using trac 0.12.2 and Timing and Estimation plugin 1.1.2b. I've upgraded trac since 0.10 and have been using T&E since 0.8.x with my current installation. I have not tried a fresh install.

Since upgrading to trac 0.12, when I create a new environment and then enable the T&E, I'm stuck with the update environment message mentioned above. Running the update command does not seem to resolve the problem. The environments I had created prior to the trac 0.12 and T&E 1.1.2b updates are working fine and were upgraded without issue. I'm able to copy an environment and change it's trac.ini. But, not create a new environment.

My apologies for not providing detail initially... I just wanted to follow the progress of this ticket as I thought it had not been resolved.

comment:16 Changed 6 years ago by Russ Tyndall

Thanks for the info, I only ask as I have been unable to duplicate this error and as such have not been able to provide a solution to it. I also never heard back about whether the changes in 1.1.2b had fixed the bug or not. I suspected not, but given my inability to experience the problem, and no feedback I had not looked into this any further. I will try to have a solution for you at the beginning of next week some time.

comment:17 Changed 6 years ago by mail@…

Thanks! Happy to provide further info, if needed. Please just let me know.

comment:18 Changed 6 years ago by Russ Tyndall

Just an update, I have finally been able to duplicate the problem people are experiencing on this ticket. Interesting to note, once the trac-env is in this state even removing the plugin all together will allow the trac to operate, so this seems like some bad interaction between this plugin and recent versions of trac 12. I am attempting to trac this down now.

Thanks for your patience,


comment:19 Changed 6 years ago by Russ Tyndall

The error occurs during the open_environment call (which is why log messages are not going through) I can still open the env with ipython or trac admin (which is why there is nothing in the logs; you must open the env before you can log anything). This also explains why trac-admin says no-upgrades needed but the web disagrees (trac admin is not having trouble opening the log / conf file).

  • The component I was finally able to find at fault is trac.ticket.default_workflow.ConfigurableTicketWorkflow (which is the default trac workflow handler)
    • this component needs an upgrade because when it goes to read the config file it finds that the ticket-workflow section is empty. However, there is and was a ticket-workflow section in my config (just not in the env.config object). I imagine that the real problem here is that it has not loaded the config file yet or completely (as evidenced by there not being logging and this error occuring in the open_environment function
    • - seems to be a similar bug fixed with a works for me, which is how I closed this the first couple times, so probably another instance of a different plugin causing the same problem / race condition

Something I did arbitrarily fixed this after the fact and now I cannot duplicate it again (even taking the exact same steps as last time). This really seems like a trac bug / race condition, rather than something triggered by this plugin, however, I want people to be able to use both trac and this plugin so I am eager to get to the bottom of this

Some suggested fixes:

  • try moving the ticket-workflow section to the top of your trac-ini
  • try moving your conf file out of the way reloading, then moving it back
  • Make sure that the webserver is not reusing processes. (The easiest way will be stopping the server completely, verifying that there are no running pythons after stopping, and then starting it).

If all of these still fail to yield a working trac, then I am not sure. I am still investigating and looking for trac bugs

comment:20 Changed 6 years ago by Russ Tyndall

I was able to recreate the error as follows:

  • trac-admin initenv a new site
  • visit site in web browser - important, error doesnt occur otherwise
  • install plugin and upgrade
  • visit website in web browser, stuck in upgrade mode

comment:21 Changed 6 years ago by Russ Tyndall

Still haven't found a reliable way to fix it

comment:22 Changed 6 years ago by Russ Tyndall

Resolution: worksforme
Status: reopenedclosed

Ok, this problem was with my trac conf file being unreadable, (because I sudo - did something that edited the trac.ini, changing its permissions to root readable only).

This left the trac.ini unreadable by the webserver, which caused the errors about upgrading needing to happen.

Please verify that the webserver can still read your trac.ini files and please let me know if this was also your problems as well.

Feel free to reopen if this still doesnt address your needs


comment:23 Changed 6 years ago by Russ Tyndall

This problem has been addressed in the version 13 dev branches of trac.

Just for others reference:

comment:24 Changed 6 years ago by Matt

Hi, just thought i'd like to add it was indeed the customer workflow section that was giving me grief (though I didn't realise that was the specific cause till now). I'd been uninstalling all my plugins, installing timing and then scratching my head about why it wasn't working.

comment:25 Changed 6 years ago by Russ Tyndall

Awesome! So glad we got it worked out and installable for you. This was definitely the most misleading error message I have received in quite a while. :)

Cheers, Russ

Modify Ticket

as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.