通常,在开发模式下,应用程序重新启动后,我可能会遇到以下警告(WARN):
WARN 14936 --- [nio-8080-exec-6] c.v.f.s.c.UidlRequestHandler : Invalid security key received from 0:0:0:0:0:0:0:1
然后重新同步:
WARN 14936 --- [nio-8080-exec-4] c.v.f.s.communication.ServerRpcHandler : Resynchronizing UI by client's request. A network message was lost before reaching the client and the client is reloading the full UI state. This typically happens because of a bad network connection with packet loss or because of some part of the network infrastructure (load balancer, proxy) terminating a push (websocket or long-polling) connection. If you are using push with a proxy, make sure the push timeout is set to be smaller than the proxy connection timeout
我怀疑此重新同步以某种方式与
Invalid security key received
警告有关。
您能否在 Vaadin 内部背景下解释一下此警告的含义?此外,我应该从哪里开始调试过程来确定此问题的根本原因?谢谢你。
网络浏览器中的每个 Vaadin 实例都有一个唯一的安全密钥/标识符。 该密钥随每个请求一起发送到服务器。
服务器然后验证该安全密钥是否已知且有效。 如果是,操作将照常进行。
但是,当请求无法与有效的 ui 服务器实例匹配时,此警告将记录在服务器端。 然后服务器端发送命令来重建/同步客户端 ui 实例与服务器实例。这样客户端 UI 就再次有效了
当服务器+客户端会话不匹配、许多数据包丢失等时,可能会发生这种情况