OpenHistorian web interface needs to be running http port other than 8180

Hi Team,
We need to run the openHistorian web interface using http port other than 8180. I configured http port as 8185 using openHistorian.config file, web interface is working fine. However, Grafana is not launching.

I changed below list of configuration parameters in .config file.

add name=“WebHostURL” value=“http://+:8185” description=“The web hosting URL for remote system management.” encrypted=“false”

add name=“HostedURL” value=“http://localhost:8185” description=“Defines the local URL to the hosted Grafana server instance. Setting is for internal use, external access to Grafana instance will be proxied via WebHostURL.”

ppaGrafanaDataService
add name=“Endpoints” value=“http.rest://localhost:8185/unused”
description=“Semicolon delimited list of URIs where the web service can be accessed.”
encrypted=“false”

Also changed in custom.ini file at Grafana conf folder.

root_url = http://${HOSTNAME}:8185/grafana/

Can you please clarify. What could be the issue? And do I need to do anything in code?

Thanks & Regards
Logu

That’s because the internal Grafana instance is already configured to run on port 8185. If you really want openHistorian on 8185, you’ll need Grafana on another port.

Thanks,
Ritchie

Hi Ritchi,

Thanks for your quick response.

I’m trying to run the Web application using the port 9095 and changed all relevant parameters in .config file. But web application is not working.

Below parameters are modified
add name=“WebHostURL” value=“http://+:9095” description=“The web hosting URL for remote system management.” encrypted=“false”

add name=“HostedURL” value=“http://localhost:9095” description=“Defines the local URL to the hosted Grafana server instance. Setting is for internal use, external access to Grafana instance will be proxied via WebHostURL.”

Is there any port restriction in openHistorian web application or can I use any port?

Also, can you please provide the steps to configure Grafana to run different port?

Do we need to make changes in code for running different port?

Please explain.

Thanks & Regards
Logu

If your Windows service is running as the NT SERVICE\openHistorian user, then you will need to provide the user rights to use this port:

netsh http add urlacl http://+:9095/ user=NT SERVICE\openHistorian

The Grafana port is configured in the “…\Grafana\conf\custom.ini” file and referenced by the openHistorian config as you mention.

Thanks,
Ritchie

Thanks Ritchi, I will try and update you.

Also what are the configuration settings needs be changes? Can you please validate my above reply, where I changed parameters like “WebHostURL”, "HostedURL:.
Do I need to change any other parameters?

Also, Grafana web port and openHistorian port need to be different.

Honestly I would try leaving the Grafana port on its original value just because that particular ini file is not preserved between installations.

If you want the open historian to run on another port then the only setting you would need to change is the WebHostURL to an used port and run the command netsh as mentioned above to give the service user rights to host an http service on the new port.

Also since Grafana is setup as a reverse proxy hosted directly by the openHistorian, it’s bound to localhost, i.e., 127.0.0.1, that way this special Grafana instance can’t be accessed off machine except through the open historian which controls Grafana’s security.

Thanks Ritchi,

After adding ACL for new URL, I’m able to access Web Interface as well as Grafana.
If I have any further queries, I will communicate to you.

Regards
Logu