Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

ActionQueue is not running #7008

Closed
landei16 opened this issue Feb 27, 2019 · 18 comments
Closed

ActionQueue is not running #7008

landei16 opened this issue Feb 27, 2019 · 18 comments

Comments

@landei16
Copy link

This is with reference to #6956
My Installation (2018.02.7) is running well but ActionQueue is not getting processed at all.
It´s switched on in the settings to use REDIS but no Meetingacceptence, etc. is send out by the system.

Can you please help me getting Action Queue running.

An upgrade is currently not possible as im still running on Ubuntu 14.04 and an OS upgrade is not possible yet bit in 10 weeks.

Thanks for your help and best regards

Landei

@paulmhh
Copy link
Contributor

paulmhh commented Feb 27, 2019

first you need to understand that tine20 only fills the ActionQueue, if you want it to be processed, you have to take care of that for yourself. You need to setup a daemon executing tine20/worker.php

easiest solution is not to use the ActionQueue, otherwise, read the resources that are available and get it working yourself

@landei16
Copy link
Author

That is fine - problem is that worker.php run into an issue:
PHP Parse error: syntax error, unexpected '.', expecting ')' in /var/www/mail/tine20/Tinebase/ActionQueue/Worker.php on line 36

Parse error: syntax error, unexpected '.', expecting ')' in /var/www/mail/tine20/Tinebase/ActionQueue/Worker.php on line 36

For me it´s fine to run the action Queue once per hour for example so starting the php out of the crontab. But the worker script is not running...

@paulmhh
Copy link
Contributor

paulmhh commented Feb 27, 2019

line 36 is the default config array, I guess you changed something there.

git checkout 2018.02.7
php -l ./tine20/Tinebase/ActionQueue/Worker.php
No syntax errors detected in ./tine20/Tinebase/ActionQueue/Worker.php

also a brief look at line 36 shows everything is fine. Either the packages don't contain the code that is tagged in git or you broke that yourself.

hope this helps

@paulmhh paulmhh closed this as completed Feb 27, 2019
@landei16
Copy link
Author

OK - in which file do i have to do the config? Redis.ini???

@paulmhh
Copy link
Contributor

paulmhh commented Feb 27, 2019

'configfile' => '/etc/tine20/actionQueue.ini', there?

@landei16
Copy link
Author

The worker itself is now running and logging into the worker.log - here i got the next issue
#1 /var/www/mail/tine20/worker.php(20): Tinebase_ActionQueue_Worker->run()
#2 {main}
2019-02-27T10:23:09+00:00 CRIT (2): Tinebase_ActionQueue_Worker::_childTerminated::238 job 668dbfcecd20032bc300d335306a142336bd4a52 in pid 12283 did not finish successfully. Will be rescheduled!
2019-02-27T10:23:09+00:00 CRIT (2): Tinebase_ActionQueue_Worker::run::149 could not execute job : Calendar.sendEventNotifications
2019-02-27T10:23:09+00:00 CRIT (2): Tinebase_ActionQueue_Worker::run::150 could not execute job : Problem during execution with shell: Could not open input file: /var/www/mail/tine20.php
2019-02-27T10:23:09+00:00 CRIT (2): Tinebase_ActionQueue_Worker::run::151 could not execute job : #0 /var/www/mail/tine20/Tinebase/ActionQueue/Worker.php(143):

@paulmhh
Copy link
Contributor

paulmhh commented Feb 27, 2019

reading helps:
Problem during execution with shell: Could not open input file: /var/www/mail/tine20.php

@landei16
Copy link
Author

landei16 commented Feb 27, 2019

You´re right - i missed to mention that the file is paced there and accessible - authorization is 777 (for testing purposes. I also tried a copy of the file and changed the config win ../ActionQueue/Worker.php. Nothing helps...

@paulmhh
Copy link
Contributor

paulmhh commented Feb 27, 2019

did you look at your php config, safe_mode, anything exec related?

@landei16
Copy link
Author

Have not found anything curious - all other php scripts are running well, i don´t know why opening the file is failing all the time...

@pschuele
Copy link
Member

is it possible to run something like "php /var/www/mail/tine20.php" (as the same user that is running the worker process)?

@landei16
Copy link
Author

the service worker.php is running, but not doing anything (just filling the logs like mentioned above).

@paulmhh
Copy link
Contributor

paulmhh commented Mar 20, 2019

that is not an answer to the question, pls answer it (so probably understand it first, then answer)

@landei16
Copy link
Author

Hello paulmhh - in my note 20 days ago i mentioned, that all other scripts are running as expected. The worker.php is also running and stays active but the logs showing me that something is wrong in tine20.php. Calling the same always shows the help file (even --dry e.g. is used):
host ./tine20.php -d
Usage: ./tine20.php [ options ]
--help|-h Display this help Message
--verbose|-v Output messages
--config|-c Path to config.inc.php file
--dry|-d Dry run - don't change anything
--info|-i Get usage description of method
--method Method to call [required]
--username Username
--password Password
--passwordfile Name of file that contains password

Don´t be so angry with me - i just want to help making things running :-)

@paulmhh
Copy link
Contributor

paulmhh commented Mar 20, 2019

the action queue worker is just working fine (well, actually... but lets keep it simple: it is working, believe me, it is)

pschuele questions was: which user is executing the worker.php? Can that user also execute tine20.php? (-i or -h is fine, -d alone is pointless, but that works too, just getting the usage message is all you want to achieve here), pls also note the path to the php binary, maybe its different on your system?

again, consider not using the action queue

@landei16
Copy link
Author

In my first tests i used "root" to run the worker.php with the result above. After Upgrade to 2018.02 it is still the same - worker.php is running but in the logfile i see errors above. Using www-data user (user which runns Tine Scripts usually) brings the following error:
root@mail /var/www/mail/tine20 # sudo -u www-data php ./worker.php
root@mail /var/www/mail/tine20 # PHP Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/var/log/tine20/worker.log" cannot be opened with mode "a"' in /var/www/mail/tine20/vendor/zendframework/zendframework1/library/Zend/Log/Writer/Stream.php:81
Stack trace:
#0 /var/www/mail/tine20/library/Console/Daemon.php(179): Zend_Log_Writer_Stream->__construct('/var/log/tine20...')
#1 /var/www/mail/tine20/library/Console/Daemon.php(77): Console_Daemon->_getLogger()
#2 /var/www/mail/tine20/Tinebase/ActionQueue/Worker.php(70): Console_Daemon->__construct(NULL)
#3 /var/www/mail/tine20/worker.php(19): Tinebase_ActionQueue_Worker->__construct()
#4 {main}
thrown in /var/www/mail/tine20/vendor/zendframework/zendframework1/library/Zend/Log/Writer/Stream.php on line 81

Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/var/log/tine20/worker.log" cannot be opened with mode "a"' in /var/www/mail/tine20/vendor/zendframework/zendframework1/library/Zend/Log/Writer/Stream.php:81
Stack trace:
#0 /var/www/mail/tine20/library/Console/Daemon.php(179): Zend_Log_Writer_Stream->__construct('/var/log/tine20...')
#1 /var/www/mail/tine20/library/Console/Daemon.php(77): Console_Daemon->_getLogger()
#2 /var/www/mail/tine20/Tinebase/ActionQueue/Worker.php(70): Console_Daemon->__construct(NULL)
#3 /var/www/mail/tine20/worker.php(19): Tinebase_ActionQueue_Worker->__construct()
#4 {main}
thrown in /var/www/mail/tine20/vendor/zendframework/zendframework1/library/Zend/Log/Writer/Stream.php on line 81

@paulmhh
Copy link
Contributor

paulmhh commented Mar 20, 2019

ls -l /var/log/tine20/worker.log
ls -al /var/log/tine20/
(es kommt hier auf . bzw. das tine20 verzeichnis selbst an, www-data braucht schreibrechte)

wenn du dir die Fehlermeldungen durchliest, steht da ja alles drin... '"/var/log/tine20/worker.log" cannot be opened with mode "a"'

@paulmhh
Copy link
Contributor

paulmhh commented Mar 20, 2019

wahrscheinlich gehört das file root, weil du es im ersten anlauf als root hast laufen lassen

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

No branches or pull requests

3 participants