Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Webserver fails to read certificate

appling
2021-06-08
2021-06-08
  • appling - 2021-06-08

    Hello everyone,

    I have a Linux 64Bit soft PLC that is supposed to run a web visualization.
    I have a valid license for the runtime - the dongle is inserted to the device and is read successfully by Codesys.

    When I try to open the web visualization I see the red loading symbol that tells me that an error happened.

    I can log in to the project via the CodeSys IDE and live debug - the application works fine without exceptions.
    In the log under "Device" I can see these two messages:

    TlsCreateContext: Creating the TLS context for namespace 'WebServer' failed.
    TlsCreateContext: Failes to read certificate './PKI/cert/server.cer' in namespace: 'WebServer'

    Has anyone experienced this issue before? How do I resolve it?
    Of course I have rebooted the device multiple times and have even re-installed the runtime. I have also tried going back to an old backup of the project where the web visu was still working - but I get the same error...

    Best Regards

     
  • eschwellinger

    eschwellinger - 2021-06-08

    could you give us the whole log?
    the lines above seems not to be the problem

     
  • appling - 2021-06-08

    Hi, thank you for the quick response.
    This is the exported log file:

     
  • eschwellinger

    eschwellinger - 2021-06-08

    hm.. strange, could us use the Security Agent to generate a selfsigned certificate?
    Do you want to access the webvisu pages by http: or encrypted by https: ?
    Anyway in my config it work without problem even I see this error (warning) too..!
    Could you try to change the port in case there is another service running on 8080?
    [CmpWebServer]
    WebServerPortNr=8081
    for a test..?

    This works without Security Agent.

     

    Last edit: eschwellinger 2021-06-08
  • appling - 2021-06-08

    Hi, thank you again for your input.
    I could not find any documentation on the Security Agent and the store seems to be unavailable now.
    For now it would be enough for me if I could access the web visu at all, so http would be fine.

     

Log in to post a comment.