如何在zookeeper中查看连接数(How to see number of connection in zookeeper)
我想看看在zookeeper运行中的连接数量,因为m正在运行百合,所以它给出异常但是想检查zookeeper中的连接数。
http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html
I want to see number of connection in zookeeper runing , as m running through lily , so it is giving exception but want to check number of connection in zookeeper.
http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html
原文:https://stackoverflow.com/questions/7727258
最满意答案
我担心Javascript无法知道协商的HTTP状态代码。
有定义的关闭代码 ,1006只意味着连接突然关闭,但协议甚至允许在不提供原因的情况下关闭连接。 它与readyState API一起是您诊断问题原因的唯一工具。
I am afraid there is no way from Javascript to know the HTTP status code of the negotiation.
There are defined closing codes, and 1006 only means that the connection is closed abruptly, but the protocol even allows to close the connection without providing a reason. That, together with the readyState API, are the only tools you have to diagnosed the reason of the problem.
相关问答
更多-
在WebLogic 12.2.1上测试http://showcase.omnifaces.org/push/socket时,我今天遇到了这个问题。 在Webapp的第一次测试尝试时,WebLogic在进行websocket连接时抛出以下异常: java.lang.IllegalStateException: The async-support is disabled on this request: weblogic.servlet.internal.ServletRequest Impl@6682044b ...
-
第200位用户会看到什么? 他会等待200秒,并看到通常的答复? 当然不是。 即使在HTTP示例中,服务器通常也可以同时处理一些请求。 可以同时回复的请求数量实际上取决于许多事情,特别是您的Web服务器(或应用程序服务器)配置。 由于每个请求通常需要一个线程,他们不会等待对方结束。 除非线程池中连接的线程太多,否则Web服务器必须等待回答并关闭一个线程,才能开始处理下一个请求。 只有websocket有一点区别。 与HTTP无状态并且连接在发送响应后关闭不同,Websockets保持活动状态以与服务器交互。 ...
-
我终于想通了。 它失败的原因是因为你需要把它放在URL中 WS://本地主机:8080 / GS-导的WebSocket I finally figured out. The reason it was failing it is because you need to put this in the URL ws://localhost:8080/gs-guide-websocket
-
如何从JavaScript客户端向Jetty WebSocket发送请求标头(How To Send Request Header To Jetty WebSocket From JavaScript Client)[2022-04-19]
不幸的是,你做不到。 标准WebSocket JavaScript API不提供自定义HTTP标头的方法。 另请参阅heroku dev中心的此文档 。 Unfortunately, you can't. The standard WebSocket JavaScript API does not provide means to customize HTTP headers. See also this document at heroku dev center. -
已发布Safari(桌面和移动)使用的hixie-76协议变体和Chrome等使用的RFC 6455的标准 。 您可以使用所请求的握手类型来决定客户端说话的协议版本,消息读取中将存在哪些框架以及在消息写入时应使用哪种框架。 There are published standards for both the hixie-76 protocol variant used by Safari (desktop & mobile) and RFC 6455 used by Chrome and others. Y ...
-
您似乎缺少协议的挑战 - 响应方面 - 客户端发送两个额外的标头和一些随机数据: GET /demo HTTP/1.1 Host: example.com Connection: Upgrade Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 Sec-WebSocket-Protocol: sample Upgrade: WebSocket Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Origin: http://example.com ...
-
您正在收到CONNECT请求,因为您可能已将浏览器配置为使用代理。 如果您指示浏览器在本地IP地址上使用端口8080,它将假定存在代理,这意味着当您要求安全连接时,浏览器会引导CONNECT。 您需要为服务器添加对SSL / TLS隧道的支持才能解决此问题。 You are getting CONNECT requests because you are likely to have configured your browser to use a proxy. If you directed your b ...
-
在Javascript客户端中处理不成功的websocket升级请求(Handling unsuccessful websocket upgrade requests in Javascript Client)[2023-03-28]
我担心Javascript无法知道协商的HTTP状态代码。 有定义的关闭代码 ,1006只意味着连接突然关闭,但协议甚至允许在不提供原因的情况下关闭连接。 它与readyState API一起是您诊断问题原因的唯一工具。 I am afraid there is no way from Javascript to know the HTTP status code of the negotiation. There are defined closing codes, and 1006 only means ... -
INVALID_STATE_ERR:DOM异常11表示您的websocket尚未处于就绪状态。 你可以通过socket.readyState来检查websocket对象的状态,你可以在socket.readyState == 1时发送消息 我通过使用超时为此创建了一个转变 timerId = setInterval(sendDataWhenReady, 1000); function sendDataWhenReady(){ if(socket.readyState == 1){ ws.send ...
-
1)当你通过套接字发送消息时,你不知道它将被分成多少块。 它可能全部立即发送; 或者可以发送前三个字母,然后是该消息的其余部分; 或者该消息可能会被分成10个部分。 2)给定1)服务器应该如何知道它何时收到客户端发送的所有块? 例如,假设服务器收到客户端消息的1个块。 服务器如何知道这是否是整个消息或者是否还有9个块? 3)我建议你阅读这个: http://docs.python.org/2/howto/sockets.html (加上评论中的链接) 4)现在,为什么不使用python来创建HTTP服务器? ...