[ckan-dev] production deployment

Rufus Pollock rufus.pollock at okfn.org
Mon Jun 13 18:16:18 UTC 2011


Hi Pascal,

Sorry for slow reply! Questions:

* Can you run the site using paster serve? (and visit on port 5000 or
whichever port it starts on)
* Can you do python datalocale.cg33.fr.py without errors
* Are you running wsgi in daemon or embedded mode?

Rufus

On 10 June 2011 17:57, <p.romain at cg33.fr> wrote:
>
> Hi,
>
> I am getting back to you regarding my production deployment issue still not resolved.
>
> I have installed ckan in a pyenv virtual environnement /home/opendata/pyenv
> So I have the following install setup
>
> /home/opendata/pyenv
> /home/opendata/pyenv/src/
> /home/opendata/pyenv/src/ckan
>
> In the ckan folder I have the configuration file datalocale.cg33.fr.ini
> In the/home/opendata/pyenv/bin I have the datalocale.cg33.fr.py python script.
>
> In the later I have
>
> import os
> instance_dir = '/home/opendata/'
> config_file = 'pyenv/src/ckan/datalocale.cg33.fr.ini'
> pyenv_bin_dir = os.path.join(instance_dir, 'pyenv', 'bin')
> activate_this = os.path.join(pyenv_bin_dir, 'activate_this.py')
> execfile(activate_this, dict(__file__=activate_this))
> execfile(activate_this, dict(__file__=activate_this))
> import ckanext
> from paste.deploy import loadapp
> config_filepath = os.path.join(instance_dir, config_file)
> from paste.script.util.logging_config import fileConfig
> fileConfig(config_filepath)
> application = loadapp('config:%s' % config_filepath)
>
> then I declared a virtual host in apache
>
> WSGIVerboseDebugging On
> WSGIDaemonProcess debug threads=1
> WSGIProcessGroup debug
>
> <VirtualHost *:80>
> ServerName datalocale.drupalva.cg33.fr
> ServerAlias datalocale
> WSGIScriptAlias / /home/opendata/pyenv/bin/datalocale.cg33.fr.py
> # pass authorization info on (needed for rest api)
> # WSGIPassAuthorization On
> <Directory "/home/opendata/pyenv/src/ckan">
> Order allow,deny
> Allow from all
> </Directory>
> LogLevel warn
> ErrorLog /opt/apache2/logs/datalocale.error.log
> CustomLog /opt/apache2/logs/datalocale.access.log combined
>
> </VirtualHost>
>
> I get the following error
>
> [Fri Jun 10 18:41:15 2011] [info] mod_wsgi (pid=14048): Create interpreter 'datalocale.drupalva.cg33.fr|'.
> [Fri Jun 10 18:41:16 2011] [notice] child pid 14048 exit signal Segmentation fault (11)
> [Fri Jun 10 18:41:16 2011] [info] mod_wsgi (pid=14048): Process 'debug' has died, restarting.
> [Fri Jun 10 18:41:16 2011] [info] mod_wsgi (pid=14363): Starting process 'debug' with uid=2, gid=2 and threads=1.
> [Fri Jun 10 18:41:16 2011] [info] mod_wsgi (pid=14363): Initializing Python.
> [Fri Jun 10 18:41:16 2011] [info] mod_wsgi (pid=14363): Attach interpreter ''.
>
> Can you see anything wrong in this setup.
>
> I am really desesparate to make it to work so any help would be greatly appreciated :)
>
> p.s: the details of my apapche config are detailed below
>
> /opt/apache2/bin/httpd -V
>
> Server version: Apache/2.2.17 (Unix)
> Server built:   Mar  8 2011 10:30:57
> Server's Module Magic Number: 20051115:25
> Server loaded:  APR 1.4.2, APR-Util 1.3.10
> Compiled using: APR 1.4.2, APR-Util 1.3.10
> Architecture:   64-bit
> Server MPM:     Prefork
>   threaded:     no
>     forked:     yes (variable process count)
> Server compiled with....
>  -D APACHE_MPM_DIR="server/mpm/prefork"
>  -D APR_HAS_SENDFILE
>  -D APR_HAS_MMAP
>  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
>  -D APR_USE_SYSVSEM_SERIALIZE
>  -D APR_USE_PTHREAD_SERIALIZE
>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>  -D APR_HAS_OTHER_CHILD
>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>  -D DYNAMIC_MODULE_LIMIT=128
>  -D HTTPD_ROOT="/opt/httpd-2.2.17"
>  -D SUEXEC_BIN="/opt/httpd-2.2.17/bin/suexec"
>  -D DEFAULT_PIDLOG="logs/httpd.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_LOCKFILE="logs/accept.lock"
>  -D DEFAULT_ERRORLOG="logs/error_log"
>  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
>  -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
> /opt/apache2/bin/httpd -l
> Compiled in modules:
>   core.c
>   prefork.c
>   http_core.c
>   mod_so.c
>
> /opt/apache2/bin/httpd -M
> wsgi_module (shared)
>
> ldd mod_wsgi.so
>         linux-vdso.so.1 =>  (0x00007fffa7dfc000)
>         libpython2.7.so.1.0 => /opt/Python-2.7.1/lib/libpython2.7.so.1.0 (0x00002ada33569000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ada33934000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00002ada33b4f000)
>         libutil.so.1 => /lib64/libutil.so.1 (0x00002ada33d53000)
>         libm.so.6 => /lib64/libm.so.6 (0x00002ada33f57000)
>         libc.so.6 => /lib64/libc.so.6 (0x00002ada341da000)
>         /lib64/ld-linux-x86-64.so.2 (0x000000387b200000)
>
>
> Best
> Pascal Romain
>
>
>
> Rufus Pollock <rufus.pollock at okfn.org>
> Envoyé par : okfn.rufus.pollock at gmail.com
>
> 01/06/2011 13:25
>
> Veuillez répondre à
> rufus.pollock at okfn.org
> A
> p.romain at cg33.fr
> cc
> CKAN Development Discussions <ckan-dev at lists.okfn.org>
> Objet
> Re: [ckan-dev] production deployment
>
>
>
>
> On 1 June 2011 10:02, <p.romain at cg33.fr> wrote:
> >
> > Hi Rufus,
> > Thanks for your help.
> > I disabled the plugins and don't have anymore errors when I run "python datalocale.cg33.fr.py" (appart from No handlers could be found for logger "vdm")
> >
> > So normally everything should be ok...unfortunately I have a "child pid 15602 exit signal Segmentation fault (11)" in my error_log apache log file.
> >
> > I did some research and it could be due to a conflict between mod_python and mod_wsgi both enabled in our apache configuration.
> >
> > Is it posible to disable mod_python to run ckan as a wsgi application ?
>
> You should *definitely* run CKAN via modwsgi and not via modpython (I
> made a suggestion earlier that if you had problems with plugins you
> should run modwsgi in 'embedded' mode rather than daemon mode but you
> should definitely use modwsgi ...)
>
> Rufus
>
>
> __________________________________________________________________
>
> Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Ce message ne constitue pas un document officiel. Seuls les documents revêtus de la signature du Président du Conseil Général ou d'un de ses délégataires sont de nature à engager le Département.
> Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération et le Département de la Gironde décline toute responsabilité au titre de ce message s'il a été altéré, déformé, falsifié.



--
Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/




More information about the ckan-dev mailing list