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

Nginx: open version.json failed #25

Closed
Avenger-ger opened this issue Nov 2, 2013 · 7 comments
Closed

Nginx: open version.json failed #25

Avenger-ger opened this issue Nov 2, 2013 · 7 comments
Assignees
Labels

Comments

@Avenger-ger
Copy link

Hello,
I am using the latest version of rpimonitor. When I am using the embedded webserver erverything works fine, but when I am using nginx ( which works fine and set up using the guide from http://rpi-experiences.blogspot.fr/2013/06/rpi-monitor-version-20-advance-usage.html ) the status and statistics page cannot be displayed.

The error of nginx is the following:
2013/11/02 12:33:53 [error] 7169#0: *9 open() "/usr/share/rpimonitor/web/version.json" failed (2: No such file or directory), client: 192.168.1.9, server: , request: "GET /version.json HTTP/1.1", host: "192.168.1.7:8888", referrer: "http://192.168.1.7:8888/"
2013/11/02 12:33:54 [error] 7169#0: *9 open() "/usr/share/rpimonitor/web/version.json" failed (2: No such file or directory), client: 192.168.1.9, server: , request: "GET /version.json HTTP/1.1", host: "192.168.1.7:8888", referrer: "http://192.168.1.7:8888/status.html"
2013/11/02 12:34:15 [error] 7169#0: *9 open() "/usr/share/rpimonitor/web/version.json" failed (2: No such file or directory), client: 192.168.1.9, server: , request: "GET /version.json HTTP/1.1", host: "192.168.1.7:8888", referrer: "http://192.168.1.7:8888/statistics.html"

It is true that a version.json doesn't exist, But why does the page works with the embedded webserver, but not with nginx.
Why is a version.json not created at startup of rpimonitor and how do I create it? I have not customized rpimonitor yet.

@XavierBerger
Copy link
Owner

After reading the detail of your issue, I conclude that there is a bug in RPi-Monitor around version.json.
This file (which could be virtual when embedded server is use) is generated when rpimonitord starts. This file is used to decrease the amount of data exchanged between server and client. If the client receive the same version, file it will get data form its local storage instead downloading from the server.
I need to review this feature when RPi-Monitor is used with and external server.

@TheUntouchable
Copy link

I have the same with apache2.. Any infos on that? With the embedded webserver it works, but I don't want to let everybody access my statuspage from the net :(

@XavierBerger
Copy link
Owner

I did modify rpimonitord to fix this bug. I didn't test it yet. If somebody needing this feature can test it from the commit listed upper, I would appreciate the feedbacks.

@TheUntouchable
Copy link

Thanks a lot :) Will try it the next days. Anything I should take care of when installing it with apache?

@XavierBerger
Copy link
Owner

The patch is very small so, I would advised to copy/paste the 4 line added into rpimonitord and restart the process.

@XavierBerger
Copy link
Owner

I did ( finally ;-) ) setup an environment to test RPi-Monitor with an externel server...
version.json is effectiely fixed but other bug raised. I'll fix them for 2.6 release.

XavierBerger added a commit that referenced this issue Mar 16, 2014
@XavierBerger
Copy link
Owner

Fixed in version 2.6

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

No branches or pull requests

3 participants