[Error] frappe.publish_realtime is fail

One of my site can access the socket.io url successfully
https://mydomain.com/socket.io/?EIO=4&transport=polling&t=O-hIIv4
with result like
0{“sid”:“uKW2tiPMoqMNWF-WAAAo”,“upgrades”:[“websocket”],“pingInterval”:25000,“pingTimeout”:20000,“maxPayload”:1000000}

However, I do not receive any message print when I do the socketio test in bench console with below code
frappe.publish_realtime(event=‘msgprint’, message=‘Hello Socketio’, user=‘Administrator’)

I do the same installation step in other server, it work totally. I will get a message print when I ran the testing code in bench console. Is there any port I should open in the failed server.

Thank you for your kind advice and help in advanced.