-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odoo17 on ubuntu 22.04 error #408
Comments
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] And my nginx file config #odoo server http -> httpsserver { server { SSL parametersssl_certificate /etc/ssl/certificate.crt; logaccess_log /var/log/nginx/subdomain1.access.log; Redirect requests to odoo backend serverlocation / { Redirect websocket requests to odoo gevent portlocation /websocket { common gzipgzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript; |
Try without both of these in your odoo config
I am using only |
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. |
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 |
No, both containers have distinc bind ports |
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-boxer<https://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 GitHub<#408 (comment)>, or unsubscribe<https://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:
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:
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 Resetei elas e voltou a funcionar |
I have the solution for docker-compose, docker swarm, if you want this I can send you, but I have the issue now on kubernetes. |
hi @ale900522, of course pls can you send me to my email or post the docker-compose to fix that problem? |
With this compose and odoo.con worker>0 and enable gevent_port=8072 comment
longpolling_port.
version: "3.9"
services:
odoo:
image: ${IMAGE_APP}:${IMAGE_TAG}
networks:
- traefik-swarm
- databases-swarm
volumes:
- data:/var/lib/odoo
- conf:/etc/odoo
- addons:/mnt/extra-addons
deploy:
labels:
# # global config
- "traefik.enable=true"
- "traefik.docker.network=traefik-swarm"
# # main routers 8069 web rule "/*"
- "traefik.http.routers.${NAME_SERVICE_TRAEFIK}.tls=true"
- "traefik.http.routers.${NAME_SERVICE_TRAEFIK}.entrypoints=https"
-
"traefik.http.routers.${NAME_SERVICE_TRAEFIK}.tls.certresolver=myresolver"
-
"traefik.http.routers.${NAME_SERVICE_TRAEFIK}.rule=Host(`${URL_DEPLOY}`)"
## || Host(`${URL_SUBDOMAIN_DEPLOY}`)"
-
***@***.***
"
- "traefik.http.routers.${NAME_SERVICE_TRAEFIK}.middlewares=gzip"
-
"traefik.http.services.${NAME_SERVICE_TRAEFIK}.loadbalancer.server.port=8069"
# # main routers 8072 websocket rule "/websocket"
- "traefik.http.routers.backend-websock.tls=true"
- "traefik.http.routers.backend-websock.entrypoints=https"
- "traefik.http.routers.backend-websock.tls.certresolver=myresolver"
- "traefik.http.routers.backend-websock.rule=Path(`/websocket`) &&
Host(`${URL_DEPLOY}`)"
-
"traefik.http.routers.backend-websock.middlewares=upgradeheader,sslheader,gzip"
-
***@***.***"
-
"traefik.http.services.backend-websock.loadbalancer.server.port=8072"
#middleware database restrict study and fix#
# - "traefik.http.routers.databases-access.tls=true"
# - "traefik.http.routers.databases-access.entrypoints=https"
# -
"traefik.http.routers.databases-access.tls.certresolver=myresolver"
# -
"traefik.http.routers.databases-access.rule=Path(`/web/database`) &&
Host(`${URL_DEPLOY}`)"
# -
***@***.***"
# - "traefik.http.routers.databases-access.middlewares=gzip"
# -
"traefik.http.services.databases-access.loadbalancer.server.port=8069"
# - "traefik.http.middlewares.allow_only.ipallowlist.sourceRange=
5.5.5.5/32"
# - "traefik.http.routers.databases-access.middlewares=allow_only"
#middleware database restrict#
# # upgrade headers
-
"traefik.http.middlewares.upgradeheader.headers.customRequestHeaders.Upgrade=websocket"
-
"traefik.http.middlewares.upgradeheader.headers.customRequestHeaders.Connection=upgrade"
-
"traefik.http.middlewares.upgradeheader.headers.hostsproxyheaders=websocket,Upgrade"
-
"traefik.http.middlewares.upgradeheader.headers.forcestsheader=true"
-
"traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
# # gzip compress
- "traefik.http.middlewares.gzip.compress=true"
placement:
constraints: [node.role == worker]
volumes:
data:
external: true
conf:
external: true
addons:
external: true
networks:
traefik-swarm:
external: true
databases-swarm:
external: true
El vie, 4 oct 2024 a las 16:58, czambrano1997 ***@***.***>)
escribió:
… hi @ale900522 <https://github.com/ale900522>, of course pls can you send
me to my email or post the docker-compose to fix that problem?
—
Reply to this email directly, view it on GitHub
<#408 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APTCHNXKDDBYSVIAOUNMCUTZZ2UIHAVCNFSM6AAAAABCI5DQF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJTHEYDIMRVGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi But still getting the same error. socket = request.httprequest._HTTPRequest__environ['socket'] RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)? Any solution? |
Yes Of course I have the solution for docker-swarm with docker-compose and
kibernetes with ingressroute all solution is using traefik.
El El mié, 23 oct 2024 a las 9:35, nihal-infiniarc ***@***.***>
escribió:
… Hi
I am facing the same issue.
Previously i was using odoo15 with complete worker configuration.
But now i migrated the V15 to V17 on same server.
I have stopped the odoo15 service as well.
Also I checked the 8072 port (which is listening to python3.10 (for
odoo17)).
But still getting the same error.
socket = request.httprequest._HTTPRequest__environ['socket']
KeyError: 'socket'
RuntimeError: Couldn't bind the websocket. Is the connection opened on the
evented port (8072)?
Any solution?
—
Reply to this email directly, view it on GitHub
<#408 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APTCHNRUQJRQWKYHKY2VVR3Z45GSVAVCNFSM6AAAAABCI5DQF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZRGE2TGNBTGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
anyone have solution? |
Remember in odoo.conf: gevent_port:8072 longpulling: disable http_port: 8069 I use this compose for my deployment in docker-swarm cluster and solve websocket error connection. |
I'm using kubernetes deploy and istio for gateway but when have request /websocket?version=17.0-1 HTTP/1.1, throw error: RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)? |
Ohh my friend for kubernetes the solution its different but the logic is same. I use traefikCRD like ingresscontroller and you need create ingressroute with this configuration, if you use only traefik for kubernetes with ingress class only adapt the ingressroute for ingress: I create two ingressroute one for https and one for websocket I send my solutions:
and you need create middleware:
|
`
apiVersion: networking.istio.io/v1alpha3
` |
Look odoo services not resolve websocket from internet odoo resolve this port internal, then your main endpoint always is port 8069 and target port for http://example.com/websocket is 8072 but your main endpoint is 8069 odoo internal do the redirection job. |
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.
The text was updated successfully, but these errors were encountered: