Ticket #925 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Bug when trying to look at csml User Manual pdf on website

Reported by: selatham Owned by: domlowe
Priority: blocker Milestone: Updated NERC Data Discovey Service
Component: CSML Version:
Keywords: Cc:

Description

This error message is coming from the production service. Looks like there is something missing in the pylons installed there, but why would it be trying to access csml anyway?

sys.path: [
    '/usr/local/bin',
    '/usr/local/lib64/python2.5/site-packages/setuptools-0.6c7-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Paste-1.5.1-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Pylons-0.9.5-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Mako-0.1.9-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/nose-0.10.0-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/decorator-2.2.0-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/simplejson-1.7.1-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/FormEncode-0.7.1-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Myghty-1.1-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/PasteDeploy-1.3-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Beaker-0.6.3-py2.5.egg',
    '/us! r/local/lib64/python2.5/site-packages/WebHelpers-0.3-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/myghtyutils-0.52-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/TurboKid-1.0.4-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/kid-0.9.6-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/csml-2.0b_r3046-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/cdat_lite-4.1.2_0.2.5-py2.5-linux-x86_64.egg',
    '/usr/local/lib64/python2.5/site-packages/ows_common-0.1dev_r2969-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/ZSI-2.0_rc3-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/Routes-1.7.1-py2.5.egg',
    '/usr/local/lib64/python2.5/site-packages/ndgUtils-0.1.0.dev_r3147-py2.5.egg',
    '/usr/local! /lib64/python2.5/site-packages/ows_server-0.0.0dev_r3167-py2.5.egg',    '/usr/lib/python25.zip',
    '/usr/lib64/python2.5',
    '/usr/lib64/python2.5/plat-linux2',
    '/usr/lib64/python2.5/lib-tk',
    '/usr/lib64/python2.5/lib-dynload',
    '/usr/lib64/python2.5/site-packages',
    '/usr/lib64/python2.5/site-packages/Numeric',
    '/usr/lib64/python2.5/site-packages/gtk-2.0',
    '/usr/local/lib64/python2.5/site-packages']
Module ?:13 in <module>
<<  from ows_server.lib.base import *
    import os
    from ows_server.lib.csml_util import get_csml_doc, CsmlBundle, get_csml_document
    from elementtree import ElementTree as ET>>  from ows_server.lib.csml_util import get_csml_doc, CsmlBundle, get_csml_document
ImportError: cannot import name get_csml_document


CGI Variables 
CONTENT_LENGTH '0' 
HTTP_ACCEPT '*/*' 
HTTP_ACCEPT_ENCODING 'gzip, x-gzip' 
HTTP_CONNECTION 'Keep-Alive' 
HTTP_HOST 'localhost:8081' 
HTTP_MAX_FORWARDS '10' 
HTTP_USER_AGENT 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)' 
HTTP_X_FORWARDED_FOR '74.6.27.74' 
HTTP_X_FORWARDED_HOST 'ndg.nerc.ac.uk' 
HTTP_X_FORWARDED_SERVER 'ndgprod.badc.rl.ac.uk' 
PATH_INFO '/csml/UsersManual.pdf,' 
REMOTE_ADDR '127.0.0.1' 
REQUEST_METHOD 'GET' 
SERVER_NAME '0.0.0.0' 
SERVER_PORT '8081' 
SERVER_PROTOCOL 'HTTP/1.1' 

Configuration 
__file__ '/etc/ndg/conf/development.ini' 
app_conf {'session_data_dir': '/etc/ndg/conf/data/sessions', 'tmp_dir': '/etc/ndg/conf/data/tmp', 'csml_dir': '/research/home/spascoe/host/saturn/data/ddc_data/obs', 'package': 'ows_server', 'publish_dir': '/etc/ndg/conf/ows_server/private/filestore', 'ows_common_config': '/etc/ndg/conf/eg_ows_capabilities.xml', 'session_secret': 'somesecret', 'configfile': '/etc/ndg/conf/ndgDiscovery.config', 'cache_dir': '/etc/ndg/conf/data', 'cache_data_dir': '/etc/ndg/conf/data/cache', 'session_key': 'ows_server'} 
cache_dir '/etc/ndg/conf/data' 
configfile '/etc/ndg/conf/ndgDiscovery.config' 
csml_dir '/research/home/spascoe/host/saturn/data/ddc_data/obs' 
debug 'false' 
email_to 's.e.latham@rl.ac.uk' 
error_email_from '"Pylons Errors" <paste@proglue.badc.rl.ac.uk>' 
global_conf {'error_email_from': '"Pylons Errors" <paste@proglue.badc.rl.ac.uk>', '__file__': '/etc/ndg/conf/development.ini', 'smtp_server': 'outbox.rl.ac.uk', 'here': '/etc/ndg/conf', 'email_to': 's.e.latham@rl.ac.uk', 'debug': 'false'} 
here '/etc/ndg/conf' 
ows_common_config '/etc/ndg/conf/eg_ows_capabilities.xml' 
publish_dir '/etc/ndg/conf/ows_server/private/filestore' 
session_key 'ows_server' 
session_secret 'somesecret' 
smtp_server 'outbox.rl.ac.uk' 
tmp_dir '/etc/ndg/conf/data/tmp' 

WSGI Variables 
application <paste.httpexceptions.HTTPExceptionHandler object at 0x1517a50> 
beaker.cache <beaker.cache.CacheManager object at 0x150ced0> 
beaker.session {'_accessed_time': 1199335922.2237029, '_creation_time': 1199335922.2237029} 
ndgConfig <ows_server.models.Utilities.myConfig instance at 0x150b710> 
paste.expected_exceptions [<class 'paste.httpexceptions.HTTPException'>] 
paste.httpexceptions <paste.httpexceptions.HTTPExceptionHandler object at 0x1517a50> 
paste.httpserver.thread_pool <paste.httpserver.ThreadPool object at 0xa54790> 
paste.registry <paste.registry.Registry object at 0x1bd9850> 
paste.throw_errors True 
pylons.environ_config {'cache': 'beaker.cache', 'session': 'beaker.session'} 
pylons.routes_dict {'action': u'index', 'controller': u'csml_api', 'file': u'UsersManual', 'format': u'pdf,'} 
routes.route <routes.base.Route object at 0x14978d0> 
wsgi process 'Multithreaded' 
wsgiorg.routing_args ((), {'action': u'index', 'controller': u'csml_api', 'file': u'UsersManual', 'format': u'pdf,'}) 

Change History

comment:1 Changed 12 years ago by lawrence

  • Priority changed from desirable to blocker

This is because the user was trying to get at http://ndg.nerc.ac.uk/csml/Usermanual.pdf ... which ought to be served up as a static file without any drama, but is getting caught up in the ndg stuff.

So it's not that anything is missing per se, rather that something has gone wrong in the routing ...

comment:2 Changed 12 years ago by selatham

  • Owner changed from spascoe to pjkersha
  • Milestone changed from portal1 to Updated NERC Metadata Gateway

Passing to Phil then as he ids dealing with the static website issues.

comment:3 Changed 12 years ago by selatham

  • Summary changed from Bug when trying to follow link? to Bug when trying to look at csml User Manual pdf on website

comment:4 Changed 12 years ago by pjkersha

  • Status changed from new to assigned

I've investigated a little and this is what I've found so far...

http://ndg.nerc.ac.uk/csml/UsersManual.pdf

... in the browser address bar. However, clicking on the link 'UsersManual.pdf' on the index page works fine. This is a relative link.

  • I looked on the server and experimented with changing the file name e.g.
http://ndg.nerc.ac.uk/csml/tmp.pdf

etc. All these work OK. Finally I renamed back to UsersManual.pdf and this works too!?!

  • If I try miss-typing the file name e.g. http://ndg.nerc.ac.uk/csml/Usermanual.pdf I get the internal server error. So this a problem with the Pylons stack not coming back with a 404 error - needs more investigation into the error trace...

comment:5 Changed 12 years ago by pjkersha

  • Owner changed from pjkersha to domlowe
  • Status changed from assigned to new

There's a bug in ows_server.controllers.csml_api, 'ows_server.lib.csml_util has no get_csml_document`

from ows_server.lib.csml_util import get_csml_doc, CsmlBundle, get_csml_document
ImportError: cannot import name get_csml_document

This is preventing Pylons getting any further and giving a 404 error for .pdf file not found under csml/

I'm passing on to Dom to look at...

comment:6 Changed 12 years ago by domlowe

  • Status changed from new to closed
  • Resolution set to fixed

Okay, should be fixed in 3246. There was an old route /csml which is no longer used. I've removed it from routing.py

I've left the csml_api controller intact (but inactive) for now as we may want to use it in the future.

Interesting lesson in mixing 'normal' websites with pylons!

Note: See TracTickets for help on using tickets.