Results 1 to 8 of 8
  1. #1

    Connection Issues (SSL related?) [WinRT]

    Hi all,

    I'm having trouble connecting to a host using the WinRT SDK. It connects fine from the Android client on an emulator on the same machine. However, when connecting from a Win8 emulator, calling client.OpenConnection results in a PushConnException being thrown. The exception only says "Unable to connect to the remote server".

    Everything seems pretty straightforward except possibly the SSL stuff, so my suspicion is that using the self-signed cert might be causing issues in some manner but am having trouble analyzing further from this particular error.

    Some code/settings (replacing actual host path with placeholder value, but real one is still https:

    public void Start(string pushServerUrl, int phase, ILightstreamerListener listener) {
                this._started = true;
                FidelityConnectionListener ls = new FidelityConnectionListener(listener, phase);
                ConnectionInfo connInfo = new ConnectionInfo();
                connInfo.User = App.user;
                connInfo.Password = App.password;
                connInfo.PushServerUrl = pushServerUrl;
                connInfo.Adapter = App.adapter;
                client.OpenConnection(connInfo, ls);
    private const string pushServerHost = "";
    SSL added in app manifest by adding a "Certificates" declaration in Package.appxmanifest and then setting the info for the actual cert to:

    Store Name: CA (also tried root)
    Content: path/to/cert (also tried moving it directly into the project tree and updating the path)

    the pushServerUrl, the user, the password, and the adapter all match the Android version which is working. In addition, the connection attempt is not even appearing in the server logs.

    Any thoughts on what potential root causes might be for this problem?


  2. #2
    Adding exposed stack trace:

       at Lightstreamer.DotNet.Client.ExtConnectionListener.WaitStreamingTimeoutAnswer()
       at Lightstreamer.DotNet.Client.LSClient.OpenConnection(ConnectionInfo info, IConnectionListener listener)
       at Fidelity_Lightstreamer.Source.LightstreamerClient.Start(String pushServerUrl, Int32 phase, ILightstreamerListener listener) in c:\Users\a543617\dev\fidelity-lightstreamer\Fidelity-Lightstreamer\Source\LightstreamerClient.cs:line 44
       at Fidelity_Lightstreamer.App.<Start>d__6.MoveNext() in c:\Users\a543617\dev\fidelity-lightstreamer\Fidelity-Lightstreamer\App.xaml.cs:line 179

  3. #3
    Join Date
    Feb 2012
    Hi Eric,

    even if it was a problem related with the SSL certificate is still weird that on the server side the connection attempt does not appear at all.
    So please, can you repeat the test after you have set these options in the configuration file (lightstreamer_log_conf.xml) of the server log:

    <logger name="LightstreamerLogger.connections" level="DEBUG"/>
    <logger name="LightstreamerLogger.connections.ssl" level="DEBUG"/>
    Please also, can you confirm us that you are testing with Windows 8 or 8.1?

    Thank you,

  4. #4
    I don't have access to the server side configuration settings at the moment, but I believe it is set to debug as we have received verbose logs for connection attempts on Android. We'll double-check tomorrow when our contact returns, but I'm pretty sure it is already set.

    We are testing on Windows 8. Any other thoughts as to what might be happening?


  5. #5
    Join Date
    Feb 2012
    Hi Eric,

    If the connections and connections.ssl loggers (at DEBUG level) do not report anything about the attempt of connection from your WinRT client then most likely the issue is happening before than the SSL is involved.
    Indeed, from our experience, in cases of issues with recognition of self-signed certificates the server log always reported a message about the problem.

    Anyway, please check these few links about WinRT self-signed certificate issues:

  6. #6
    The server logs do not show anything with debug mode turned on. We also timed the failure, and it seems to be happening around 1100 ms, which would suggest maybe that the attempt is timing out in the WaitOne() method?

    Turning on an internal network listener, there is a dns request that happens for the domain and the app gets the successful response for that but then there doesn't appear to be any request to that actual ip address.

    We also tried this on a Windows 8.1 Surface with the same result.

    Any other ideas/suggestions?


  7. #7
    Okay, made it past the first issue. Same network, but their might be some network segregation going on. Adding the proxy to the computer made it so the client will now find/connect successfully. However, the connection closes after ~30 seconds with a PushConnException:

    {"The underlying connection was closed: The connection was closed unexpectedly."} Lightstreamer.DotNet.Client.PushConnException

    On the server, they saw the SSL handshake succeed but and then the connection closed shortly after that.

    debug logs:

    23-Jan-14 16:08:25,364|DEBUG|LightstreamerLogger.connections | Lightstreamer HTTPS Server|Socket accept on 10.x.x.20:58596
    23-Jan-14 16:08:25,424|DEBUG|ghtstreamerLogger.connections.s sl|IO SSL HANDSHAKE SELECTOR 1|Handshake completed on socket Lightstreamer HTTPS Server; selected cipher suite TLS_RSA_WITH_AES_128_CBC_SHA
    23-Jan-14 16:08:25,424|INFO |LightstreamerLogger.connections |SERVER POOLED THREAD 5 |Accepted HTTPS connection on Lightstreamer HTTPS Server from 10.x.x.20:58596
    23-Jan-14 16:08:30,236|DEBUG|LightstreamerLogger.connections | Lightstreamer HTTPS Server|Socket accept on 10.x.x.20:60089
    23-Jan-14 16:08:30,380|DEBUG|ghtstreamerLogger.connections.s sl|IO SSL HANDSHAKE SELECTOR 1|Handshake completed on socket Lightstreamer HTTPS Server; selected cipher suite TLS_RSA_WITH_AES_128_CBC_SHA
    23-Jan-14 16:08:30,380|INFO |LightstreamerLogger.connections |SERVER POOLED THREAD 6 |Accepted HTTPS connection on Lightstreamer HTTPS Server from 10.x.x.20:60089
    23-Jan-14 16:08:46,305|INFO |LightstreamerLogger.connections |SERVER POOLED THREAD 1 |Closed HTTPS connection on Lightstreamer HTTPS Server from 10.x.x.20:58596
    23-Jan-14 16:08:56,376|INFO |LightstreamerLogger.connections |SERVER POOLED THREAD 8 |Closed HTTPS connection on Lightstreamer HTTPS Server from 10.x.x.20:60089

    (slight ip address obfuscation, even tho it is private)

    Also, when i look for all exceptions there is a socketException that is being thrown:
    message: An attempt was made to access a socket in a way forbidden by its accessor permissions

    Any suggestions on next steps?

  8. #8
    Join Date
    Feb 2012
    Hi Eric,

    The unexpected closures are due to normal behavior of the server that after a certain period of inactivity closes the connection.
    Thus, it is possible that the two connections shown in the log have been opened but then never used?

    I don't think that the "AceessDenied" exception is directly linked to the situation seen above; perhaps it can cause a blockage in the logic flow of the application and thus prevent subsequent requests to Lightstreamer?
    By the way, the problem of "AccessDenied" should be linked to problems of permissions configuration in the client application.



Similar Threads

  1. Mixing SSL and non-SSL
    By kpturner in forum General
    Replies: 2
    Last Post: March 2nd, 2015, 10:19 AM
  2. Lightstreamer WinRT Client Lib is Available
    By Alessandro in forum Client SDKs
    Replies: 0
    Last Post: December 20th, 2012, 11:04 AM
  3. create_session related issue.
    By Sathyaayyanar in forum Adapter SDKs
    Replies: 5
    Last Post: August 24th, 2010, 09:32 AM
  4. SetDomain setLSHost related issue
    By Sathyaayyanar in forum Client SDKs
    Replies: 1
    Last Post: July 30th, 2010, 01:32 PM
  5. Trying to run LS through Https / SSL
    By wmolde in forum Client SDKs
    Replies: 2
    Last Post: April 18th, 2007, 03:40 PM


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 06:47 PM.