Error Exception during JSON request handling

967 views
Skip to first unread message

Richardssen Stoll Ander

unread,
Mar 27, 2017, 12:46:55 PM3/27/17
to Usuarios Odoo / OpenERP en España

Hola, tengo un problema que no consigo solucionar.

Observando el log de Odoo, observo que un error se repite continuamente.

He llegado a detectar que el problema es que las llamadas a "http://127.0.0.1:8072/longpolling/poll" es el causante del problema, pero no consigo solucionarlo.


2017-03-23 01:42:40,864 304 ERROR itnmarket openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/home/richi/odoo/odoo/openerp/http.py", line 544, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/richi/odoo/odoo/openerp/addons/base/ir/ir_http.py", line 152, in _dispatch
    rule, arguments = self._find_handler(return_rule=True)
  File "/home/richi/odoo/odoo/openerp/addons/base/ir/ir_http.py", line 65, in _find_handler
    return self.routing_map().bind_to_environ(request.httprequest.environ).match(return_rule=return_rule)
  File "/usr/lib/python2.7/dist-packages/werkzeug/routing.py", line 1430, in match
    raise NotFound()
NotFound: 404: Not Found

Viendo el log de Nginx observo el siguiente error, que esta relacionado con este error:

2017/03/22 21:44:09 [error] 307#307: *425 connect() failed (111: Connection refused) while connecting to upstream, client: 83.138.252.251, server: itnmarket.es, request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:8072/longpolling/poll", host: "itnmarket.es", referrer: "https://itnmarket.es/web"

 

Los archivos de configuracion de Nginx son:

nginx.conf ->

upstream backend-odoo {
    server 127.0.0.1:8069;
}

server {
    listen      5.145.174.177:80;
    listen [::]:80 ipv6only=on;

    server_name itnmarket.es www.itnmarket.es;
    root        /home/admin/web/itnmarket.es/public_html;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/itnmarket.es.log combined;
    access_log  /var/log/nginx/domains/itnmarket.es.bytes bytes;
    error_log   /var/log/nginx/domains/itnmarket.es.error.log error;

    # Strict Transport Security
    add_header Strict-Transport-Security max-age=2592000;

    # Redirect 301 to HTTPS
    return 301 https://$host$request_uri;

    include     /home/admin/conf/web/nginx.itnmarket.es.conf*;
}

snginx.conf ->

upstream odoo {
    server 127.0.0.1:8069 weight=1 fail_timeout=3000s;
}
upstream backend-odoo-im {
    server 127.0.0.1:8072;
}

upstream odoo {
    server 127.0.0.1:8069 weight=1 fail_timeout=3000s;
}
upstream backend-odoo-im {
    server 127.0.0.1:8072;
}

server {

    listen      5.145.174.177:443;

    listen [::]:443 ipv6only=on;
    server_name itnmarket.es www.itnmarket.es;
    root        /home/admin/web/itnmarket.es/public_html;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/itnmarket.es.log combined;
    access_log  /var/log/nginx/domains/itnmarket.es.bytes bytes;
    error_log   /var/log/nginx/domains/itnmarket.es.error.log error;

    ssl         on;
    ssl_certificate      /home/admin/conf/web/ssl.itnmarket.es.pem;
    ssl_certificate_key  /home/admin/conf/web/ssl.itnmarket.es.key;


    ssl_ciphers                 ALL:!ADH:!MD5:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM;
    ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers   on;

    # Specifies the maximum accepted body size of a client request,
    # as indicated by the request header Content-Length.
    client_max_body_size        200m;

    # add ssl specific settings
    keepalive_timeout           60;

    # increase proxy buffer to handle some OpenERP web requests
    proxy_buffers               16 64k;
    proxy_buffer_size           128k;

    # general proxy settings
    # force timeouts if the backend dies
    proxy_connect_timeout 3600s;
    proxy_send_timeout    3600s;

    send_timeout          3600s;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

    # by default, do not forward anything
    proxy_redirect off;
    proxy_buffering off;

    # Set headers
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

    # Let the OpenERP web service know that we’re using HTTPS, otherwise
    # it will generate URL using http:// and not https://
    proxy_set_header X-Forwarded-Proto https;

    # enable data compression
#   gzip off;
    gzip on;
    gzip_min_length 1100;
    gzip_buffers 4 32k;
    gzip_types text/plain application/x-javascript text/xml text/css;

 gzip_vary on;

    # By default, do not forward anything
    proxy_redirect          off;

    location /longpolling {
        proxy_pass http://backend-odoo-im;
    }

    location / {
        proxy_pass              http://odoo;
    }

    # Cache some static data in memory for 60mins.
    # under heavy load this should relieve stress on the Odoo web interface a bit.
    location ~* /[0-9a-zA-Z_]*/static/ {
        proxy_cache_valid       200 60m;
        proxy_buffering         on;
        expires                 864000;
        proxy_pass              http://odoo;
    }

    include     /home/admin/conf/web/snginx.itnmarket.es.conf*;

}

¿Alguien a tenido el mismo problema ?

Gracias a todos


Darío Lodeiros

unread,
Mar 28, 2017, 3:06:10 AM3/28/17
to Usuarios Odoo / OpenERP en España
Prueba a cerrar todas las sesiones y reiniciar el servidor.
Saludos!

Richardssen Stoll Ander

unread,
Apr 3, 2017, 8:23:05 PM4/3/17
to Usuarios Odoo / OpenERP en España
Gracias por tu ayuda Darío. He probado lo que me comentas, incluso he borrado el contenido de la carpeta sessions pero sigue dando el mismo error.

Casi estoy convencido que es un problema de configuración de nginx...

Seguiré intentandolo

Reply all
Reply to author
Forward
0 new messages