-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bag database sometimes stops scanning for new files #95
Comments
can we do something about that or is this repo dead? |
It's not dead, but I also haven't had time to dedicate to it in a while and also haven't been able to reproduce this reliably enough to diagnose it. If somebody else has time to look into this or is able to determine the conditions necessary to reproduce it, that would be welcome. |
Hello, I have the same issues after moving to a new server |
You could probably use curl or wget to call the API via cron and trigger a scan. You could use the developer panel in your web browser to get the URL it's calling when you click the button to do a manual search, and then try calling that. You may also need to authenticate with curl/wget, but I haven't tried doing that before... |
Hello,
But in the authentication step I get
|
I think that if you're not using LDAP, the URL to # will be slightly different; try this instead:
If that works, let me know and I'll update the documentation to indicate it. |
Hello, (Plan for long term is to use ldaps anyway, but there I also have issues, see #116 ) |
All right, I think I've figured out what's going on here -- first, I think I might've made a typo in my original example, I need to double-check it against an LDAP database, but I think it's not getting the right value for the CSRF token -- and also, it looks like after logging in as an admin, the server issues a new CSRF token, and that invalidates the original. So actually, the steps should be:
If it works, curl won't print any output, but the bag database's log file should indicate that it's scanning. That works for me, let me know if it works for you and I'll go through the documentation and make sure it's all correct. |
ah I got a little bit further:
|
That's interesting; in my test environment, I actually have it running at |
|
One thing I do notice there is that it looks like you're running an old version (2.3); I don't know for sure if it's related, but I fixed some authentication-related bugs in 3.0 that could be preventing it from working properly. I also just made a new release (3.1.0) that adds an environment variable that can be used to change the path the container uses to serve the application, |
It works with the new version 👍 But then I have at least a work around for this issue |
That's a good point, I think it would make sense to be able to disable uploading and possibly other capabilities (such as editing mutable fields or running scripts) for unauthenticated users. I'll make a new issue for that -- I think that version 3.0 actually fixed the bug that originally caused this issue, anyway, and the API should now be documented well enough that it's possible to force it to scan. |
It seems like if the database encounters a SQL exception when parsing and inserting a new bag file, that can kill the thread that scans for new files, and that will prevent it from picking up new files again until it's restarted. I haven't reliably reproduced this yet, but I have seen it multiple times.
The text was updated successfully, but these errors were encountered: