Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Deploy en Nginx - postgresql - Centos 6.2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christian Espinoza  
View profile   Translate to Translated (View Original)
 More options Sep 12 2012, 9:23 am
From: Christian Espinoza <chespin...@gmail.com>
Date: Wed, 12 Sep 2012 10:23:34 -0300
Local: Wed, Sep 12 2012 9:23 am
Subject: Deploy en Nginx - postgresql - Centos 6.2

Hola, he tenido bastantes problemas al tratar de hacer el deployment con
nginx + web2py en Centos 6.2
usé el script que viene con la distribución, probé uno que estaba en esta
misma lista publicada por Alan
y en todas me fue mal.

Web2py se inicia, y las apps normales corren bien, hasta que trato de usar
alguna conexión con postgresql
y empiezan los errores, probé con los dos drivers que hay disponibles para
postgresql y en ambas me va mal...

El tema es que usando el webserver que trae Web2py funciona todo bien!!

Alguien ha tenido que lidiar con algo semejante?

Saludos
Christian.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Etkin  
View profile   Translate to Translated (View Original)
 More options Sep 12 2012, 9:47 am
From: Alan Etkin <spame...@gmail.com>
Date: Wed, 12 Sep 2012 06:47:52 -0700 (PDT)
Local: Wed, Sep 12 2012 9:47 am
Subject: Re: Deploy en Nginx - postgresql - Centos 6.2

> Hola, he tenido bastantes problemas al tratar de hacer el deployment con
> nginx + web2py en Centos 6.2
> usé el script que viene con la distribución, probé uno que estaba en esta
> misma lista publicada por Alan
> y en todas me fue mal.

> Este script debería funcionar

https://groups.google.com/group/web2py/attach/e671b427e770d808/centos...

Si podés chequeá que este corriendo uwsgi, creo que el error bad gateway
puede ser por eso

Qué errores te devuelve con postgres?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Espinoza  
View profile   Translate to Translated (View Original)
 More options Sep 12 2012, 4:32 pm
From: Christian Espinoza <chespin...@gmail.com>
Date: Wed, 12 Sep 2012 13:32:13 -0700 (PDT)
Local: Wed, Sep 12 2012 4:32 pm
Subject: Re: Deploy en Nginx - postgresql - Centos 6.2

Corre todo bien, pero cuando instalo mi aplicación, la cual se conecta a
postgres, falla:

<type 'exceptions.ValueError'> invalid literal for int() with base 10:
'SELECT'

Y yo se que no es un problema de la aplicación, esta funciona bien en el
server que trae web2py...

El miércoles, 12 de septiembre de 2012 10:47:52 UTC-3, Alan Etkin escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Espinoza  
View profile   Translate to Translated (View Original)
 More options Sep 12 2012, 4:56 pm
From: Christian Espinoza <chespin...@gmail.com>
Date: Wed, 12 Sep 2012 13:56:02 -0700 (PDT)
Local: Wed, Sep 12 2012 4:56 pm
Subject: Re: Deploy en Nginx - postgresql - Centos 6.2

Elimine parte de mi codigo que inicializa con datos la DB, y partió bien la
app, pero al tratar de hacer un login por ejemplo

me arrojó <class 'gluon.contrib.pg8000.errors.ProgrammingError'> ('ERROR',
'42883', 'operator does not exist: character varying = integer')

Tengo instalada psycopg2, pero como puedo usarla en web2py?

El miércoles, 12 de septiembre de 2012 17:32:13 UTC-3, Christian Espinoza
escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Etkin  
View profile  
 More options Sep 14 2012, 9:41 am
From: Alan Etkin <spame...@gmail.com>
Date: Fri, 14 Sep 2012 06:41:27 -0700 (PDT)
Local: Fri, Sep 14 2012 9:41 am
Subject: Re: Deploy en Nginx - postgresql - Centos 6.2

> me arrojó <class 'gluon.contrib.pg8000.errors.ProgrammingError'>
> ('ERROR', '42883', 'operator does not exist: character varying = integer')

Si querés usar psycopg2 lo tenés que especificar en el connection string
que le pasás a DAL en el modelo.

db = DAL('postgres://mdipierro:password@localhost/test')

o

db = DAL('postgres:psycopg2://mdipierro:password@localhost/test')

Las dos conexiones deberían usar psycopg2. Supuestamente es la interfaz por
defecto.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lisandro Rostagno  
View profile   Translate to Translated (View Original)
 More options Sep 20 2012, 7:06 am
From: Lisandro Rostagno <rostagnolisan...@gmail.com>
Date: Thu, 20 Sep 2012 04:06:37 -0700 (PDT)
Local: Thurs, Sep 20 2012 7:06 am
Subject: Re: Deploy en Nginx - postgresql - Centos 6.2

Tuve exactamente el mismo problema en Ubuntu corriendo en un VPS: la
aplicación se conectaba a la db de postgres, pero cualquier consulta
disparaba el error de "invalid literal for int() with base 10:'SELECT'".

Me di cuenta de que me faltaba instalar psycopg2:  
http://www.initd.org/psycopg/download/

Después de instalar fue necesario reiniciar apache: sudo
/etc/init.d/apache2 restart
y también reiniciar postgresql:  sudo /etc/init.d/postgresql-8.4 restart

Nota: en mi caso, no fue necesario modificar la cadena de conexión en
models/db.py (de hecho, cuando agregaba "postgres:psycogp2:...." al
ejecutar por primera vez daba error, y luego ya no conectaba y tenía que
reiniciar postgres).

Saludos.

El viernes, 14 de septiembre de 2012 10:41:27 UTC-3, Alan Etkin escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »