Results 1 to 2 of 2

Thread: Apache Issues

  1. #1

    Apache Issues

    Hello,

    I have been working with lightstreamer, and have been successful in getting the demo's up and running with a c# client that sends data through an adapter to an html web page.

    The problem I am having is that when I try to deploy my html page to my apache server, it gives me a socket refused error through the javascript console:

    Uncaught [|IllegalStateException|Please specify at least one cell|] lightstreamer.js:422Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:4040/lightstreamer/create_session.js
    WebSocket connection to 'ws://localhost:4040/lightstreamer' failed: WebSocket is closed before the connection is established. http://localhost:4040/mixeddatabase.php
    POST http://localhost:4040/lightstreamer/create_session.js 404 (Not Found) lightstreamer.js:174


    I am wondering if there is some kind of configuration that is required before I can deploy to my apache server. The lightstreamer server is running on port 4041, and my apache server is running on port 4040.
    I have googled and googles, and all I can find is information from 2009 about a text file that says how to deploy to your server, and it talks about editing a misc.js file but I can find neither of these files in the current install directory.

    Appreciate any insight or help that would be available.




  2. #2
    Senior Member
    Join Date
    Feb 2013
    Posts
    54
    Hi Daniel,
    first of all, the document "HOW_TO_DEPLOY_ON_YOUR_WEB_SERVER.TXT" you are referring is an old one and it helds only for version 4.
    Starting from version 5, the support to cross-origin requests has been introduced, so you don't need to refer to that document anymore.
    It seems to me that the issue is just a matter of configuring the LightstreamerClient to connect to the Lightstreamer server port, instead of the apache server port.
    (the create_session request should be addressed to the Lightstreamer server on port 4041, instead of http://localhost:4040/lightstreamer/create_session.js)
    I assume your html page has a <script> section where a LightstreamerClient is instantiated: the first parameter should be the Lightstreamer serverAddress, so something like:
    var client = new LightstreamerClient("http://localhost:4041", "MY_ADAPTER_SET");
    (use the actual ip address instead of localhost, if you're running the browser on an other machine)


    You may find more information at
    http://www.lightstreamer.com/docs/cl...api/index.html and
    http://www.lightstreamer.com/latest/...nt%20Guide.pdf


    HTH
    Marco

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 07:03 PM.