为什么我会收到“内部服务器错误"消息?运行两个Odoo实例(相同的域,但不同的端口)? [英] Why am I getting "Internal Server Error" running two Odoo instances (same domain but different ports)?

查看:474
本文介绍了为什么我会收到“内部服务器错误"消息?运行两个Odoo实例(相同的域,但不同的端口)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在云中的服务器上有两个Odoo实例.如果执行以下步骤,则会收到内部服务器错误":

I have two instances of Odoo in a server in the cloud. If I make the following steps I get "Internal Server Error":

  1. 我在第一个实例(http://111.222.33.44:3333)中进行登录
  2. 我关闭会议
  3. 我在同一浏览器(http://111.222.33.44:4444)中加载了第二个实例的地址
  1. I make login in the first instance (http://111.222.33.44:3333)
  2. I close the session
  3. I load the address of the second instance in the same browser (http://111.222.33.44:4444)

如果要在第二个实例(在另一个端口)中工作,则需要先删除浏览器cookie才能访问另一个Odoo实例.如果这样做,一切正常.

If I want to work in the second instance (in another port), I need to remove the browser cookies first to acces to the other Odoo instance. If do this everything works fine.

如果我同时将它们加载到不同的浏览器(Firefox和Chromium)中,它们也可以正常工作.

If I load them in differents browsers (Firefox and Chromium) at the same time, they work well as well.

这不是NginX的问题,因为我尝试了是否使用它.

It's not a NginX issue because I tried with and without it.

是否有永久解决此问题的方法?这是预期的行为吗?

Is there a way to solve this permanently? Is this the expected behaviour?

推荐答案

最后,我认为这是预期的行为.所有网站的Cookie都是专门为Web浏览器中的每个网站(每个域)存储的.因此,如果我仅更改端口,则第一个实例的cookie与另一个实例的cookie会发生冲突,因为它们具有相同的域(在我的示例中为111.222.33.44).

Finally I think this is the expected behaviour. The cookies of all websites are stored specifically for each website (for each domain) in the web browser. So if I only change the port the cookies of the first instance are in conflict with the cookies of the other instance because the have the same domain (111.222.33.44 in my example).

因此,有一些解决方法:

So there are some workarounds:

/etc/hosts的笔记本电脑中创建几个域名:

Creating a couple of domain name in my laptop in /etc/hosts:

111.222.33.44  cloud01
111.222.33.44  cloud02

然后,这些cookie不再相互干扰.访问每个实例

Then the cookies don't interfere with each other anymore. To access to each instance

http://cloud01:3333
http://cloud02:4444

浏览器扩展.多帐户或多帐户

还有另一种解决方法.如果我使用这种铬延伸剂,则该问题消失了,因为会话被单独处理了:

Broswer Extension. Multilogin or Multiaccount

There is another workaround. If I use this chromium extension the problem disappears because the sessions are treated separately:

这篇关于为什么我会收到“内部服务器错误"消息?运行两个Odoo实例(相同的域,但不同的端口)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆