-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Bug]: grr serve -w don't works #552
Comments
@rsotolongo It looks like you're on a fairly old version of
Also it would be helpful to have the full content of the dashboard from Once you've tried with the latest version of grr and confirmed it's still an issue and provided the raw json blob for the dashobard, then we can continue to triage. |
I'm executing Grizzly from its latest Docker image and the result of execute: " 2025/01/14 19:51:04 grr version a2f73a8 The behavior is the same, I mean, the -w parameter don't watch for changes in dashboard files or not detect it. I don't know how the content of the dashboard could be relevant but here it is:
|
Ah interesting, I didn't realize you were running from a container. I've been able to reproduce the issue locally when running grr within a container. Thanks for sharing the dashboard. Let me step through the code to detect changes to the filesystem and see if anything obvious sticks out. @K-Phoen have you seen this behavior before? |
I don't copy dashboard files to the container, instead, I mount the volume "/root/resources" from my host computer (Windows 11). As you can see from original bug description, when the files are modified, they can be seen from the container ("cat /root/resources/test.json") but Grizzly don't detect them. |
I wouldn't expect -w to work within a container. As far as I understand, inotify doesn't work across the container/host boundary, so there's no way for Grizzly to register a meaningful watch on a file. It'd need to poll instead, which would (potentially) be much more expensive (if there's a lot of files). |
@malcolmholmes Thank you. Any suggestion to achieve the original intention? I mean, running Grizzly from a container and refreshing updates where dashboard files are modified in the host computer? I don't mind pressing F5 to refresh browser as long changes are reflected. |
Hi, I have the same problem. The problem with inotify is in WSL2 microsoft/WSL#4739 But I found some workarounds:
|
Grizzly Version
2025/01/08 19:14:04 grr version aaf77a3
Expected Behavior
Once Grizzly Server started (
grr serve -w ...
) and a file on disk within the directory identified is changed, the dashboard SHOULD be reloaded (refreshed at least).Actual Behavior
Dashboard remains unchanged.
Steps to Reproduce
cat /root/resources/test.json
grr serve -w /root/resources -l debug
Navigate to http://localhost:8080
Modify /root/resources/test.json
cat /root/resources/test.json
Please check the logs:
The text was updated successfully, but these errors were encountered: