2016-05-31 32 views
3

Ich arbeite an Odoo 8 in einem Multiprocessing-Modus mit Nginx als Proxy-Server, ich lese viele Probleme über diesen Fehler, aber ich kann immer noch ' t fix mein problem, ich denke, dass ich konnte nicht odoo in einem gevent-modus, ich konfigurierte bereits die nginx mit dem longpooling standort wie viele posts sagte, meine konfiguration ist wie folgt: -Ausnahme: bus.Bus nicht verfügbar Odoo 8 Multiprocessing mit Nginx als Proxy-Server

nginx config: -

upstream odoo8 { 

server 127.0.0.1:8069 weight=1 fail_timeout=0; 

} 

upstream odoo8-im { 

server 127.0.0.1:8072 weight=1 fail_timeout=0; 

} 

server { 

listen 80; 

server_name 138.201.xx.xx; 

access_log /var/log/nginx/odoo.access.log; 

error_log /var/log/nginx/odoo.error.log; 

location /longpolling { 

proxy_pass http://odoo8-im; 

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; 

proxy_redirect off; 

# set headers 

proxy_set_header Host $host; 

proxy_set_header X-Real-IP $remote_addr; 

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 

proxy_set_header X-Forwarded-Proto https; 

proxy_connect_timeout 600; 

proxy_send_timeout 600; 

proxy_read_timeout 600; 

send_timeout 600; 

} 

location/{ 

proxy_pass http://odoo8; 

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; 

proxy_buffer_size 128k; 

proxy_buffers 16 64k; 

proxy_redirect off; 

proxy_set_header Host $host; 

proxy_set_header X-Real-IP $remote_addr; 

# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 

# proxy_set_header X-Forwarded-Proto https; 

proxy_connect_timeout 600; 

proxy_send_timeout 600; 

proxy_read_timeout 600; 

send_timeout 600; 

} 

location ~* /web/static/ { 

proxy_buffering on; 
proxy_pass 127.0.0.1:8069; 

} 

} 

odoo.config: -

; This is the password that allows database operations: 

; admin_passwd = admin 

db_host = False 

db_port = False 

db_user = odoo 

db_password = odoo 

addons_path = /opt/odoo/addons,/opt/odoo/addons/sale-workflow-8.0,/opt/odoo/addons/product-attribute-8.0,/opt/odoo/addons/e-commerce-8.0,/opt/odoo/addons/connector-magento-8.0,/opt/odoo/addons/connector-ecommerce-8.0,/opt/odoo/addons/connector-8.0 

logfile = /var/log/odoo/odoo-server.log 

workers = 12 

limit_time_real = 600 

limit_time_cpu = 300 

als Notiz Ich bin mit dem odoo Server als Dienst und die Konfiguration ist wie folgt: -

#!/bin/sh 

### BEGIN INIT INFO 

# Provides: odoo-server 

# Required-Start: $remote_fs $syslog 

# Required-Stop: $remote_fs $syslog 

# Should-Start: $network 

# Should-Stop: $network 

# Default-Start: 2 3 4 5 

# Default-Stop: 0 1 6 

# Short-Description: Complete Business Application software 

# Description: Odoo is a complete suite of business tools. 

### END INIT INFO 

PATH=/usr/local/bin:/bin:/sbin:/usr/bin 

DAEMON=/opt/odoo/openerp-server 

NAME=odoo-server 

DESC=odoo-server 

ODOO_CONNECTOR_CHANNELS=root:4,root.magento:2 

# Specify the user name (Default: odoo). 

USER=odoo 

# Specify an alternate config file (Default: /etc/odoo-server.conf). 

CONFIGFILE="/etc/odoo-server.conf" 

# pidfile 

PIDFILE=/var/run/$NAME.pid 

# Additional options that are passed to the Daemon. 

DAEMON_OPTS="-c $CONFIGFILE" 

[ -x $DAEMON ] || exit 0 

[ -f $CONFIGFILE ] || exit 0 

checkpid() { 

[ -f $PIDFILE ] || return 1 

pid=`cat $PIDFILE` 

[ -d /proc/$pid ] && return 0 

return 1 

} 

case "${1}" in 
start) 

echo -n "Starting ${DESC}: " 

start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ 

--chuid ${USER} --background --make-pidfile \ 

--exec ${DAEMON} -- ${DAEMON_OPTS} 

echo "${NAME}." 

;; 

stop) 

echo -n "Stopping ${DESC}: " 

start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ 

--oknodo 

echo "${NAME}." 

;; 

restart|force-reload) 

echo -n "Restarting ${DESC}: " 

start-stop-daemon --stop --quiet --pidfile ${PIDFILE} \ 

--oknodo 

sleep 1 

start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ 

--chuid ${USER} --background --make-pidfile \ 

--exec ${DAEMON} -- ${DAEMON_OPTS} 

echo "${NAME}." 

;; 

*) 

N=/etc/init.d/${NAME} 

echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2 

exit 1 

;; 

esac 

exit 0 

leid, wenn meine Frage Duplikat ist, aber ich kann es wirklich nicht lösen :(

+0

Überprüfen Sie, ob [dieser Beitrag] (http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/) Ihnen helfen – ChesuCR

+0

danke @ChesuCR Meine Konfiguration ist jetzt genau wie der Link erwähnt mit Ausnahme der SSL-Einstellungen, weil ich das SSL-Zertifikat noch nicht eingerichtet habe, aber ich habe immer noch diesen Fehler in meinen Protokollen: - '2016/06/05 08:55:52 [Fehler] 9703 # 0: * 5 connect() fehlgeschlagen (111: Verbindung abgelehnt) während der Verbindung mit dem Upstream, Client: 192.168.1.127, Server: 192.168.1.127, Anfrage: "POST/longpolling/poll HTTP/1.1", Upstream: "http : //127.0.0.1: 8072/longpolling/poll ", host:" 192.168.1.127 ", Referrer:" http://192.168.1.127/web "' – IsmaeelSameed

Antwort

0

Ihre Odoo Config fehlt:

proxy_mode = True 
+0

danke @CZoellner ich habe es zu meiner Config hinzugefügt aber immer noch Der folgende Fehler: - '2016/06/05 08:55:52 [Fehler] 9703 # 0: * 5 connect() fehlgeschlagen (111: Verbindung abgelehnt) beim Verbinden mit Upstream, Client: 192.168.1.127, Server: 192.168 .1.127, Anfrage: "POST/Longpolling/Poll HTTP/1.1 ", upstream:" http://127.0.0.1:8072/longpolling/poll ", Host:" 192.168.1.127 ", Referrer:" http://192.168.1.127/web "' – IsmaeelSameed

+0

Auf welchem ​​OS bist du? Mit 12 Arbeitern (Config) und 2 Crons (Standard) muss Ihr odoo-Prozess 15 Threads haben, einschließlich eines Gevent-Threads. Wenn Sie den Gevent-Thread nicht sehen, ist bei der Installation von odoo ein Fehler aufgetreten. Ich hatte das gleiche Problem auf Debian-Systemen und löste es mit der manuellen Installation wie [dies] (https://github.com/odoo/odoo/pull/10207#issuecomment-216745382) und vielleicht müssen Sie auch psycogreen python lib installieren . – CZoellner

0

In Ihrem nginx.conf

location /longpolling { 

    proxy_pass http://odoo8-im:8072; 

    }