[ckan-dev] Resource preview error on non-root ckan

eli fericel elifericel at yahoo.com
Thu Jul 3 11:58:14 UTC 2014


Hi,

I have installed ckan 2.1.1 with datapusher on Ubuntu 12.04. Running the whole thing works fine as root (example.com) through apache and proxy by nginx.
I want to serve CKAN on a non-root URL (example.com/ckan). I made the following settings:

 - Changed 'WSGIScriptAlias / /etc/ckan/default/apache.wsgi' in 'WSGIScriptAlias /ckan /etc/ckan/default/apache.wsgi' in  /etc/apache2/sites-available/ckan-default 

 - Changed 'location / { ' in 'location /ckan { ' in  /etc/nginx/sites-available/ckan 

 - Changed 'proxy_pass http://127.0.0.1:8080' in 'proxy_pass http://127.0.0.1:8080/ckan' in  /etc/nginx/sites-available/ckan 

 After this settings ckan is accessible on example.com/ckan. When creating new resource , upload is execute ok, download new resource is ok. There is an error that appears when I try to view the resource I just uploaded 

 "This resource can not be previewed at the moment.
 Could not load preview: DataProxy returned an error (Data transformation failed. error: An error occured while connecting to the server: DNS lookup failed for URL: http://example.com/ckan/storage/f/2014-07-03T10%3A55%3A34.762Z/test.csv"


 Also, in the datapusher.error.log there is an error message:

[Thu Jul 03 13:55:45 2014] [error] Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
[Thu Jul 03 13:55:45 2014] [error] Traceback (most recent call last):
[Thu Jul 03 13:55:45 2014] [error]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/APScheduler-2.1.1-py2.7.egg/apscheduler/scheduler.py", line 512, in _run_job
[Thu Jul 03 13:55:45 2014] [error]     retval = job.func(*job.args, **job.kwargs)
[Thu Jul 03 13:55:45 2014] [error]   File "/usr/lib/ckan/default/src/datapusher/datapusher/jobs.py", line 232, in push_to_datastore
[Thu Jul 03 13:55:45 2014] [error]     resource = get_resource(resource_id, ckan_url, api_key)
[Thu Jul 03 13:55:45 2014] [error]   File "/usr/lib/ckan/default/src/datapusher/datapusher/jobs.py", line 186, in get_resource
[Thu Jul 03 13:55:45 2014] [error]     check_response(r, url, 'CKAN')
[Thu Jul 03 13:55:45 2014] [error]   File "/usr/lib/ckan/default/src/datapusher/datapusher/jobs.py", line 91, in check_response
[Thu Jul 03 13:55:45 2014] [error]     resp=response.text[:200]))
[Thu Jul 03 13:55:45 2014] [error] JobError: CKAN bad response. Status code: 404 Not Found. At: http://example.com/api/3/action/resource_show. Response: <html>\r
[Thu Jul 03 13:55:45 2014] [error] <head><title>404 Not Found</title></head>\r
[Thu Jul 03 13:55:45 2014] [error] <body bgcolor="white">\r
[Thu Jul 03 13:55:45 2014] [error] <center><h1>404 Not Found</h1></center>\r
[Thu Jul 03 13:55:45 2014] [error] <hr><center>nginx/1.1.19</center>\r
[Thu Jul 03 13:55:45 2014] [error] </body>\r
[Thu Jul 03 13:55:45 2014] [error] </html>\r

 Any help would be appreciated.
 Thanks in advance,

 Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140703/631ea5b3/attachment-0002.html>


More information about the ckan-dev mailing list