Contents

HttpTestServer

HttpTestServer runs a simple HTTP test server with security being optional.

Note

In this document, you will find labels of ‘Edge Insights for Industrial (EII)’ for file names, paths, code snippets, and so on. Consider the references of EII as Open Edge Insights for Industrial (Open EII). This is due to the product name change of EII as Open EII.

Prerequisites for running the HttpTestServer

  • To install Open EII libs on bare-metal, follow the README of eii_libs_installer.

  • Generate the certificates required to run the Http Test Server using the following command:

    ./generate_testserver_cert.sh test-server-ip
    
  • Update no_proxy to connect to RestDataExport server

    export no_proxy=$no_proxy,<HOST_IP>
    

Starting HttpTestServer

  • Run the following command to start the HttpTestServer:

    cd IEdgeInsights/tools/HttpTestServer
    go run TestServer.go --dev_mode false --host <address of test server> --port <port of test server> --rdehost <address of Rest Data Export server> --rdeport <port of Rest Data Export server>
    
       Eg: go run TestServer.go --dev_mode false --host=0.0.0.0 --port=8082 --rdehost=localhost --rdeport=8087
    
    For Helm Usecases
    
    Eg: go run TestServer.go --dev_mode false --host=0.0.0.0 --port=8082 --rdehost=<maser_node_ip>--rdeport=31509 --client_ca_path ../../build/helm-eii/eii-deploy/Certificates/rootca/cacert.pem
    

    Note: server_cert.pem is valid for 365 days from the day of generation

  • In PROD mode, you might see intermediate logs like this:

    http: TLS handshake error from 127.0.0.1:51732: EOF
    

    These logs are because of RestExport trying to check if the server is present by pinging it without using any certs and can be ignored.