[ckan-dev] FileStore integration with Apache does not work

User66 user66 at arcor.de
Tue Apr 2 07:17:23 UTC 2013


I did following test:

1) Start the paster web server.
2) Add a resource to a dataset and upload an image to it (via the port 5000 web service)
3) Stop the paster web server (and delete the session files in "pyenv/src/ckan/data/sessions" due to potential permission conflict ckan user vs. www user)
4) Access CKAN via Apache web service. Result: The image is still available via the Apache web service. But the "Upload" button/link does not appear!

So, the general integration to the storage area works, but to some extent the Phython API is not fully working with Apache. Is there something to consider regarding the API path described at http://docs.ckan.org/en/latest/filestore-api.html ? Since after initial Apache integration I got errors like

 [Mon Mar 25 11:59:57 2013] [error] [client xxx] File does not exist: /srv/www/htdocs/api, referer: http://domain.de/ckan/

I don't know who points to /api there? So, I just created an Apache alias like

 Alias /api /opt/ckan/pyenv/src/ckan/ckan

... assuming that this is the path to the API.

BTW: It doesn't matter if the Alias is active or not. In both cases the Upload link does not appear.

So, I assume that Apache does not have the right path to the API. The only Apache config so far is

WSGIScriptAlias /ckan /opt/ckan/pyenv/src/ckan/bin/domain.de.py
WSGIPassAuthorization On

Cheers
Ralf

----------------ursprüngliche Nachricht-----------------
Von: "User66" user66 at arcor.de 
An: "CKAN Development Discussions" ckan-dev at lists.okfn.org 
Datum: Tue, 2 Apr 2013 08:33:25 +0200
-------------------------------------------------
 
 
> Hi Sean,
> 
> thanks for your reply.
> 
> I had already seen this stackoverflow item before, since I did a web research 
> before posting this item ;-) All those checks are successfully done. As I said, 
> FileStore works with the paster web server, but as soon as I switch to Apache the 
> FileStore disappears from my CKAN GUI (upload link not available at all). Very 
> strange.
> 
> How can I create a "full Python traceback"? (I am from the PHP/MySQL fraction, 
> Python and PostgreSQL are not my strengths)
> 
> Cheers
> Ralf
> 
> ----------------ursprüngliche Nachricht-----------------
> Von: "Sean Hammond" sean.hammond at okfn.org 
> An: ckan-dev at lists.okfn.org 
> Datum: Mon, 1 Apr 2013 22:21:31 +0200
> -------------------------------------------------
> 
> 
>>> I am running latest CKAN 2.x master on my server by integrating into
>>> Apache 2.2.22 web server according to the description under
>>> http://docs.ckan.org/en/latest/deployment.html . So far, this 
>>> works.
>>> 
>>> But I have problems with the activation of the FileStore functionality
>>> described under http://docs.ckan.org/en/latest/filestore.html.
>>> 
>>> The FileStore works if I run CKAN using the built-in web server. The
>>> "Upload a file" link in the dataset resource window is available and
>>> uploading a file works.
>>> 
>>> But if I run CKAN with Apache (WSGI) with the same config, the FielStore
>>> add-on does not work - it's not even visible in CKAN. It seems that it
>>> is not initialized at all. There is no "Upload a file" link in the
>>> dataset resource window at all. There are no error messages or any other
>>> hints in the log files except of periodic Apache errors like:
>>> 
>>> ########
>>> [Mon Apr 01 09:48:37 2013] [error] Exception AttributeError: 
>>> "'NoneType'
>>> object has no attribute 'clearing'" in <bound method
>>> PluginEnvironment.__del__ of Services for Environment '<default>'
>>> [Mon Apr 01 09:48:37 2013] [error] > ignored
>>> ########
>>> 
>>> Is there anybody who has integrated FileStore with Apache WSGI
>>> successfully? How can I debug this (Apache Python stuff)?
>> 
>> I'd try the suggestions listed in this answer:
>> 
>> 
>> 
>> http://stackoverflow.com/questions/13971622/error-when-trying-to-u
>> pl
>> 
>> oad-a-file-to-ckan-failed-to-get-credentials-for-stora/13971623#13
>> 97
>> 1623
>> 
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org 
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>> 
> 
> 
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org 
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> 






More information about the ckan-dev mailing list