3

你好读者,

我在 ubuntu 16.04 中使用 Odoo 11 尝试在我的本地机器上安装 Odoo v11 CE 的 Odoo SaaS 工具包 11,当我在 SaaS=> SaaS=> 计划中创建模板数据库时遇到问题它显示以下异常:

    Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 651, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 693, in dispatch
    result = self._call_function(**self.params)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 937, in __call__
    return self.method(*args, **kw)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/home/shivam/Documents/Odoo/odoo-11.0/addons/web/controllers/main.py", line 938, in call_button
    action = self._call_kw(model, method, args, {})
  File "/home/shivam/Documents/Odoo/odoo-11.0/addons/web/controllers/main.py", line 926, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/home/shivam/Documents/Odoo/odoo-11.0/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/shivam/Documents/Odoo/odoo-11.0/saas/saas_portal/models/saas_portal.py", line 410, in create_template_button
    return self.create_template()
  File "/home/shivam/Documents/Odoo/odoo-11.0/saas/saas_portal/models/saas_portal.py", line 432, in create_template
    (req.url, res.reason, res.content))
Warning: Error on request: http://s1.odoo.local:80/saas_server/new_database
Reason: NOT FOUND 
 Message: b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>\n'

我正在关注Odoo SaaS Tool Doc 文档,我的etc/hosts文件如下:

`127.0.0.1 本地主机 127.0.1.1 shivam.sahu shivam

::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

127.0.0.1 odoo.local # 门户 127.0.0.1 s1.odoo.local # 服务器 127.0.0.1 t1.odoo.local # 模板 127.0.0.1 t2.odoo.local # 模板 127.0.0.1 client-x.odoo.local 127.0。 0.1 客户端-y.odoo.local 127.0.0.1 客户端-z.odoo.local`

我的/etc/nginx/sites-available/default如下:

`server { 监听 80 default_server; proxy_set_header 主机 $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 $scheme;

位置 /longpolling { proxy_pass http://127.0.0.1:8072 ; }

位置 / { proxy_pass http://127.0.0.1:8069 ; } }

我的/etc/odoo.conf如下:

[选项]

; 这是允许数据库操作的密码:

; admin_passwd = 管理员

db_host = 假

db_port = 假

db_user = odoo

db_password = 假

limit_time_cpu = 600

limit_time_real = 1200

工人 = 3

日志文件 = /var/log/odoo/odoo-server.log

addons_path = /opt/odoo/addons,/opt/odoo/odoo/addons`

请帮助我如何解决此异常。

4

1 回答 1

1

我错过了一些配置,错过的配置如下:这是我的etc/nginx/conf.d/server.conf

server {
        server_name example.com *.example.com ;
        listen 80;
        access_log /var/log/nginx/testing-access.log;
        error_log /var/log/nginx/testing-error.log;
        location /longpolling {
            proxy_connect_timeout   3600;
            proxy_read_timeout      3600;
            proxy_send_timeout      3600;
            send_timeout            3600;
            proxy_pass http://127.0.0.1:8072;
    }
        location / {
            proxy_connect_timeout   3600;
            proxy_read_timeout      3600;
            proxy_send_timeout      3600;
            send_timeout            3600;
            proxy_pass http://127.0.0.1:8069/;
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        gzip on;
        gzip_min_length 1000;
    }
    upstream odoo {
    server 127.0.0.1:8069 weight=1 fail_timeout=0;
    }
    upstream odoo-im {
    server 127.0.0.1:8072 weight=1 fail_timeout=0;
    }

这是我的etc/hosts

127.0.0.1   localhost
127.0.1.1   shivam.sahu shivam

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.0.1 odoo.local # portal

127.0.0.1 s1.odoo.local # server

127.0.0.1 t1.odoo.local # template

127.0.0.1 t2.odoo.local # template

127.0.0.1 client-x.odoo.local

127.0.0.1 client-y.odoo.local

127.0.0.1 client-z.odoo.local

这是我的 Odoo 服务器文件etc/odoo.conf

[options]
dbfilter = ^%h$
xmlrpc_port = 8069
longpolling_port = 8072
db_name = False
db_user = odoo
db_password = False
db_host = False
db_port = 5432
logfile = /var/log/odoo/odoo-server.log

之后创建 2 个数据库odoo.locals1.odoo.local并安装在 saas 门户 * 和 saas 服务器中,我浏览链接www.odoo.local:8069/web/login以访问 odoo.local 数据库,然后,我遵循文档Odoo SaaS TooT Kit Doc

我希望这篇文章有助于为 Odoo v11 安装 Odoo Saas Toot 套件

谢谢你。

于 2019-03-08T08:01:53.400 回答