-
Notifications
You must be signed in to change notification settings - Fork 23
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
tntsearch-index scheduler failure #81
Comments
have you tried running it manually with:
|
Yes, It's working
|
If you are running on Grav 1.7RC there's an unreleased fix in the develop branch. If you are running PHP 7.4, there might still be some issues. |
This is a classic case where your webserver is running under another user (perhaps |
I came across this problem as well. It looks like it is because I'm not sure if the Grav core should be initialising pages when the scheduler is run, or whether it should be done in the plugin. And I don't know enough about how Grav works to know what call needs to be made to initialise the pages. It looks like events need to be fired etc, so it's not just a matter of calling My temporary solution is to run |
Actually, after closer review it looks like the issue ragoon82 was having it different than mine. The job status is success for me but no pages were indexed when the scheduler ran. Pages were only indexed when I ran |
I went ahead and filed issue #95 for the problem I'm seeing, as I'm pretty sure it's not that same as this issue. |
Arguments need to be passed as an array since passing shell commands as a string to the Process component is deprecated since Symfony 4.2. Related Grav fix which is also needed for this patch to work properly: getgrav/grav@1661dc9 This also finally fixes issue #81.
This should be fixed now. |
Grav v1.7.3 - Admin v1.10.2 sorry to resurrect this issue, I'm facing an error with the plugin scheduled re-index 👍
|
@Ribero that is not an issue with TNTSearch plugin. The plugin uses a CLI from Grav so you should first try to find out why "/usr/bin/env php" doesn't return anything in your environment. Keep in mind that scheduled tasks under Grav could be run under different user. |
Thanks for the input. I can run the index command in CLI with success :
All other task scheduled works correctly |
env is a part of coreutils on Linux systems. Grav CLI uses it to detect correct PHP version so you should try "runuser -u www-data bin/plugin tntsearch index" If you specify PHP binary in this command yourself you do not repeat what Grav does. |
I use the official grav docker image and did not changed anything. I activated the scheduling from plugin prefs using Admin Panel.
How to configure the plugin so it use the correct settings ?
|
I'm not familiar with Grav's docker image, you should check with them. The image is probably missing coreutils. |
Sorry but I don't get it:
So sorry to reiterate but how to enable the plugin scheduler feature ? I feel it should work flawlessly with a vanilla grav instance. I did not made any fancy customization and that is one of the benefits of the container approach: stable and reproducible. |
Does running scheduler with "runuser -u www-data bin/plugin tntsearch index" work? (notice a difference from your command earlier) What does "runuser -u www-data /usr/bin/env php -v" return? |
I use
I think we should not focus on runuser command |
try If grav-plugin-tntsearch/tntsearch.php Line 119 in 7836c86
Maybe your crontab is running under different user than www-data without env or php in the path? |
Hi,
I am trying run tnsearch plugin via scheduler job but receive an error.
Error description not showing and job status is failure.
Manually tnsearch plugin is working correct.
How can I solve this problem?
This is scheduler run from console:
The text was updated successfully, but these errors were encountered: