Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing UPS info page results in "Error: can't open template file (upsstats.html)" #9

Closed
sebasdt opened this issue Feb 7, 2023 · 2 comments

Comments

@sebasdt
Copy link

sebasdt commented Feb 7, 2023

Hi,

As I talked before in a earlier #8 issue
Here is what I could find.

Linux OS:
Debian 11

The issue:
While trying to access the UPS info page The user receives a Error: can't open template file (upsstats.html)

Possible causes:

  • Something is up with the permissions.
  • The file doesn't exist on the host.

What I could find is that the upsstats.html seems to be missing on the machine.
Trying to find the files with a upsstats in there name with: find / -name "upsstats.*" results in:
/usr/share/man/man8/upsstats.cgi.8.gz
/usr/share/man/man5/upsstats.html.5.gz
/usr/lib/cgi-bin/nut/upsstats.cgi

Solution!
here it is

Turns out two files were missing from NUT it self here is how to get the website working again:

1. On the host system go to the NUT directory with `cd /etc/nut`

2. Create a file called `nano upsstats.html` and paste the contents of [upsstats.html.sample](https://raw.githubusercontent.com/networkupstools/nut/master/conf/upsstats.html.sample) to the file.

3. Now do the same for `nano upsstats-single.html` with the contents of [upsstats-single.html.sample](https://raw.githubusercontent.com/networkupstools/nut/master/conf/upsstats-single.html.sample)

Now reload the page and it should be up and running.

If more information is needed feel free to ask.

@sebasdt
Copy link
Author

sebasdt commented Feb 7, 2023

Okay great news,

Got the information site up and running again after some time looking around.

Turns out two files were missing from NUT it self here is how to get the website working again:

  1. On the host system go to the NUT directory with cd /etc/nut
  2. Create a file called nano upsstats.html and paste the contents of upsstats.html.sample to the file.
  3. Now do the same for nano upsstats-single.html with the contents of upsstats-single.html.sample

The files are located on the networkUpsTools (NUT) github repo.

Now reload the page and it should be up and running.
That's it. Im closing this issue since it is solved.

@dzomaya
Copy link
Owner

dzomaya commented Feb 8, 2023

@sebasdt
Great issue write ups and thank you for detailing the conclusion too! I should to think about if there needs to be doc updates or changes to make it better going forward, but this was great and can help people who run into something similar.

I appreciate you using the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants