Hi Graham,

> > I'm running apache2,mod_wsgi2.0, python2.5.
>
> Why aren't you using latest mod_wsgi 2.3?

Because I've set up the machine a few months ago and wasn't aware that there 
is a newer version. I now upgraded.

> > THis is the startup message:
> >
> > http://paste.turbogears.org/paste/9664
>
> Are you still using mod_python? If not, disable it out of Apache as it
> can cause problems for mod_wsgi.

I now disabled it.

> Did you completely 'stop' and then 'start' Apache after making any
> recent changes, or at least touch the WSGI script file so daemon
> processes would be reloaded.

Yes, complete restarts.

> > The vhost-conf:
> >
> > http://paste.turbogears.org/paste/9666
>
> Why don't you have a ServerName directive inside VirtualHost? If only
> serving one site and using ServerName from main configuration context,
> you probably don't need the VirtualHost container then.

Because I just took what the ubuntu system was coming with, and don't know 
much about apache configuration. Do you think it might affect the problem?

> > The boostrap-wsgi-script:
> >
> > http://paste.turbogears.org/paste/9667
> >
> > If there is *anything* enlightening to say about this, I'm more than glad
> > to hear it.
> >
> > I had the high hopes that such kind of behavior that I've seen PHP
> > exhibit would be something from a better forgotten dark past...
>
> Can you make it clear whether the 404 is generated by Apache or by
> TurboGears?

After putting a logging-middleware in front of my application, it appears that 
the python/TG-code is responsible, not apache. See below for more remarks.

> Post the lines from the Apache access log which show the 404 errors
> for the request. Are the URLs there what you expect to see?
>
> For more in depth debugging of request and response at WSGI level, use
> second recipe in:
>
> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Request_
>and_Response
>
> to capture the complete request and response. Look at them to see if
> they are what you expect.

Thanks, I did that. After doing the update, things changed *slightly*: the 
problem remains that loading a page itself works, yet *some* of it's referred 
resources (mostly javascript, sometimes images) produce a 404.

However, the behavior that putting the url in question (e.g. 
http://localhost/collaborate/toscawidgets/resources/ableton.collaborate.frontend/public/javascript/jquery/cluetip/jquery.cluetip.js
) into a tab, and pressing F5 frequently would show the intermittent 404, or 
sometimes the resource, seems to be gone.

So far, the resource seems to be returned all the time.

I created a diff that I attached between two requests for the same resource, 
one failing, one successful.

As one can see, there is only very little difference, and most of the 
differences are to be expected.

I assume there is no chance to drop the apache into the PDB... so I will need 
to have to investigate this via turning on logging inside the TG-app.

Thanks for your help so far,

Diez


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

--- error.log	2008-10-15 13:53:41.000000000 +0200
+++ success.log	2008-10-15 13:53:42.000000000 +0200
@@ -1,7 +1,7 @@
  [error] [client 127.0.0.1] ********************************************************************************
  [error] [client 127.0.0.1] {'DOCUMENT_ROOT': '/home/dir/projects/ableton/Web_root',
  [error] [client 127.0.0.1]  'GATEWAY_INTERFACE': 'CGI/1.1',
- [error] [client 127.0.0.1]  'HTTP_ACCEPT': '*/*',
+ [error] [client 127.0.0.1]  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  [error] [client 127.0.0.1]  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
  [error] [client 127.0.0.1]  'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
  [error] [client 127.0.0.1]  'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
@@ -10,7 +10,6 @@
 ssion.id=7af9c48a2a5610ee34391f84731a812c',
  [error] [client 127.0.0.1]  'HTTP_HOST': 'localhost',
  [error] [client 127.0.0.1]  'HTTP_KEEP_ALIVE': '300',
- [error] [client 127.0.0.1]  'HTTP_REFERER': 'http://localhost/collaborate/users/document?document=52',
  [error] [client 127.0.0.1]  'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1',
  [error] [client 127.0.0.1]  'PATH': '/usr/local/bin:/usr/bin:/bin',
  [error] [client 127.0.0.1]  'PATH_INFO': '/ableton.collaborate.frontend/public/javascript/jquery/cluetip/jquery.cluetip.js',
@@ -18,7 +17,7 @@
 etip.js',
  [error] [client 127.0.0.1]  'QUERY_STRING': '',
  [error] [client 127.0.0.1]  'REMOTE_ADDR': '127.0.0.1',
- [error] [client 127.0.0.1]  'REMOTE_PORT': '35810',
+ [error] [client 127.0.0.1]  'REMOTE_PORT': '48423',
  [error] [client 127.0.0.1]  'REMOTE_USER': 154,
  [error] [client 127.0.0.1]  'REQUEST_METHOD': 'GET',
  [error] [client 127.0.0.1]  'REQUEST_URI': '/collaborate/toscawidgets/resources/ableton.collaborate.frontend/public/javascript/jquery/cluetip/jquery.cluetip
@@ -45,23 +44,23 @@
 F27EEAF98' tg-visit='e5b7fa64c6d443deb37af778a5be83634f2c6c75'>,
  [error] [client 127.0.0.1]                    'tg-visit=e5b7fa64c6d443deb37af778a5be83634f2c6c75; terminal=2:94694521639759074920080919162450:6B6B7D48F00025
 .session.id=7af9c48a2a5610ee34391f84731a812c'),
- [error] [client 127.0.0.1]  'paste.registry': <paste.registry.Registry object at 0x94656cc>,
+ [error] [client 127.0.0.1]  'paste.registry': <paste.registry.Registry object at 0x979caac>,
  [error] [client 127.0.0.1]  'paste.throw_errors': True,
  [error] [client 127.0.0.1]  'repoze.tm.active': True,
- [error] [client 127.0.0.1]  'repoze.who.identity': <repoze.who identity (hidden, dict-like) at 155631948>,
- [error] [client 127.0.0.1]  'repoze.who.logger': <logging.Logger instance at 0x944afec>,
- [error] [client 127.0.0.1]  'repoze.who.plugins': {'ableton_challenger': <AbletonUserIdentifierPlugin 155495852>,
- [error] [client 127.0.0.1]                         'cookie': <AbletonUserIdentifierPlugin 155495852>,
- [error] [client 127.0.0.1]                         'nop': <ableton.collaborate.frontend.authentication.NopAuth object at 0x944adec>},
- [error] [client 127.0.0.1]  'toscawidgets.framework': <tw.mods.base.HostFramework object at 0x944a64c>,
+ [error] [client 127.0.0.1]  'repoze.who.identity': <repoze.who identity (hidden, dict-like) at 158994620>,
+ [error] [client 127.0.0.1]  'repoze.who.logger': <logging.Logger instance at 0x9449fec>,
+ [error] [client 127.0.0.1]  'repoze.who.plugins': {'ableton_challenger': <AbletonUserIdentifierPlugin 155491756>,
+ [error] [client 127.0.0.1]                         'cookie': <AbletonUserIdentifierPlugin 155491756>,
+ [error] [client 127.0.0.1]                         'nop': <ableton.collaborate.frontend.authentication.NopAuth object at 0x9449dec>},
+ [error] [client 127.0.0.1]  'toscawidgets.framework': <tw.mods.base.HostFramework object at 0x944964c>,
  [error] [client 127.0.0.1]  'toscawidgets.prefix': '/toscawidgets',
- [error] [client 127.0.0.1]  'wsgi.errors': <mod_wsgi.Log object at 0x93e0a28>,
- [error] [client 127.0.0.1]  'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x904a458>,
- [error] [client 127.0.0.1]  'wsgi.input': <mod_wsgi.Input object at 0x944f8b8>,
+ [error] [client 127.0.0.1]  'wsgi.errors': <mod_wsgi.Log object at 0x9466d40>,
+ [error] [client 127.0.0.1]  'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x9739a40>,
+ [error] [client 127.0.0.1]  'wsgi.input': <mod_wsgi.Input object at 0x97989d0>,
  [error] [client 127.0.0.1]  'wsgi.multiprocess': True,
  [error] [client 127.0.0.1]  'wsgi.multithread': True,
  [error] [client 127.0.0.1]  'wsgi.run_once': False,
  [error] [client 127.0.0.1]  'wsgi.url_scheme': 'http',
  [error] [client 127.0.0.1]  'wsgi.version': (1, 0)}
- [error] [client 127.0.0.1] ['<html>\\n <head>\\n  <title>404 Not Found</title>\\n </head>\\n <body>\\n  <h1>404 Not Found</h1>\\n  The resource could not be found.<br /><br />\\n\\n\\n\\n </body>\\n</html>']
+ [error] [client 127.0.0.1] ['/*\\n * jQuery clueTip plugin\\n * Version 0.9.8  (05/22/2008)\\n * @requires jQuery v1.1.4+\\n * @requires Dimensions plugin (for jQuery versions < 1.2.5)\\n *\\n * Dual licensed under the MIT and GPL licenses:\\n * http://www.opensource.org/licenses/mit-license.php\\n * http://www.gnu.org/licenses/gpl.html\\n *\\n */\\n;(function($) { \\n/*\\n * @name clueTip\\n * @type jQuery\\n * @cat Plugins/tooltip\\n * @return jQuery\\n * @author Karl Swedberg\\n *\\n * @credit Inspired by Cody Lindley\\'s jTip (http://www.codylindley.com)\\n * @credit Thanks to the following people for their many and varied contributions:\\n      Shelane Enos, Glen Lipka, Hector Santos, Torben Schreiter, Dan G. Switzer, J\\xc3\\xb6rn Zaefferer \\n * @credit Thanks to Jonathan Chaffer, as always, for help with the hard parts. :-)\\n */\\n\\n /**\\n * \\n * Displays a highly customizable tooltip when the user hovers (default) or clicks (optional) the matched element. \\n * By default, the clueTip plugin loads a page indicated by the "rel" attribute via ajax and displays its contents.\\n * If a "title" attribute is specified, its value is used as the clueTip\\'s heading.\\n * The attribute to be used for both the body and the heading of the clueTip is user-configurable. \\n * Optionally, the clueTip\\'s body can display content from an element on the same page.\\n * * Just indicate the element\\'s id (e.g. "#some-id") in the rel attribute.\\n * Optionally, the clueTip\\'s body can display content from the title attribute, when a delimiter is indicated. \\n * * The string before the first instance of the delimiter is set as the clueTip\\'s heading.\\n * * All subsequent strings are wrapped in separate DIVs and placed in the clueTip\\'s body.\\n * The clueTip plugin allows for many, many more options. Pleasee see the examples and the option descriptions below...\\n * \\n * \\n * @example $(\\'#tip).cluetip();\\n * @desc This is the most basic clueTip. It displays a 275px-wide clueTip on mouseover of the element with an ID of "tip." On mouseout of the element, the clueTip is hidden.\\n *\\n *\\n * @example $(\\'a.clue\\').cluetip({\\n *  hoverClass: \\'highlight\\',\\n *  sticky: true,\\n *  closePosition: \\'bottom\\',\\n *  closeText: \\'<img src="cross.png" alt="close" />\\',\\n *  truncate: 60,\\n *  ajaxSettings: {\\n *    type: \\'POST\\'\\n *  }\\n * });\\n * @desc Displays a clueTip on mouseover of all <a> elements with class="clue". The hovered element gets a class of "highlight" added to it (so that it can be styled appropriately. This is esp. useful for non-anchor elements.). The clueTip is "sticky," which means that it will not be hidden until the user either clicks on its "close" text/graphic or displays another clueTip. The "close" text/graphic is set to diplay at the bottom of the clueTip (default is top) and display an image rather than the default "Close" text. Moreover, the body of the clueTip is truncated to the first 60 characters, which are followed by an ellipsis (...). Finally, the clueTip retrieves the content using POST rather than the $.ajax method\\'s default "GET."\\n * \\n * More examples can be found at http://plugins.learningjquery.com/cluetip/demo/\\n * \\n * Full list of options/settings can be found at the bottom of this file and at http://plugins.learningjquery.com/cluetip/\\n */\\n\\n  var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount;\\n  $.fn.cluetip = function(js, options) {\\n    if (typeof js == \\'object\\') {\\n      options = js;\\n      js = null;\\n    }\\n    return this.each(function(index) {\\n      var $this = $(this);      \\n      \\n      // support metadata plugin (v1.0 and 2.0)\\n      var opts = $.extend(false, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {});\\n\\n      // start out with no contents (for ajax activation)\\n      var cluetipContents = false;\\n      var cluezIndex = parseInt(opts.cluezIndex, 10)-1;\\n      var isActive = false, closeOnDelay = 0;\\n\\n      // create the cluetip divs\\n      if (!$(\\'#cluetip\\').length) {\\n        $cluetipInner = $(\\'<div id="cluetip-inner"></div>\\');\\n        $cluetipTitle = $(\\'<h3 id="cluetip-title"></h3>\\');        \\n        $cluetipOuter = $(\\'<div id="clue', 'tip-outer"></div>\\').append($cluetipInner).prepend($cluetipTitle);\\n        $cluetip = $(\\'<div id="cluetip"></div>\\').css({zIndex: opts.cluezIndex})\\n        .append($cluetipOuter).append(\\'<div id="cluetip-extra"></div>\\')[insertionType](insertionElement).hide();\\n        $(\\'<div id="cluetip-waitimage"></div>\\').css({position: \\'absolute\\', zIndex: cluezIndex-1})\\n        .insertBefore(\\'#cluetip\\').hide();\\n        $cluetip.css({position: \\'absolute\\', zIndex: cluezIndex});\\n        $cluetipOuter.css({position: \\'relative\\', zIndex: cluezIndex+1});\\n        $cluetipArrows = $(\\'<div id="cluetip-arrows" class="cluetip-arrows"></div>\\').css({zIndex: cluezIndex+1}).appendTo(\\'#cluetip\\');\\n      }\\n      var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0;\\n      if (!$dropShadow) {\\n        $dropShadow = $([]);\\n        for (var i=0; i < dropShadowSteps; i++) {\\n          $dropShadow = $dropShadow.add($(\\'<div></div>\\').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i}));\\n        };\\n        $dropShadow.css({position: \\'absolute\\', backgroundColor: \\'#000\\'})\\n        .prependTo($cluetip);\\n      }\\n      var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass;\\n      if (!tipAttribute && !opts.splitTitle && !js) return true;\\n      // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip      \\n      if (opts.local && opts.hideLocal) { $(tipAttribute + \\':first\\').hide(); }\\n      var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);\\n      // vertical measurement variables\\n      var tipHeight, wHeight;\\n      var defHeight = isNaN(parseInt(opts.height, 10)) ? \\'auto\\' : (/\\\\D/g).test(opts.height) ? opts.height : opts.height + \\'px\\';\\n      var sTop, linkTop, posY, tipY, mouseY, baseline;\\n      // horizontal measurement variables\\n      var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10);\\n      var tipWidth = tipInnerWidth + (parseInt($cluetip.css(\\'paddingLeft\\'))||0) + (parseInt($cluetip.css(\\'paddingRight\\'))||0) + dropShadowSteps;\\n      var linkWidth = this.offsetWidth;\\n      var linkLeft, posX, tipX, mouseX, winWidth;\\n            \\n      // parse the title\\n      var tipParts;\\n      var tipTitle = (opts.attribute != \\'title\\') ? $this.attr(opts.titleAttribute) : \\'\\';\\n      if (opts.splitTitle) {\\n        if(tipTitle == undefined) {tipTitle = \\'\\';}\\n        tipParts = tipTitle.split(opts.splitTitle);\\n        tipTitle = tipParts.shift();\\n      }\\n      var localContent;\\n\\n/***************************************      \\n* ACTIVATION\\n****************************************/\\n    \\n//activate clueTip\\n    var activate = function(event) {\\n      if (!opts.onActivate($this)) {\\n        return false;\\n      }\\n      isActive = true;\\n      $cluetip.removeClass().css({width: tipInnerWidth});\\n      if (tipAttribute == $this.attr(\\'href\\')) {\\n        $this.css(\\'cursor\\', opts.cursor);\\n      }\\n      $this.attr(\\'title\\',\\'\\');\\n      if (opts.hoverClass) {\\n        $this.addClass(opts.hoverClass);\\n      }\\n      linkTop = posY = $this.offset().top;\\n      linkLeft = $this.offset().left;\\n      mouseX = event.pageX;\\n      mouseY = event.pageY;\\n      if ($this[0].tagName.toLowerCase() != \\'area\\') {\\n        sTop = $(document).scrollTop();\\n        winWidth = $(window).width();\\n      }\\n// position clueTip horizontally\\n      if (opts.positionBy == \\'fixed\\') {\\n        posX = linkWidth + linkLeft + lOffset;\\n        $cluetip.css({left: posX});\\n      } else {\\n        posX = (linkWidth > linkLeft && linkLeft > tipWidth)\\n          ||
  [error] [client 127.0.0.1] ================================================================================

Reply via email to