Frappe Raven chat - sent a message that was not shown immediately

Dear guys,

I am new to Raven.

I installed Frappe 15 and everything is good but I have a problem with immediately showing the enter a message, it’s not showing and I must close and open chat after that to show the message!

Maybe need config Webhook on frappe or other things?

Please help

Best Regards,

1 Like

My very first users also complain about this from day one.
But I’m not convinced it is that bad.

Advantage is: It doesn’t constitute an immediate interruption, because it has a PULL-aspect in the UI instead of being 100% PUSHy.

So it respects the user in a very “You decide when” way.

Still it would be nice to be able to configure feeding raven messages into the notifications bell or so, if the user wants it.

@the.shirini Is your realtime web socket connection working? Can you check the “System Health Report” in the desk interface to see if the socketIO ping check works?

@Peer Raven is meant to be real-time - but it needs socketIO to work on the site.

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?

@Peer Thanks guy, also I have the same problem but in stab-alone implementation without docker.

@nikkothari22 I did a lot of work but not resolved, I am familiar with Linux service implementation, and socket port and API calling working fine, but in system-health-report also have the same problem (Ping is Failed).

Please help me with your advice.

I am not familiar with Docker based deployments so not sure if the below would work for you, but you could try the following:

  1. Check the node version that was installed on your bench
  2. Check the status of supervisor - the node (socket) process should be running. Try restarting supervisor if that’s not the case
  3. Check the Nginx configuration to see if something is blocking web socket requests?

Also, can you open the browser console → go to the network tab → refresh the page → see if any of the web socket connection requests are failing? There should be multiple requests if it is though. You can do this on the Desk interface.

1 Like
2 Likes