Hello,
I'm getting an error connecting to sfs using the javascript client api:
sfs2x-api-1.7.6.js:10 WebSocket connection to 'ws://127.0.0.1:8080/BlueBox/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400
using my home computer this works just fine, but on my work computer it doesn't work.
I've verified the port and configuration to match the home computer.
config is rather simple:
config.host = "127.0.0.1";
config.port = 8080;
config.zone = "YanivZone";
config.debug = true;
Changing ports didn't help, navigating to http://127.0.0.1:8080/BlueBox/websocket returns:
HTTP ERROR 400
Problem accessing /BlueBox/websocket. Reason:
HTTP method GET is not supported by this URL
telnet 127.0.0.1 at port 8080 seems to connect to jetty just fine.
Any ideas?
can't connect to sfs2x from work computer
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
This is soooo weird...
When a proxy software such as fiddler or charles proxy is opened, I'm able to connect!
as soon as I close them, it fails.
BTW, I'm using a windows system, but I've also tried running sf2x from a linux VM, and it still didn't work, with the same error...
When a proxy software such as fiddler or charles proxy is opened, I'm able to connect!
as soon as I close them, it fails.
BTW, I'm using a windows system, but I've also tried running sf2x from a linux VM, and it still didn't work, with the same error...
Re: can't connect to sfs2x from work computer
Hello,
for starters, what SFS2X version are you running?
This is expected, if you try to connect with a browser instead of a websocket client.
Thanks
for starters, what SFS2X version are you running?
HTTP ERROR 400
Problem accessing /BlueBox/websocket. Reason:
HTTP method GET is not supported by this URL
This is expected, if you try to connect with a browser instead of a websocket client.
Thanks
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
I'm using the latest version (2.13.0)
Again, it works on my home computer, but not on the work computer..
Again, it works on my home computer, but not on the work computer..
Re: can't connect to sfs2x from work computer
Thanks,
HTTP error code 400 refers to a bad/malformed request.
SFS2X 2.13 supports two different protocols within websockets, the legacy JSON and the binary protocol.
Since you're using the JS API 1.7.6, you're working with the latest version that uses the binary protocol. Make sure that the server is configured to use the binary proto as well.
You find the settings under AdminTool > ServerConfigurator > WebServer
Hope it helps
HTTP error code 400 refers to a bad/malformed request.
SFS2X 2.13 supports two different protocols within websockets, the legacy JSON and the binary protocol.
Since you're using the JS API 1.7.6, you're working with the latest version that uses the binary protocol. Make sure that the server is configured to use the binary proto as well.
You find the settings under AdminTool > ServerConfigurator > WebServer
Hope it helps
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
It is using the WS binary protocol.
My web server settings is as follows:
My web server settings is as follows:
Re: can't connect to sfs2x from work computer
Okay, thanks.
I have no idea why you can't connect on your work machine.
It seems that either you are missing something in the (config, client setup...) or you have a local firewall messing with your connections.
Since you're able to connect to the AdminTool the firewall issue might not be the case, but it would also depend on how the firewall is set up. We have seen all sorts of very strange behaviors with local firewalls, such as ZoneAlarm. (This one in particular was pretty nasty and we had to fully uninstall it to get rid of connection issues)
Hope it helps
I have no idea why you can't connect on your work machine.
It seems that either you are missing something in the (config, client setup...) or you have a local firewall messing with your connections.
Since you're able to connect to the AdminTool the firewall issue might not be the case, but it would also depend on how the firewall is set up. We have seen all sorts of very strange behaviors with local firewalls, such as ZoneAlarm. (This one in particular was pretty nasty and we had to fully uninstall it to get rid of connection issues)
Hope it helps
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
I assume that if firewall was the case I wouldn't be able to connect to it using telnet or web interface at all.
seems only websocket protocol fails... Also, like I stated, turning on Fiddler or Charles Proxy (without ssl decryption enabled) seems to fix it...
EDIT: oddly enough, chrome and firefox can't connect, but internet explorer is able to connect perfectly...
Testing against http://demos.kaazing.com/echo/, entering:
ws://127.0.0.1:8080/BlueBox/websocket
works on IE (connects), but not in chrome of firefox.
seems only websocket protocol fails... Also, like I stated, turning on Fiddler or Charles Proxy (without ssl decryption enabled) seems to fix it...
EDIT: oddly enough, chrome and firefox can't connect, but internet explorer is able to connect perfectly...
Testing against http://demos.kaazing.com/echo/, entering:
ws://127.0.0.1:8080/BlueBox/websocket
works on IE (connects), but not in chrome of firefox.
Re: can't connect to sfs2x from work computer
If this is only happening on one specific machine I think it's a local issue, the cause of which I ignore, unfortunately.
I'd recommend trying on another machine as the behavior you're getting is really bizarre.
Let us know what you find.
Thanks
I'd recommend trying on another machine as the behavior you're getting is really bizarre.
Let us know what you find.
Thanks
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
FOUND IT!
The culprit is the Ad-Muncher. as soon as it's activated (even if disabled!) I can't connect to sfs anymore. quitting it completely fixed it...
PHEW...
FYI
The culprit is the Ad-Muncher. as soon as it's activated (even if disabled!) I can't connect to sfs anymore. quitting it completely fixed it...
PHEW...
FYI
Re: can't connect to sfs2x from work computer
One more thing.
Using telnet you're just opening a socket connection to the server, but no communication happens. I wouldn't expect that to fail, since you're getting an HTTP error 400 which means a communication is happening.
The problem here is that it seems the data received by the server is incorrect and causes an error. The fact that turning on a local proxy fixes the issue is quite curious... is it possible that the browsers that fail (e.g. Chrome) are configured to use a proxy? If so their traffic would be sent somewhere else, not to SFS2X, hence the error.
Just a thought.
Using telnet you're just opening a socket connection to the server, but no communication happens. I wouldn't expect that to fail, since you're getting an HTTP error 400 which means a communication is happening.
The problem here is that it seems the data received by the server is incorrect and causes an error. The fact that turning on a local proxy fixes the issue is quite curious... is it possible that the browsers that fail (e.g. Chrome) are configured to use a proxy? If so their traffic would be sent somewhere else, not to SFS2X, hence the error.
Just a thought.
-
- Posts: 84
- Joined: 11 Oct 2009, 11:46
- Contact:
Re: can't connect to sfs2x from work computer
I just replied above you with the problem I had
Might be worth mentioning to other developers, although in a production that shouldn't be an issue (unless you use Ad Muncher in a production server )
Might be worth mentioning to other developers, although in a production that shouldn't be an issue (unless you use Ad Muncher in a production server )
Re: can't connect to sfs2x from work computer
Ah, interesting!
Good to know, haven't heard of this one before.
Good find.
Good to know, haven't heard of this one before.
Good find.
Who is online
Users browsing this forum: Google [Bot] and 102 guests