I am trying to connect to my rocket-chat server by Java Stomp Websocket client. but at the begining, after receiveing "o" and "server_id : 0", I receive "msg: error, reason: Bad request" from server.
Would you please help me on this issue?
Related
I believe I understood http client connection timeout vs server request timeout and this SO answer did a pretty good job in explaining same.
However what I couldn't found anywhere is what happens to http request received by server but client timed out. Basically what http status code I should be logging for such requests ?
I have a question about websocket and asp.net core.
I build my application with this tutorial ( Link ) , it works on my local host : 'ws://localhost:1602/ws' and on server when I open webpage from remote desktop on server.
but when I open webpage with Url from my computer it show me this error :
WebSocket connection to 'ws://subdomain.domain.com/ws' failed: Error during WebSocket handshake: Incorrect 'Sec-WebSocket-Accept' header value.
I mean when i open webpage on domainit fails.
I added WebSocket on server but error still remains.
thank you for your help.
It could be due a proxy issue. That is exactly the mission of Sec-WebSocket-Accept header, to prevent giving the connection as opened when the response is a cached one from a proxy, since only the real WebSocket server will know how to create that header right.
Switch to HTTPS and WSS and the problem will probably go away, since proxies cannot cache secure connections.
How HTML5 Web Sockets Interact With Proxy Servers
I am using camel to build a tcp server. I am waiting for connections and responding to clients messages using the following route
<camel:route id="ServerListeningRoute">
<camel:from ref="tcpServerEndPoint" />
<camel:setBody>
<camel:simple>Server Received from you: ${body}</camel:simple>
</camel:setBody>
</camel:route>
It is working. I can connect to the server with telnet, sent a message and get back the response from the server.
Now i want to create a new route to send messages from my server to those connected clients but reusing the socket connection already established. I am not responding to a message previously sent by a client. These would be new Exchanges started from my server.
I have tried this
<camel:route id="ServerSendingRoute">
<camel:from uri="timer://foo?fixedRate=true&period=60s?amp;delay=25s" />
<camel:setBody>
<camel:simple>This is a message from the server</camel:simple>
</camel:setBody>
<camel:to ref="tcpServerEndPoint" />
</camel:route>
But it is not working. The server is receiving its own produced messages since the to endpoint is opening a client connection to the server.
Is it possible with Netty and Camel to reuse the established connection? Do i need to extent the netty component somehow? Any workaround you can think of?
today i used bitvise tunnelier for tunneling and i set the listening proxy in mozilla. but unlucky tunnelier didn't rcognize the proxy protocol. here the output.
19:45:17.893 Initializing SOCKS / HTTP CONNECT proxy on 127.0.0.1:1080 succeeded.
19:46:02.266 (unrecognized proxy protocol) connection from 127.0.0.1:60300 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:03.991 (unrecognized proxy protocol) connection from 127.0.0.1:60301 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:05.803 (unrecognized proxy protocol) connection from 127.0.0.1:60302 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:27.439 (unrecognized proxy protocol) connection from 127.0.0.1:60303 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:28.280 (unrecognized proxy protocol) connection from 127.0.0.1:60304 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:50.534 (unrecognized proxy protocol) connection from 127.0.0.1:60305 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:46:50.578 (unrecognized proxy protocol) connection from 127.0.0.1:60306 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
19:47:21.361 (unrecognized proxy protocol) connection from 127.0.0.1:60307 failed: Unsupported client protocol; the client may be expecting a regular HTTP proxy.
I didn't know whats wrong with this. So i decided to install Proxifier aaaand BINGO!! it worked!!. here the output after using proxifier:
19:51:26.433 Accepted HTTP CONNECT connection from 127.0.0.1:60598 to 173.194.38.140:80.
19:51:26.434 Accepted HTTP CONNECT connection from 127.0.0.1:60601 to 173.194.38.140:80.
19:51:26.434 Accepted HTTP CONNECT connection from 127.0.0.1:60604 to 173.194.38.139:80.
19:51:26.434 Accepted HTTP CONNECT connection from 127.0.0.1:60607 to 173.194.38.139:80.
19:51:26.435 Accepted HTTP CONNECT connection from 127.0.0.1:60610 to 173.194.38.139:80.
19:51:26.435 Accepted HTTP CONNECT connection from 127.0.0.1:60613 to 173.194.38.140:80.
19:51:26.435 Accepted HTTP CONNECT connection from 127.0.0.1:60616 to 173.194.38.140:80.
19:51:26.435 Accepted HTTP CONNECT connection from 127.0.0.1:60619 to 173.194.38.140:80.
19:51:26.435 Accepted HTTP CONNECT connection from 127.0.0.1:60622 to 173.194.38.140:80.
19:51:26.436 Accepted HTTP CONNECT connection from 127.0.0.1:60625 to 173.194.38.140:80.
19:51:26.436 Accepted HTTP CONNECT connection from 127.0.0.1:60628 to 173.194.38.140:80.
19:51:26.436 Accepted HTTP CONNECT connection from 127.0.0.1:60631 to 74.125.235.15:80.
19:51:26.436 Accepted HTTP CONNECT connection from 127.0.0.1:60634 to 74.125.235.15:80.
19:51:48.413 Closing HTTP CONNECT connection from 127.0.0.1:60328, sent: 1060, received: 3609.
And in the other case, few days ago i used privoxy with Mozilla. but unfortunately the ip i used blocking facebook page. So i decided to use proxifier again to chain with privoxy.. aaaand bingo again.. it worked!!!
So guys, do you know what is really happened in Proxifier?. for some reason i need to use this feature in my Ubuntu desktop :) . please tell me if you know something about this :)
Ok guys thanks for helping me, but i have found the answer bymyself :p.. okay, it's called proxy chaining, the proxyfier make 2 output from one input (imho). first output is dirctly to proxy that we set to proxifier and the second output is from dns that set in the proxifier. so those two make diffrent way of the output.
firefox >> proxifier >>> 1. to dns server >> internet
2. to proxyserver we set >> internet
here example of my case:
i use privoxy to add header host on http connection, but unfortunately it would make bad request because there are 2 hosts in one request.
firefox >> privoxy(with two hosts header) === bad request
so you need something to resolve the problem. yes right it is a proxychaining app with dns support.
firefox >> proxifier >> privoxy(with two hosts header) === good request :)
So you need something app with dns support for chaining with dns server to resolve the bad request..
if you found my opinion is wrong please correct me, because it is just my humble opinion :)
When I tried to request the data across the internet through a web service I received an error as:
Error: The request failed with HTTP status 504: Gateway Time-out.
Can anyone please give an insight about this error, and a solution too? Thanks in advance.
There is some proxy (reverse proxy, HTTP server with FastCGI or something similar) in the way, which timeouted when getting request from the server.