Error 500 when trying to Import XML

231 views
Skip to first unread message

Stephen Harding

unread,
Aug 3, 2020, 7:08:48 AM8/3/20
to AtoM Users
Hey everyone,

New to AtoM here, I'm running AtoM 2.5.3 on with Nginx on CentOS Linux 7.8.2003 after following the very useful Centos install guide.

When trying to Import XML in the browser at http://myhost/object/importSelect I get a standard AtoM 500 Internal Error message on post.

The Nginx /var/log/nginx/error.log states:

2020/08/03 11:13:18 [error] 1055#0: *8124 FastCGI sent in stderr: "PHP message: Could not connect to 127.0.0.1:4730" while reading response header from upstream, client: 10.64.193.206, server: specialcollections.ncl.ac.uk, request: "POST /index.php/object/importSelect HTTP/1.1", upstream: "fastcgi://unix:/run/php7.0-fpm.atom.sock:", host: "specialcollections.ncl.ac.uk", referrer: "https://specialcollections.ncl.ac.uk/index.php/object/importSelect?type=xml"

As it's reporting an issue with port 4730 I had believed this to be an issue with Gearman Job Server, however as far as I'm aware this is installed and configured correctly. However I've never used Gearman before so happy to be proved wrong! Is there a way to test this? By the way, everything is on the same server, which is why the "connection" issue baffled me. I've also tried with SELinux turned off as I know that often complicates things.

I have also tried restarting gearmand, php-fpm and atom-worker.

All work fine except the latter, when I look up the status of atom-worker I get the following:

● atom-worker.service - AtoM worker
   Loaded: loaded (/usr/lib/systemd/system/atom-worker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-08-03 11:49:19 BST; 4s ago
  Process: 17271 ExecStart=/opt/rh/rh-php70/root/bin/php -d memory_limit=-1 -d error_reporting="E_ALL" symfony jobs:worker (code=exited, status=1/FAILURE)
 Main PID: 17271 (code=exited, status=1/FAILURE)

Aug 03 11:49:17 specialcollections systemd[1]: Started AtoM worker.
Aug 03 11:49:17 specialcollections php[17271]: PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/rh/rh-php70/root/usr/lib64/php/modules/memcache.son' - /opt/rh/rh-php70/root/usr/lib64/php/modules/memcache.son: cannot open shared object file: No such file or directory in Unknown on line 0
Aug 03 11:49:19 specialcollections php[17271]: Couldn't connect to any available servers
Aug 03 11:49:19 specialcollections systemd[1]: atom-worker.service: main process exited, code=exited, status=1/FAILURE
Aug 03 11:49:19 specialcollections systemd[1]: Unit atom-worker.service entered failed state.
Aug 03 11:49:19 specialcollections systemd[1]: atom-worker.service failed.


When running yum install libmemcached it reports im already running the latest version.

So, I'm not sure where the problem lies, with German or Memcahced, or both?! Can anyone else experienced this or can point me in the right direction?

Many thanks in advance,
Stephen

Karl Goetz

unread,
Aug 3, 2020, 8:44:54 PM8/3/20
to AtoM Users
Hi Stephen,

The install instructions require manually building and installing memcache.son which is the file your error reports is missing.


Perhaps double check the file has been installed in the correct location and that 20-memcache.ini has been updated correctly.

thanks,
Karl.

From: ica-ato...@googlegroups.com <ica-ato...@googlegroups.com> on behalf of Stephen Harding <stephen...@ncl.ac.uk>
Sent: Monday, 3 August 2020 9:08 PM
To: AtoM Users <ica-ato...@googlegroups.com>
Subject: [atom-users] Error 500 when trying to Import XML
 
--
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/65dc71aa-2bbb-454f-98e6-ef97f21249edn%40googlegroups.com.



University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.

Stephen Harding

unread,
Aug 5, 2020, 3:57:06 AM8/5/20
to AtoM Users
Hi Karl,

Thank you for your message. I went through and did this, and was then getting a PHP error message about an unexpected "=" in the .ini file. Setting the file contents to extension=memcahce.so seemed to fix this.

When restarting the atom-worker now though, it trips up here:

● atom-worker.service - AtoM worker
   Loaded: loaded (/usr/lib/systemd/system/atom-worker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-08-05 08:49:28 BST; 4s ago
  Process: 8760 ExecStart=/opt/rh/rh-php70/root/bin/php -d memory_limit=-1 -d error_reporting="E_ALL" symfony jobs:worker (code=exited, status=1/FAILURE)
 Main PID: 8760 (code=exited, status=1/FAILURE)


Aug 05 08:49:26 specialcollections systemd[1]: Started AtoM worker.
Aug 05 08:49:28 specialcollections php[8760]: Couldn't connect to any available servers
Aug 05 08:49:28 specialcollections systemd[1]: atom-worker.service: main process exited, code=exited, status=1/FAILURE
Aug 05 08:49:28 specialcollections systemd[1]: Unit atom-worker.service entered failed state.
Aug 05 08:49:28 specialcollections systemd[1]: atom-worker.service failed.

I've seen other instances of a similar error message on this forum but nothing so far has helped me to fix it.

Many thanks,
Stephen

Dan Gillean

unread,
Aug 5, 2020, 10:43:42 AM8/5/20
to ICA-AtoM Users
Hi Stephen, 

When the atom-worker dies, it will automatically try to restart itself. To prevent it from getting caught in an infinite loop, we've added a restart limit - more than 3 restart attempts in 24 hours will trigger the limit. See:

I suggest you try the following to reset the fail counter: 
  • sudo systemctl reset-failed atom-worker
  • sudo systemctl restart atom-worker
You can then use sudo systemctl status atom-worker to ensure it's running properly. 

Cheers, 

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


Stephen Harding

unread,
Aug 7, 2020, 5:17:02 AM8/7/20
to AtoM Users
Hi Dan,

Thank you - I have tried this however with no luck.

I get the same error message which cites "symfony", and just after a little more digging around, I can't be certain that Symfony is installed on the sever as I can't see if anywhere in the filesystem and any commands aren't recognised. I'd followed the installation guide where there is no mention of it, nor on the tech requirements page so I always presumed it must be packaged in with one of the other dependancies.

Is there a way you can test to see if all the dependancies, namely symfony, are installed? Perhaps that is what is causing the worker to fail.

Apologies, I'm probably sounding really dumb, it's just a lot of this is new to me and don't want to break things (more) on the server :-)

Thanks again
Stephen

José Raddaoui

unread,
Aug 7, 2020, 6:37:44 AM8/7/20
to AtoM Users
Hi Stephen,

It looks like the first issue is with the Gearman server (not the AtoM worker):

Aug 03 11:49:19 specialcollections php[17271]: Couldn't connect to any available servers

Check for "gearmand" in the CentOS gist and here for Ubuntu. When the Gearman server is properly running you'll need to restart the worker, like Dan says if the restart limit was hit.

About the "symfony" executable, it leaves in the AtoM folder and that's indicated in the worker service with the "WorkingDirectory" path.

Best regards,
Radda.

Stephen Harding

unread,
Aug 10, 2020, 8:14:08 AM8/10/20
to AtoM Users
Hi Jose,

Thank you for your message.

I had followed the CentOS gist instructions when initially installing AtoM which was to install via yum, enable and start. If I run sudo systemctl status gearmand I get this below, which seems to indicate it is running ok (and always has been):

● gearmand.service - Gearmand distributed job system
   Loaded: loaded (/usr/lib/systemd/system/gearmand.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-08-10 12:50:43 BST; 12min ago
  Process: 26328 ExecStart=/usr/sbin/gearmand -d $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 26329 (gearmand)
   CGroup: /system.slice/gearmand.service
           └─26329 /usr/sbin/gearmand -d

Aug 10 12:50:43 specialcollections systemd[1]: Starting Gearmand distributed job system...
Aug 10 12:50:43 specialcollections systemd[1]: Started Gearmand distributed job system.


I've also read through the link you sent, and I've checked that config/gearman.yml is setup correctly. It's pointing to the default 127.0.0.1:4730. I also ran gearmand -p 4730 just to be sure it was indeed operating on that port still. After this I restarted gearmand followed by the reset-failed and restart on the atom-worker, but the status still remains:

● atom-worker.service - AtoM worker
   Loaded: loaded (/usr/lib/systemd/system/atom-worker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-08-10 12:55:15 BST; 13min ago
  Process: 26389 ExecStart=/opt/rh/rh-php70/root/bin/php -d memory_limit=-1 -d error_reporting="E_ALL" symfony jobs:worker (code=exited, status=1/FAILURE)
 Main PID: 26389 (code=exited, status=1/FAILURE)

Aug 10 12:55:12 specialcollections systemd[1]: Started AtoM worker.
Aug 10 12:55:15 specialcollections php[26389]: Couldn't connect to any available servers
Aug 10 12:55:15 specialcollections systemd[1]: atom-worker.service: main process exited, code=exited, status=1/FAILURE
Aug 10 12:55:15 specialcollections systemd[1]: Unit atom-worker.service entered failed state.
Aug 10 12:55:15 specialcollections systemd[1]: atom-worker.service failed.


Thanks for reminding me about executing symfony, Dan had mentioned this to me in an earlier post of mine.

Any ideas what I should try next? systemctl reports gearmand is running properly, but is there a gearmand command I can run so it can tell me it is running ok, and on which port etc? (Google wasn't any help)

Many thanks again,
Stephen

José Raddaoui

unread,
Aug 10, 2020, 11:50:31 AM8/10/20
to AtoM Users
Hi Stephen,

Looking at the guide you linked and other posts about installing Gearman in CentOS, I think you may be missing a PHP extension (php-pecl-gearman). You may find more information in the following posts/gists:


I hope that helps.

Stephen Harding

unread,
Aug 11, 2020, 5:35:45 AM8/11/20
to AtoM Users
Hi again Jose,

Thanks for your help again, I've followed the last URL you sent. The yum update, followed by yum install's all worked fine (installs reported "Nothing to do").

I was able to download gearman-1.1.2.tgz and phpize it but when I ran make it kicked out a whole bunch of errors :-(  I've included a snippet of them in the attached image but I also have the larger full screen of messages if it would help more.

The first error was

: error: unknown type name 'zend_object_value'  zend_object_value value;


gearman.png

Sorry, it's difficult to work out where to go next! Any further ideas?

Thanks
Stephen

José Raddaoui

unread,
Aug 11, 2020, 9:52:43 AM8/11/20
to AtoM Users
Hi Stephen,

If you run `php -v`, what Zend Engine and Zend OPcache versions show up? In my development environment I can see the following:

$ php -v
PHP 7.2.31 (cli) (built: May 15 2020 05:37:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.31, Copyright (c) 1999-2018, by Zend Technologies

This is with PHP 7.2 for AtoM 2.6 , so there may be different versions in your case, but I wonder if they're both installed. I don't know a lot about CentOS installs so I'm sorry I can't be more helpful, I hope someone else can follow-up if that's not the issue.

Best regards,
Radda.

Stephen Harding

unread,
Aug 11, 2020, 10:59:35 AM8/11/20
to AtoM Users
Hi Radda,

I get the following:

PHP Warning:  PHP Startup: Unable to load dynamic library 'gearman.so' (tried: /usr/lib64/php/modules/gearman.so (/usr/lib64/php/modules/gearman.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/gearman.so.so (/usr/lib64/php/modules/gearman.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.21 (cli) (built: Aug  4 2020 08:06:20) ( NTS )

Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.21, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.21, Copyright (c) 1999-2018, by Zend Technologies


Many thanks
Stephen

José Raddaoui

unread,
Aug 11, 2020, 2:13:58 PM8/11/20
to AtoM Users
Hi again Stephen,

I'm afraid I can't be more helpful with this particular issue. I'm inclined to thing there is a version mismatch between PHP dependencies, but I don't really know.

About using PHP 7.3, we have had good results so far running AtoM 2.6 with that PHP version, but AtoM 2.5.x supports 7.0 (in Xenial) and 7.2 (in Bionic). Considering all the issues, while 7.3 may work, you may want to try with one of those other versions and/or maybe try a different repository, like this one:


Bests,
Radda.

Stephen Harding

unread,
Aug 13, 2020, 5:49:06 AM8/13/20
to AtoM Users
Hi Radda,

Thank you again for your help, I will do some reading up on the topic you sent and also see if any colleagues experienced in Centos are able to help.

Of course, if anyone else on here has any advice please drop me a message!

I will post any updates.

Many thanks
Stephen
Reply all
Reply to author
Forward
0 new messages