InstallScript
InstallScript copied to clipboard
Odoo17 on ubuntu 22.04 error
I have installed odoo17 community version using this script. Odoo seems to be working fine with "demo" data.. I only added a purchased app from the odoo app site called "odoo_import_image_url" which resulted in getting this error: UncaughtClientError > TypeError Uncaught Javascript Error > undefined is not an object (evaluating 'browser.navigator.clipboard.writeText') UncaughtClientError > TypeError Uncaught Javascript Error > undefined is not an object (evaluating 'browser.navigator.clipboard.writeText')
After restarting and trying to add a product url images odoo hangs for a while and shows this in the log file:
2024-01-24 14:50:13,613 607 ERROR tester odoo.http: Exception during request handling. Traceback (most recent call last): File "/odoo/odoo-server/addons/bus/websocket.py", line 836, in open_connection socket = request.httprequest.environ['socket'] KeyError: 'socket'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/odoo/odoo-server/odoo/http.py", line 2150, in call response = request._serve_db() File "/odoo/odoo-server/odoo/http.py", line 1722, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/odoo/odoo-server/odoo/service/model.py", line 133, in retrying result = func() File "/odoo/odoo-server/odoo/http.py", line 1749, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/odoo/odoo-server/odoo/http.py", line 1866, in dispatch return self.request.registry['ir.http']._dispatch(endpoint) File "/odoo/odoo-server/addons/website/models/ir_http.py", line 235, in _dispatch response = super()._dispatch(endpoint) File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 222, in _dispatch result = endpoint(**request.params) File "/odoo/odoo-server/odoo/http.py", line 722, in route_wrapper result = endpoint(self, *args, **params_ok) File "/odoo/odoo-server/addons/bus/controllers/websocket.py", line 18, in websocket return WebsocketConnectionHandler.open_connection(request) File "/odoo/odoo-server/addons/bus/websocket.py", line 848, in open_connection raise RuntimeError( RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)?
The supplier of the app file assures me that this is a odoo installation error and not an error in their app. I am not technical and have no way of solving this issue and need help.
Are you running Odoo through NGINX Proxy, and have you tuned the config file so that it correctly uses Workers to enable gevent functions.
You can see more about this here https://www.odoo.com/documentation/17.0/administration/install/deploy.html#id8
@the-boxer i have the same issue, maybe do you have the solution to fix that?
@czambrano1997 post your NGINX server block and your odoo-server.conf file contents here (make sure to remove any passwords or private address info.
Odoo.conf
[options] ; This is the password that allows database operations: admin_passwd = ****** csv_internal_sep = , data_dir = /var/lib/odoo db_host = serverhost db_port = 5432 db_user = odoo db_password = odoo db_name = False addons_path = /mnt/oca-addons/.... http_port = 8069 logfile = /var/log/odoo/odoo.log list_db = True xmlrpc_port = 8069 #xmlrpc_interface = 0.0.0.0 gevent_port = 8072 #http_enable = True proxy_mode = True workers = 4 limit_memory_soft = 2147483648 limit_memory_hard = 4294967296 limit_request = 8192 limit_time_cpu = 600 limit_time_real = 1200 max_cron_threads = 1
And my nginx file config
#odoo server upstream odoo { server 127.0.0.1:8066 weight=1 fail_timeout=300s; } upstream odoochat { server 127.0.0.1:8077 weight=1 fail_timeout=300s; } map $http_upgrade $connection_upgrade { default upgrade; '' close; }
http -> https
server { listen 80; server_name subdomain1.domain.com; rewrite ^(.*) https://$host$1 permanent; }
server { listen 443 ssl; server_name subdomain1.domain.com; proxy_read_timeout 720s; proxy_connect_timeout 720s; proxy_send_timeout 720s;
SSL parameters
ssl_certificate /etc/ssl/certificate.crt; ssl_certificate_key /etc/ssl/certificate.key; ssl_session_timeout 30m; ssl_protocols TLSv1.2; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off;
log
access_log /var/log/nginx/subdomain1.access.log; error_log /var/log/nginx/subdomain1.error.log;
Redirect requests to odoo backend server
location / { # proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; proxy_pass http://odoo; }
Redirect websocket requests to odoo gevent port
location /websocket { proxy_redirect off; proxy_pass http://odoochat; }
common gzip
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript; gzip on; }
Try without both of these in your odoo config
http_port = 8069
xmlrpc_port = 8069
I am using only http_port = 8069
and the rest of my stuff looks similar to yours.
I enable http_port = 8069
But the is same result => RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)?
Maybe the problem is located about i have configure 2 odoo instances with docker. The first intance (odoo v15) configure has enable proxy_mode = True and don't have any error But the second intances (odoo v17) is which has the problem about websocket
Do you have the two instances on docker listening to the same outside ports. If one has already claimed 8072>8072 then you have to build the other docker container to listen to different outside ports, IE
8169>8069 for http 8172>8072 for gevent
No, both containers have distinc bind ports Odoo 1 (v15) => 8069:8069 8072:8072 - nginx file has /longpolling Odoo 2 (v17) => 8066:8069 8077:8072 - nginx file has /websocket
As far as I know the issue was never solved. At the time I found a website with information to install odoo 17 on Debian. This worked straight off the bat. Recently I found several install tutorials for Ubuntu 22 and even 24 that work without any problems.
Good luck Regards Boxer
From: czambrano1997 @.> Date: Wednesday, 1 May 2024 at 18:33 To: Yenthe666/InstallScript @.> Cc: the boxer @.>, Mention @.> Subject: Re: [Yenthe666/InstallScript] Odoo17 on ubuntu 22.04 error (Issue #408)
@the-boxerhttps://github.com/the-boxer i have the same issue, maybe do you have the solution to fix that?
— Reply to this email directly, view it on GitHubhttps://github.com/Yenthe666/InstallScript/issues/408#issuecomment-2088733000, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIQC43YATYLMMJMO67W6XF3ZAEKMJAVCNFSM6AAAAABCI5DQF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYG4ZTGMBQGA. You are receiving this because you were mentioned.Message ID: @.***>
In my case problem with web socket appeared in next case:
- I have removed the module (in a hard way). I just remove the folder with source code, and than restart the Odoo17. Module was still present in Odoo17.
- I have added next settings. limit_memory_hard = 20132659200 limit_memory_soft = 1677721600 limit_request = 8192 limit_time_cpu = 3600 limt_time_real = 7200 limit_time_real_cron = -1 max_cron_threads = 1 workers = 25
to fix this warning: Skipping database because of modules to install/upgrade/remove,
as a result I have seen the web socket problem.
Solution was:
-
Remove the settings, maybe I can keep some of them, but It is not the case for me, I have removed everyting. limit_memory_hard = 20132659200 limit_memory_soft = 1677721600 limit_request = 8192 limit_time_cpu = 3600 limt_time_real = 7200 limit_time_real_cron = -1 max_cron_threads = 1 workers = 25
-
and I have removed broken module from Odoo: Changed view to list , select the module, choose the Actions and hit delete. After that I don't see problem with websocket.
But I am doing it on my MacBook, not on Linux.
Aqui o erro também estava dando por causa das configurações de:
limit_memory_hard = 20132659200 limit_memory_soft = 1677721600 limit_request = 8192 limit_time_cpu = 3600 limt_time_real = 7200 limit_time_real_cron = -1 max_cron_threads = 1 workers = 25
Resetei elas e voltou a funcionar