-
September 1st, 2016, 11:25 AM
#1
Default port change giving error
Hello,
I am new to lightStreamer in fact I have started exploring it today itserlf.
I was able to successfully create a setup and lightstreamer is running on my machine, thanks to great tutorial of yours.
But now while trying for Hello Worl program, there is this error:
'lightstreamer.js:204 POST http://localhost:8080/lightstreamer/create_session.js 404 (Not Found)'
as i have changed defalut ports of lightstreamer, but its still making call to localhost:8080.
Following is block of code responsidble for calls.
<script>
require(["LightstreamerClient","Subscription","StaticGr id"],function(LightstreamerClient,Subscription,StaticG rid) {
var client = new LightstreamerClient(null,"HELLOWORLD");
client.connect();
var grid = new StaticGrid("hellogrid",true);
var subscription = new Subscription("MERGE",grid.extractItemList(),grid.e xtractFieldList());
subscription.addListener(grid);
client.subscribe(subscription);
});
</script>
Please let me know what should I have to do next ?
NOTE :: I am using lightStreamer 5, as I can't use latest one.
Regards,
Avinash
-
September 1st, 2016, 11:29 AM
#2
Hi All,
Sorry
sorted it out :P
var client = new LightstreamerClient(null,"HELLOWORLD");
var client = new LightstreamerClient("localhost:9090","HELLOWORLD") ;
Regards,
Avinash
-
September 1st, 2016, 11:58 AM
#3
Now i am facing following issue in JS
'Websocket connection to 'ws://localhost:9090/lightstreamer' failed: Websocket is closed before the connection is established..
Please guide.
-
September 2nd, 2016, 09:04 AM
#4
Hi avinashghodke,
The message reported means that a websocket close was called before the connection was even given a chance to be established.
This can happen when the JavaScript library determines that has been too long in an attempt to connect; so it gives up and tries some fallbacks (HTTP streaming, polling, ...).
Please could you confirm that despite the error message then the connection eventually succeds?
The most likely reason for the failure of websocket is that between the server and the client there is some intermediary (such as a proxy) that does not support WS protocol, and prevent the client request to reach the Lightstreamer server.
Regards,
Giuseppe
Similar Threads
-
By darch in forum General
Replies: 0
Last Post: March 15th, 2013, 06:24 PM
-
By ptelang in forum General
Replies: 1
Last Post: December 3rd, 2012, 08:59 AM
-
By LS_Developer in forum Client SDKs
Replies: 3
Last Post: March 6th, 2012, 08:58 AM
-
By amoroso@forex.co.ke in forum Adapter SDKs
Replies: 3
Last Post: February 1st, 2010, 11:01 AM
-
By shreyaspurohit in forum Client SDKs
Replies: 6
Last Post: December 15th, 2008, 01:27 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:50 PM.
Bookmarks