gpt4 book ai didi

nginx - 异常 : bus. 使用 nginx 作为代理服务器的 Odoo 8 多处理总线不可用

转载 作者:行者123 更新时间:2023-12-04 16:07:01 25 4
gpt4 key购买 nike

我正在以 nginx 作为代理服务器的多处理模式下使用 Odoo 8,我阅读了很多关于此错误的问题,但我仍然无法解决我的问题,我认为我无法在 gevent 中运行 odoo模式,我已经像许多帖子所说的那样使用 longpooling 位置配置了 nginx,我的配置如下:-

nginx 配置:-

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

请注意,我将 odoo 服务器作为服务运行,配置如下:-
#!/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

对不起,如果我的问题是重复的,但我真的无法解决它:(

最佳答案

您的 Odoo 配置丢失:

proxy_mode = True

关于nginx - 异常 : bus. 使用 nginx 作为代理服务器的 Odoo 8 多处理总线不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37542455/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com