Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refuses handshake #2

Open
rajendrabohra opened this issue Jul 24, 2014 · 8 comments
Open

refuses handshake #2

rajendrabohra opened this issue Jul 24, 2014 · 8 comments

Comments

@rajendrabohra
Copy link

Hello,
I am trying to implement android client using this example. I have replaced the "ws://websockethost:8080" with my chat server url, But I am getting
07-24 12:28:06.208: I/Websocket(18294): Closed draft org.java_websocket.drafts.Draft_10@42e49300 refuses handshake
error.

My chat server url is working fine with browser client.
Please help.

@jas7553
Copy link

jas7553 commented Nov 15, 2014

Same here. Out-of-the-box, I see:
WebSocket connection to 'ws://localhost:8080/' failed: Connection closed before receiving a handshake response client.js:2

And the corresponding source code line:
ws = new WebSocket("ws://" + location.hostname + ":8080/");

Interestingly enough, this problem presents itself in Chrome (38.0.2125.122), but not in Firefox (33.0).

@fkaking
Copy link

fkaking commented Dec 18, 2015

same problem,just the same code and i connected to my own websocket server which is fine

@warjiang
Copy link

i have the same problem

@prakashkolandaivelu
Copy link

I got - refuses handshake Draft 17 , false - then changed the code as below:
SSLContext sslContext = null;
try {
sslContext = SSLContext.getDefault();
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext));

Draft_17.
I get : closed connection -1 , , true.
Any help here. This happens during socket creation. I know this very old thread. But now i am in this stage only.

@milano95a
Copy link

same problem org.java_websocket.drafts.Draft_10@420581d8 refuses handshake

@Vamsi7591
Copy link

I have the same issue
CHAT: Closed draft org.java_websocket.drafts.Draft_6455@a52e28e refuses handshake

Thanks in advance,
Vamsi

@ghost
Copy link

ghost commented Nov 3, 2017

Even I have same issues
draft org.java_websocket.drafts.Draft_10@2fdc18cd refuses handshake

@jcken
Copy link

jcken commented Aug 14, 2019

i have the same problem,hao to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants