I tried to run the demo AdvancedChat. But failed,the message is:"Connection failed: Is the server running at all?"
But the flash demo is ok.
I have installed server patch 2.3. I also activate the websocket in sfs administration.
Can't connect to server using html5
Re: Can't connect to server using html5
Hi,
Have you restarted the server after you enabled the websockets?
Don't forget that the websocket uses a different port than the TCP, UDP and HTTP connections, so don't also forget to forward that extra port in your router, in case you're behind any.
Finally, when you boot the server, right before the "SFS2X READY" message, does it show that it correctly bound the websocket?
Have you restarted the server after you enabled the websockets?
Don't forget that the websocket uses a different port than the TCP, UDP and HTTP connections, so don't also forget to forward that extra port in your router, in case you're behind any.
Finally, when you boot the server, right before the "SFS2X READY" message, does it show that it correctly bound the websocket?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Can't connect to server using html5
1,I use localhost(127.0.0.1),rjgtav wrote:Hi,
Have you restarted the server after you enabled the websockets?
Don't forget that the websocket uses a different port than the TCP, UDP and HTTP connections, so don't also forget to forward that extra port in your router, in case you're behind any.
Finally, when you boot the server, right before the "SFS2X READY" message, does it show that it correctly bound the websocket?
2, In server. the startup log:
19:23:47,741 INFO [main] v2.SmartFoxServer - Listening Sockets: { 127.0.0.1:9933, (Tcp) } { 127.0.0.1:9933, (Udp) } { 127.0.0.1:8888 (WebSocket) }
19:23:47,752 INFO [main] v2.SmartFoxServer -
_____ _____ _____ ___ __ __
| __| __| __| |_ | | |
|__ | __|__ | | _|- -|
|_____|__| |_____| |___|__|__|
_____ _____ _____ ____ __ __
| __ | __| _ | \| | |
| -| __| | | |_ _|
|__|__|_____|__|__|____/ |_|
[ 2.3.0 ]
3, log of the port opened :
zzcmatoMacBook:~ zzc$ lsof -i -P |grep -i "listen"
ssh 633 zzc 5u IPv4 0x06af6b58 0t0 TCP 3dns-2.adobe.com:7070 (LISTEN)
ssh 633 zzc 6u IPv6 0x053b96d0 0t0 TCP localhost:7070 (LISTEN)
java 640 zzc 84u IPv6 0x053b85c0 0t0 TCP *:8080 (LISTEN)
java 640 zzc 92u IPv6 0x053b91f0 0t0 TCP [::127.0.0.1]:9933 (LISTEN)
java 640 zzc 94u IPv6 0x053b8830 0t0 TCP [::127.0.0.1]:8888 (LISTEN)
Re: Can't connect to server using html5
Now,It's OK,thank you.
Re: Can't connect to server using html5
What was the problem?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Can't connect to server using html5
It's my fault.I changed the ip to 192.168..... in the client js file and forget to change back to 127.0.0.1rjgtav wrote:What was the problem?