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

Connection Timeout when send message #12

Open
TaimurTTS opened this issue Jan 13, 2018 · 5 comments
Open

Connection Timeout when send message #12

TaimurTTS opened this issue Jan 13, 2018 · 5 comments

Comments

@TaimurTTS
Copy link

TaimurTTS commented Jan 13, 2018

Hi,
First of all thank you for this great work.
I have ran your code and it worked fine. I decided to websocket for my auction site.
I copied your thirdparty folder and connection2.js. I changed constant.php
I also ran server.php by going into directory
and running it from command shell by entering => php server.php
Everytime I try to send a message saying:

Connection2.js:7 WebSocket connection to 'ws://192.168.0.104:2000/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

Can you please take a look and tell me what am i doing wrong.

@TaimurTTS TaimurTTS reopened this Jan 21, 2018
@TaimurTTS
Copy link
Author

It is working fine on localhost but it gives error on live server. I have changed ws://192.168.0.104 to ws://urlOfSite. but still

@RohmadEW
Copy link

RohmadEW commented Feb 7, 2018

@TaimurTTS , have you checked firewall?
You have to check your port ws and make sure its port open.
You can use nmap YOUR_IP and netstat -ntlp | grep listen for check port in your live server.

@TaimurTTS
Copy link
Author

I am getting this error now:
WebSocket is already in CLOSING or CLOSED state.

@TaimurTTS
Copy link
Author

ok now. Site is hosted on inmotion hosting. I contacted there support about port 2000. They are definitely sure that 2000 is open & there is not any firewall issue.

now i', getting error: Connection2.js:7 WebSocket connection to 'ws://127.0.0.1:2000/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Their support says that 2000 is open and no service is listening to this port that's why it's not responding

@TaimurTTS
Copy link
Author

when i try with server IP it gives me error of connection timeout. According to support port is open & live

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

2 participants