Web CLient: "TCP Init" Error

2023-05-23
2023-05-24
  • justthefacts77 - 2023-05-23

    *Note: previous posts on this did not resolve my issue.

    Using latest IIOT Library download with Web Client and associated example project on WinPLC.

    Use the provided HTTP URL: sURL : STRING(1024) := 'http://httpbin.org/get' (works fine)

    Use my HTTPS URL: sURL : STRING(1024) := 'https://api.weather.gov/gridpoints/TBW/69,116/forecast/hourly'

    gives me "TCP_INIT_ERROR" Unable to initialize the TCP socket.

    All Libraries look good as provided with the example project and updated accordingly.

    ?- something with my Socket and HTTPS credentials. Just not sure were thos knobws are adjusted.

    Regards

     
  • i-campbell

    i-campbell - 2023-05-23

    have you run cert-gendhparams from the Plc shell

     
    • justthefacts77 - 2023-05-24

      I ran "security Agent" which is the latest cert. gen approach. Thanks though.

       
      • i-campbell

        i-campbell - 2023-05-24

        I dont think Security Agent can generate Diffie Hellman parameters, which is what you need for tls connections without client certificates.

         
  • justthefacts77 - 2023-05-24

    Hmmm.here's the odd things (I have CSYS support so I also submitted to them and they said HTTPS worked ok on example project).

    • Example project Web Client "out of the box" from CSYS states HTTP or HTTPS URL supported in the comments of the PRG.
    • This implies (to me) no unique HTTPS Cert generation, etc. required. I type the HTTPS URL ( https://api.weather.gov/gridpoints/TBW/69,116/forecast/hourly ) in browser, displays fine. I run WinPLC project and "TCP Init Error"
    • No external inputs to CFC Block I can set to fix.
    • Definitely on my end, but stumped for now.

    Feedback really appreciated on this. Any further insights I'll take otherwise, gonna have to "grind it out"....

    I was going to revisit WebVisu running over HTTPS (which I think Security Agent generates Certs for) for any clues.

     

Log in to post a comment.