Alpha Video Training
Results 1 to 11 of 11

Thread: Web Sockets Cannot connect

  1. #1
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Web Sockets Cannot connect

    So here is my issue: I placed the web sockets demo (with no changes) on a test page. I enabled websockets in my project properties and for the port I put +10
    My project is hosted with an application server using SSL (port 443)
    When I load the page, I get this error:
    Test.a5w:1694 WebSocket connection to 'wss://www.nwcopro.com:90/?id=5834CCC6-B10B-4CB0-8E81-57AAE31ED053&subscribe=messageboard,alpha' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
    So - this must mean SOMEHOW, node.js is using port 80 as it's starting point for an wss connection.

    I asked Selwyn about this - he asked if I was using the pre-render option - that's a negative, this is the websockets demo that AS created unaltered.
    He also stated that there is an issue with websockets and load-balancers - again, that's a negative as well as I am not using one.
    I use always up and RDP Guard and that's about it.

    I think my first question is if anyone is using websockets on a secure server? If you put +10 do you get port 90 or 453? Does anyone think that should matter? I would assume there is an issue with the certificate at this point and the port would be irrelevant...thanks for any input!
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  2. #2
    Member
    Real Name
    Jeff Fryman
    Join Date
    Jan 2014
    Posts
    2

    Default Re: Web Sockets Cannot connect

    We have experienced the same behavior (same set up as you ) with the exception that the port was set to an arbitrary number ( such as "1212") instead of a +10...
    It would work intermittently but whenever it failed the browser was always requesting it on port 90, the same as your time out error.

    Did you ever figure out what was causing this?

  3. #3
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    No, I would encourage you to submit a ux for testing and review. Selwyn did not have an answer for me, other than it was weird. Interesting that it worked sometimes.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  4. #4
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    Jeff, are you running two instances of the web server or perhaps a custom config file?
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  5. #5
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    I am still wondering WHY this will not work on my server. Websockets work correctly in live preview so all I can figure is that there is something missing on my server that is on my local machine. In other words, I thin maybe there are some node files missing on my remote server that are present on my local machine, perhaps in the live preview folder?
    The error is: failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
    but as I said, the component works as expected using live preview.

    In the project properties, I have +10 set for the port and the console is showing me that it's using port 90 which is odd for a server using 443. Seems like it should be using 453 as a port. Websockets would be awesome if they worked for me!
    Any thoughts are appreciated!

    btw, the component is the websockets demo UX - no changes...
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  6. #6
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,519

    Default Re: Web Sockets Cannot connect

    Is port 90 open for access in your server (not Alpha or Web socket server)

    Ken

  7. #7
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    I am not sure, but regardless it doesn't connect via any port I assign. The main issue with bringing up the port was that the application is served via https (443) so I would think the port would be 453 using wss://domainname...
    In others words the connection is using wss for the websocket connection, but assigning 90 as though it were using 80 as a starting point.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  8. #8
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    using netstat i confirmed the port ( I chose 8083 as a test) is listening so not sure why there is a timeout
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  9. #9
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,519

    Default Re: Web Sockets Cannot connect

    Did you also check firewall blocking? Your software listening some port does not function properly if firewall blocks traffic in and out.

  10. #10
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,049

    Default Re: Web Sockets Cannot connect

    Since I have RDP Guard installed, I am not entirely sure if that has anything to do with it. I also stopped the AS server on port 80 and just tried 80 - but again, using netstat I could see the server was listening on port 80. I am looking into the server logs to see if there are any logs of the attempted traffic connection. Being a novice in this area, I am not sure exactly where to look for possible problems.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  11. #11
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,519

    Default Re: Web Sockets Cannot connect

    Better option than RDP Guard is to use external firewall. For example AWS and Leaseweb VPS Cloud has it without extra cost.

    Web socket server has nothing to do with WAS. They are two different servers and can not for example listen same port. There would be an error when you start server. Normally ports (in server like 2016) are closed and you have to explicitly open them for use. So you have to check this in windows firewall and open ports if needed. Remember also close them if you do not need them anymore. When you are testing you can shut down RDP Guard.

Similar Threads

  1. Web Sockets and multiple instances
    By CharlesParker in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 08-29-2017, 09:00 PM
  2. Coverting A5V5 use of Sockets to A5V11
    By Graham Wickens in forum Alpha Five Version 11 - Desktop Applications
    Replies: 2
    Last Post: 10-21-2013, 10:40 AM
  3. Anybody using Sockets to get data from instrumentation?
    By CALocklin in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 11-08-2012, 02:15 PM
  4. connect to DB
    By fereidoon2011 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 06-02-2011, 01:29 PM
  5. HTTP_FETCH(): "Secure Sockets Layer was not able to verify certificate."
    By Alweth in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 03-04-2010, 12:55 PM

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
  •