Gearman failure to start

54 views
Skip to first unread message

Bob Higgie

unread,
Apr 2, 2024, 6:00:47 AMApr 2
to AtoM Users
Hi Dan, 
Appreciate your help with this as always. 
When I try to validate a CSV file I get a 500 Internal server error.
The log says that No Gearman worker available.
This is the atom-worker status:

 atom-worker.service - AtoM worker

     Loaded: loaded (/usr/lib/systemd/system/atom-worker.service; enabled; vendor preset: enabled)

     Active: activating (auto-restart) (Result: exit-code) since Tue 2024-04-02 09:40:43 UTC; 5s ago

    Process: 65491 ExecStart=/usr/bin/php7.2 -d memory_limit=-1 -d error_reporting=E_ALL symfony jobs:worker (code=exited, status=203/EXEC)

   Main PID: 65491 (code=exited, status=203/EXEC)


Apr 02 09:40:43 neptune systemd[65491]: atom-worker.service: Failed at step EXEC spawning /usr/bin/php7.2: No such file or directory

Apr 02 09:40:43 neptune systemd[1]: atom-worker.service: Main process exited, code=exited, status=203/EXEC


I am bemused by this as this is a fresh installation, following the instructions for Ubuntu 20.04.  The PHP version is 7.4 


php -v

PHP 7.4.3-4ubuntu2.20 (cli) (built: Feb 21 2024 13:54:34) ( NTS )

Copyright (c) The PHP Group

Zend Engine v3.4.0, Copyright (c) Zend Technologies

    with Zend OPcache v7.4.3-4ubuntu2.20, Copyright (c), by Zend Technologies


After getting this error for the first time I uninstalled and purged the german-job-server, then reinstalled it. I checked the atom-worker.service file referred to 7.4. But I get the same error. 


Jim Adamson

unread,
Apr 2, 2024, 8:14:21 AMApr 2
to ica-ato...@googlegroups.com
Hi Bob,

Maybe try to reload your unit files with:

sudo systemctl daemon-reload

Then try to restart the atom-worker service again. 

Thanks, Jim

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/c28fa7e1-3c86-4f7f-9a64-7568542d8c23n%40googlegroups.com.


--
Jim Adamson
Systems Administrator/Developer
Facilities Management Systems
IT Services
LFA/023 | Harry Fairhurst building | University of York | Heslington | York | YO10 5DD

Dan Gillean

unread,
Apr 2, 2024, 8:19:40 AMApr 2
to ica-ato...@googlegroups.com
Hi Bob, 

It could be that you need to manually reset the job scheduler's fail counter for the restart to work as intended. 

Basically, when we first started implementing Gearman, we found all kinds of scenarios where it would halt unexpectedly, and a  simple restart could resolve the issue. However, in some cases this wouldn't work, and including auto-restart attempts meant that the job scheduler would get caught in an endless loop of restarting, failing, and attempting to restart again. 

To try and strike a balance between automated restarts and avoiding endless loops, we have added a fail counter - this prevents more than 3 restart attempts in a 24 hour period. When this limit is reached, then the fail counter must be manually reset before restarting will work. 

You can reset this with: 
  • sudo systemctl reset-failed atom-worker
You can then try starting the atom-worker again: 
  • sudo systemctl start atom-worker
You can also check the worker status with: 
  • sudo systemctl status atom-worker
See: 
Hopefully it's as simple as that! Let us know how it goes. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Bob Higgie

unread,
Apr 2, 2024, 8:29:52 AMApr 2
to ica-ato...@googlegroups.com
Thanks Jim and Dan,
Regrettably no. Still fails with this /usr/bin/php7.2: No such file or directory 

You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/6tk1VwRq3A4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/CAC1FhZKj04-30wkD%2BM_kHts3K47OCdRsvoZLLRzP5BvAe8FgGg%40mail.gmail.com.

Dan Gillean

unread,
Apr 2, 2024, 8:43:23 AMApr 2
to ica-ato...@googlegroups.com
Hi Bob, 

Okay, we're going to have to dig in a bit more, it seems. 

The first thing I notice is the mention of PHP 7.2 in that filepath. You say this is a fresh Ubuntu 20.04 installation, with PHP 7.4 installed. Can you tell me: 
  • What is the full atom version number returned when you run php symfony tools:get-version from AtoM's root installation directory?
  • Was this a fresh, EMPTY installation? Or an upgrade from a previous version?
  • If an upgrade, can you tell me more about HOW you upgraded, and from what previous version? i.e. typically our Upgrade instructions involve installing a brand new version of AtoM alongside an old one, loading your data, and then running the upgrade task and restarting some services. Is this what you did? Or was there an attempt to sort of "upgrade in place"?
The main thing I would suggest checking would be the service file created at /usr/lib/systemd/system/atom-worker.service as part of the installation. This file specifies the ExecStart path, which SHOULD be /usr/bin/php7.4, and not 7.2. See the sample config block in the docs here: 
If you do in fact find errors here, then you should be able to use the example in the documentation to fix them. If you make changes, I would suggest that you reset the fail counter again, restart the atom-worker, and also clear the application cache and restart PHP-FPM before testing again. 

Once again, let us know what you find and how it goes!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Bob Higgie

unread,
Apr 2, 2024, 8:56:22 AMApr 2
to ica-ato...@googlegroups.com
Hi Dan,
Fixed! 
Just changed 7.2 to 7.4 in that file.
Many thanks. 
Bob. 

Dan Gillean

unread,
Apr 2, 2024, 9:12:07 AMApr 2
to ica-ato...@googlegroups.com
Great! Glad it was that easy :)

Thanks for updating us!

Cheers, 
Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages