[ckan-dev] Running DataPusher on Apache

Vitor Baptista vitor at vitorbaptista.com
Fri Oct 11 23:18:16 UTC 2013


Hi all,

I'm having a few problems trying to configure datapusher to run on a RHEL6
machine. I've created a virtualenv separated from CKAN's, and pip freeze
gives me:

APScheduler==2.1.1
> Flask==0.10.1
> Flask-Admin==1.0.6
> Flask-Login==0.2.7
> Flask-WTF==0.9.3
> Jinja2==2.7.1
> MarkupSafe==0.18
> SQLAlchemy==0.8.2
> Unidecode==0.04.14
> WTForms==1.0.5
> Werkzeug==0.9.4
> argparse==1.2.1
> chardet==2.1.1
> ckanserviceprovider==0.1dev
> datapusher==0.1
> itsdangerous==0.23
> json-table-schema==0.1
> lxml==3.2.3
> messytables==0.12.0
> python-dateutil==1.5
> python-magic==0.4.3
> python-slugify==0.0.6
> requests==2.0.0
> xlrd==0.9.2


I'm using a "vanilla" datapusher.wsgi

import os
> activate_this =
> os.path.join('/usr/lib/ckan/datapusher/bin/activate_this.py')
> execfile(activate_this, dict(__file__=activate_this))
> import ckanserviceprovider.web as web
> import datapusher.jobs as jobs
> # check whether jobs have been imported properly
> assert(jobs.push_to_datastore)
> web.configure()
> application = web.app


But when I try to access the /status page, I get:

[error] [client 127.0.0.1] mod_wsgi (pid=10787): Target WSGI script
> '/etc/ckan/default/datapusher.wsgi' cannot be loaded as Python module.
> [error] [client 127.0.0.1] mod_wsgi (pid=10787): Exception occurred
> processing WSGI script '/etc/ckan/default/datapusher.wsgi'.
> [error] [client 127.0.0.1] Traceback (most recent call last):
> [error] [client 127.0.0.1]   File "/etc/ckan/default/datapusher.wsgi",
> line 5, in <module>
> [error] [client 127.0.0.1]     import ckanserviceprovider.web as web
> [error] [client 127.0.0.1]   File
> "/usr/lib/ckan/datapusher/lib/python2.6/site-packages/ckanserviceprovider-0.1dev-py2.6.egg/ckanserviceprovider/web.py",
> line 16, in <module>
> [error] [client 127.0.0.1]     import apscheduler.scheduler as apscheduler
> [error] [client 127.0.0.1] ImportError: No module named
> apscheduler.scheduler


My Apache's configuration file is:

<VirtualHost datapusherserver:80>
>     ServerName datapusherserver
>     WSGIDaemonProcess ckan_datapusher user=apache group=apache threads=5
>     WSGIScriptAlias / /etc/ckan/default/datapusher.wsgi
>     ErrorLog /var/log/httpd/ckan_datapusher.error.log
>     CustomLog /var/log/httpd/ckan_datapusher.custom.log combined
> </VirtualHost>


I think SELinux might be the culprit, but I'm not sure. I checked my dmesg
after trying to access the page, but there weren't any SELinux's denied
messages.

Any ideas?

Cheers,

-- 

Vítor Baptista

Developer  |  http://vitorbaptista.com |
LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
@vitorbaptista <http://twitter.com/vitorbaptista>

The Open Knowledge Foundation <http://okfn.org>

*Empowering through Open Knowledge*

http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131011/4a7653e8/attachment.html>


More information about the ckan-dev mailing list