Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

solved: Re: huge amount of: raise Exception("bus.Bus unavailable")

by
robert
- 19/08/2020 18:53:37

I found the reason:


I did not really use the long polling "nginx-server".

Maybe the lets encript setup process removed that part. ??

What I did, I added:

    # Redirect longpoll requests to odoo longpolling port
    location /longpolling {
        proxy_pass http://odoochat_client_x;
    }

thanks for listening

robert

On 19.08.20 18:22, robert@redo2oo.ch wrote:
Hi there

I am running odoo in a docker container behingd an nginx http-server
now I get millions of exception in the log that the bus is not available.
I realy would like to find a solution for this, as this renders the log 
unusable.

in the odoo config I declare the longpolling port to be 8072:

longpolling_port = 8072

in the container I map port 8072 to 19100

             "Ports": {
                 "8069/tcp": [
                     {
                         "HostIp": "127.0.0.1",
                         "HostPort": "9100"
                     }
                 ],
                 "8072/tcp": [
                     {
                         "HostIp": "127.0.0.1",
                         "HostPort": "19100"
                     }
                 ]
             },


the NGINX  conf:

#
# client_x
# -------------------
# _robert_

#odoo server
upstream odoo_client_x {
     server 127.0.0.1:9100;
}
upstream odoochat_client_x {
     server 127.0.0.1:19100;
}
# start with http server, certbot will add https
server {
   server_name   13.client.ch;
   access_log    /var/log/nginx/13.client_x.ch.access.log combined;
   error_log     /var/log/nginx/13.client_x.ch.error.log;
   location / {
     proxy_pass http://odoo_client_x;
   }

     listen [::]:443 ssl ipv6only=on; # managed by Certbot
     listen 443 ssl; # managed by Certbot
     ssl_certificate /etc/letsencrypt/live/13.client_x.ch/fullchain.pem; 
# managed by Certbot
     ssl_certificate_key 
/etc/letsencrypt/live/13.client_x.ch/privkey.pem; # managed by Certbot
     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
     if ($host = 13.client_x.ch) {
         return 301 https://$host$request_uri;
     } # managed by Certbot
   listen 80;
   listen [::]:80;
   server_name   13.client_x.ch;
     return 404; # managed by Certbot
}

thanks for any help
robert


Traceback (most recent call last):
   File "/odoo/src/odoo/http.py", line 624, in _handle_exception
     return super(JsonRequest, self)._handle_exception(exception)
   File "/odoo/src/odoo/http.py", line 310, in _handle_exception
     raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
   File "/odoo/src/odoo/tools/pycompat.py", line 14, in reraise
     raise value
   File "/odoo/src/odoo/http.py", line 669, in dispatch
     result = self._call_function(**self.params)
   File "/odoo/src/odoo/http.py", line 350, in _call_function
     return checked_call(self.db, *args, **kwargs)
   File "/odoo/src/odoo/service/model.py", line 94, in wrapper
     return f(dbname, *args, **kwargs)
   File "/odoo/src/odoo/http.py", line 339, in checked_call
     result = self.endpoint(*a, **kw)
   File "/odoo/src/odoo/http.py", line 915, in __call__
     return self.method(*args, **kw)
   File "/odoo/src/odoo/http.py", line 515, in response_wrap
     response = f(*args, **kw)
   File "/odoo/src/addons/bus/controllers/main.py", line 35, in poll
     raise Exception("bus.Bus unavailable")
Exception: bus.Bus unavailable
2020-08-19 15:24:18,405 71 INFO client_x werkzeug: 172.17.0.1 - - 
[19/Aug/2020 15:24:18] "POST /longpolling/poll HTTP/1.0" 200 - 1 0.000 0.004


_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference