Thank you for the hint. But how can I debug and activate the SocketIO?
Symptom:
- raven doesn’t work real-time
- possibly related: On /app/backups, a requested backup does appear only after a long time (hours).
Confirming the socketIO problem:
On page /app/system-health-report I get:
Realtime (SocketIO)
SocketIO Ping Check
Fail
Trying to locate the error:
The websocket container listens:
$ sudo docker exec -it erpbv_websocket_1 bash
frappe@86d9b3c54936:~/frappe-bench$ ss -tulpan
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.11:33246 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.11:45063 0.0.0.0:*
tcp ESTAB 0 0 172.22.0.10:54962 172.22.0.4:6379 users:(("node",pid=1,fd=18))
tcp LISTEN 0 511 *:9000 *:* users:(("node",pid=1,fd=19))
I tried to make the frontend or the websocket container listen on port 9000 with a construct like
ports:
- "80:8080"
- "9000:9000"
in the compose.yml, which results in something like:
$ sudo docker ps | grep frontend
a58f79d7a820 erpnext-bv:v0.0.1 "nginx-entrypoint.sh" 2 hours ago Up 2 hours 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 0.0.0.0:80->8080/tcp, :::80->8080/tcp erpbv_fronten_1
but the “SocketIO Ping Check” on the “System Health Check” was still failing in both cases.
And the same port cannot be activated in both containers at the same time (because it’s an entry point from outside of the container zoo).
I’m not sure if it needs to be opened in the frontend at all because I found log entries from the frontend which are proxied to /socket.io/ in the websocket container at port 9000.
$ sudo docker logs erpbv_frontend_1 |grep socket.io
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF3j0H HTTP/1.1" 200 118 "http://bv-erpnext/app/system-health-report" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF3j0p&sid=tDXSF46xxeG0MqtPAAAA HTTP/1.1" 200 2 "http://bv-erpnext/app/system-health-report" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF3j0q&sid=tDXSF46xxeG0MqtPAAAA HTTP/1.1" 200 40 "http://bv-erpnext/app/system-health-report" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "GET /socket.io/?EIO=4&transport=websocket&sid=tDXSF46xxeG0MqtPAAAA HTTP/1.1" 101 10 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF3j1a&sid=tDXSF46xxeG0MqtPAAAA HTTP/1.1" 200 1 "http://bv-erpnext/app/system-health-report" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:41:14 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF3j1b&sid=tDXSF46xxeG0MqtPAAAA HTTP/1.1" 200 2 "http://bv-erpnext/app/system-health-report" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF5c1U HTTP/1.1" 200 118 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF5c2G&sid=pAtZqLr3RUysTBdwAAAC HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF5c2G.0&sid=pAtZqLr3RUysTBdwAAAC HTTP/1.1" 200 40 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF5c2d&sid=pAtZqLr3RUysTBdwAAAC HTTP/1.1" 200 1 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF5c2d.0&sid=pAtZqLr3RUysTBdwAAAC HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:10:49:30 +0000] "GET /socket.io/?EIO=4&transport=websocket&sid=pAtZqLr3RUysTBdwAAAC HTTP/1.1" 101 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF8Tuk HTTP/1.1" 200 118 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF8Tvy&sid=BASeFDRPVO8U7yF7AAAE HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF8Tv-&sid=BASeFDRPVO8U7yF7AAAE HTTP/1.1" 200 40 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF8TwR&sid=BASeFDRPVO8U7yF7AAAE HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF8TwQ&sid=BASeFDRPVO8U7yF7AAAE HTTP/1.1" 400 52 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:02:03 +0000] "GET /socket.io/?EIO=4&transport=websocket&sid=BASeFDRPVO8U7yF7AAAE HTTP/1.1" 101 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF9mPX HTTP/1.1" 200 118 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF9mQL&sid=skyX448jWJauUY4KAAAG HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF9mQM&sid=skyX448jWJauUY4KAAAG HTTP/1.1" 200 40 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "POST /socket.io/?EIO=4&transport=polling&t=PFF9mQj.0&sid=skyX448jWJauUY4KAAAG HTTP/1.1" 200 2 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "GET /socket.io/?EIO=4&transport=polling&t=PFF9mQj&sid=skyX448jWJauUY4KAAAG HTTP/1.1" 400 52 "http://bv-erpnext/app/backups" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
192.168.20.205 - - [16/Dec/2024:11:07:41 +0000] "GET /socket.io/?EIO=4&transport=websocket&sid=skyX448jWJauUY4KAAAG HTTP/1.1" 101 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
Some result in status 400, but many in 200. So the proxy is working (here: even with no port 9000 externally opened).
But the Health Check Ping still fails. Why? Does the ping check work correctly in containers? How can I test this?
At my current state of knowledge, I’m not sure how to debug this and hot to get the SocketIO to work. Any hints?