Odoo Help

1

[Odoo v8] How to configure odoo v8 with workers and apache reverse proxy ?

By
Anas ea
on 12/29/15, 11:14 AM 2,716 views

I want to run odoo behind an apache proxy server in multi process mode.

odoo server and the apache are on separate virtual machines


This is my relevant odoo-server config 

workers =4

xmlrpc_port = 8069

longpolling_port = 8072

proxy_mode = 1


In proxy-server I have these in the config file to serve odoo over https (I use mode_rewrite to redirect http to https):

ServerName odoo-server-name

ProxyRequests Off

ProxyPreserveHost On

ProxyPass /longpolling/ http://odoo-server-ip:8072/longpolling/

ProxyPassReverse /longpolling/ http://odoo-server-i:8072/longpolling/

ProxyPass / http://odooserver-ip:8069/

ProxyPassReverse / http://odoo-server-i:8069/

 

Now odoo works fine except for im_chat it is unresponsive (No Ajax) and only works if you refresh the page, in addition I guess this recurring error in the odoo log. I can't figure out what call poll via http

ERROR testfp openerp.http: <function poll at 0x3a9bd70>, /longpolling/poll: Function declared as capable of handling request of type 'json' but called with a request of type 'http'


In apache access log:

"POST /longpolling/poll HTTP/1.1" 301 255  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"

"GET /longpolling/poll HTTP/1.1" 400 275  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"

notice the 400 code in the GET

And there is nothing relevant in the apache access error log


Things I have tried:
- Selinux permissive mode

- Installed psycogreen==1.0

- adding :

    xmlrpc_interface = 127.0.0.1     
    netrpc_interface = 127.0.0.1
         results in service unavailable error




Any help would be appreciated

1
Stephen Levenhagen
On 12/30/15, 1:13 PM

I Had exactly the same problem,  but chat work fine not using poxy.

I found after much trial an error if I placed the longpolling proxies after the xmlrpc ports in my virtual host it works,


also I did not include /longpolling/ after the server address.



<VirtualHost *:80>

ServerName myserver.com

<Proxy *>

Order deny,allow

Allow from all

</Proxy>

ProxyPreserveHost off

ProxyPass / http://127.0.0.1:8900/

ProxyPassReverse / http://127.0.0.1:8900/

ProxyPass /longpolling/ http://127.0.0.1:8901/

ProxyPassReverse /longpolling/ http://127.0.0.1:8901/


</VirtualHost>

thank you for your answer this got rid of that error but I got the classic error raise Exception("bus.Bus unavailable") Only thing that made it go away was to use the xmlrpc_interface = 127.0.0.1 and netrpc_interface = 127.0.0.1 and have the nginx/apache in the same server as odoo

Anas ea
on 1/5/16, 6:45 AM
0
Anas ea
On 1/5/16, 6:50 AM

managed to get rid of the error by:

  • changing the order in the proxy configuration as Stephen Levenhagen mesntioned

  • Have the proxy in the same machine as odoo server

  • put xmlrpc_interface and netrpc_interface to 127.0.0.1


    There are no errors now in the odoo log, But Chat is still unresponsive (no AJAX behaviour)

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 12/29/15, 11:14 AM
Seen: 2716 times
Last updated: 3/7/16, 7:12 AM