Getting 500 Internal Server Error. 2.2, Linux clean install as per instructions

1,336 views
Skip to first unread message

Joel R Smith

unread,
Jul 13, 2015, 2:32:03 PM7/13/15
to ica-ato...@googlegroups.com
So I followed the instructions exactly as they were given. I copied and pasted almost all of the commands.

I chose the nginx webserver option, and I installed all of those "other options".

This is a brand-new Ubuntu 14.04 vm box.

I'm not that experienced in Linux.

What are some troubleshooting steps I can take?

Thanks.

Sarah Romkey

unread,
Jul 13, 2015, 3:40:55 PM7/13/15
to ica-ato...@googlegroups.com
Hello Joel,

Do you mean when you enter your URL you get a 500 server error immediately, or only when you navigate to a certain page or perform a specific operation?

To help diagnose the problem, I would take a look in the web server logs and see if you see any errors. Here is a link describing how to do that with nginx:

https://www.accesstomemory.org/en/docs/2.1/admin-manual/maintenance/logging/#web-server-logs

Let us know what you see there and hopefully we can start the trouble-shooting process!

Cheers,

Sarah

Sarah Romkey, MAS,MLIS
Systems Archivist
Artefactual Systems
604-527-2056
@archivematica / @accesstomemory



--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/8dda97cd-be3f-430b-9929-24413979c866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel R Smith

unread,
Jul 13, 2015, 4:31:13 PM7/13/15
to ica-ato...@googlegroups.com
Yes, I get a 500 server error immediately when I go to the main url (http://192.168.100.101)

Here is one of the error messages from the log (all errors look the same)

2015/07/13 13:55:46 [error] 755#0: *8 FastCGI sent in stderr: "PHP message: Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)]" while reading response header from upstream, client: 192.168.100.99, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.atom.sock:", host: "192.168.100.101"

José Raddaoui

unread,
Jul 13, 2015, 4:49:09 PM7/13/15
to ica-ato...@googlegroups.com
Hi Joel,

It looks like you didn't set the password for the MySQL 'root' user in the web installer.

Regards.

Joel R Smith

unread,
Jul 13, 2015, 5:07:04 PM7/13/15
to ica-ato...@googlegroups.com
I can't access the web installer...I get the 500 server error when I open the main url.

José Raddaoui

unread,
Jul 13, 2015, 5:09:11 PM7/13/15
to ica-ato...@googlegroups.com
Try deleting the following file in your AtoM folder:

config/config.php

José Raddaoui

unread,
Jul 13, 2015, 5:12:44 PM7/13/15
to ica-ato...@googlegroups.com
You may need to re-create the database too:

mysql -h localhost -u root -p -e "DROP DATABASE atom;"
mysql -h localhost -u root -p -e "CREATE DATABASE atom CHARACTER SET utf8 COLLATE utf8_unicode_ci;"

Using your database name.

Joel R Smith

unread,
Jul 13, 2015, 5:57:20 PM7/13/15
to ica-ato...@googlegroups.com
Thanks, it worked after renaming that file. Any idea what could have caused that?

José Raddaoui

unread,
Jul 13, 2015, 7:34:34 PM7/13/15
to ica-ato...@googlegroups.com
My first thought was that the password field for MySQL wasn't populated in that step of the installer the first time.

Regards.

grupocnpqd...@gmail.com

unread,
Jul 14, 2015, 10:10:07 AM7/14/15
to ica-ato...@googlegroups.com

   Hi all,

   We have experimented the same error, than deleted the file config.php at the atom folder, and than the installer at localhost works, but now we have the error in the installer:

The following errors must be resolved before you can continue the installation process:

  • Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)]

   We have too re-created the database, and an special care for password and not works.

   Any idea?

[]s
ICA-AtoM UFSM Researchers
grupocnpqd...@gmail.com

Gomes Silva

unread,
Jul 16, 2015, 12:08:08 PM7/16/15
to ica-ato...@googlegroups.com
Hello,

This "500 Internal Server Error" also happened to me in 2.2.0 version (2.1.2 worked fine). The problem occurs in both Windows and Ubuntu OS.
I'm using Ubuntu 14.04 x32, Ubuntu 14.04 x64, Windows8 x64 and so far, this is what I tried and seemed to have worked: 


Workaround in Ubuntu:
After following AtoM's instructions you will get a 505 error. As said in this thread just rename or remove  /usr/share/nginx/atom/config/config.php. Now it will appear another error (Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied), so on Terminal type:

sudo su
sudo chown -R www-data:www-data /usr/share/nginx/atom/uploads
sudo service php5-fpm restart


Workaround in Windows:
In version 2.1.2 if you placed AtoM's files directly in WAMP's WWW folder or the original AtoM's folder without modifying its name (e.g. <atom-2.1.2>) you just had to type "localhost" in browser to start it. However if you place Atom's folder with another name (e.g. just <atom>) it would give a 505 error.

Now in 2.2.0 version, no matter how files or folders are placed in WAMP's WWW folder you will get a 505 error, so all you have to do is paste http://localhost/<foldername_ifexists>/index.php/sfInstallPlugin/Checksystem in your browser to start installing Atom.




I didn't have time to test everything, so this might not solve everything, but I hope this helps.

Sarah Romkey

unread,
Jul 16, 2015, 2:03:08 PM7/16/15
to ica-ato...@googlegroups.com
Thank you very much for this report! I'm going to make sure the development team here takes a look at our installation documentation in case there is something that can be revised to prevent these errors from occurring.

Cheers,

Sarah 

Sarah Romkey, MAS,MLIS
Systems Archivist
Artefactual Systems
604-527-2056
@archivematica / @accesstomemory



Bruno Freitas

unread,
Jul 17, 2015, 7:25:13 PM7/17/15
to ica-ato...@googlegroups.com
Dear Sarah,

I think that there is some problem in getvalues on plugins/sfInstallPlugin. Because, I did some testing and the form Database configuration isn't sending the values.
In first time, I didn't change the standard values (database: atom, username: root) and I typed my password only. It doesn't work!
So, I tried to use other the username. I attached the error for help you. You can see the Access denied for user 'root', but I was testing other user ('admin') and a password.



Best regards,
Bruno Freitas
error_configurationdatabase.png

Sarah Romkey

unread,
Jul 20, 2015, 6:21:10 PM7/20/15
to ica-ato...@googlegroups.com
Thank you Bruno, this is very helpful. One of our developers is going to take a closer look at these issues soon, and we'll update the user forum and our documentation when we have some more information.

Cheers,

Sarah

Sarah Romkey, MAS,MLIS
Systems Archivist
Artefactual Systems
604-527-2056
@archivematica / @accesstomemory



Bruno Freitas

unread,
Jul 21, 2015, 10:41:15 AM7/21/15
to ica-ato...@googlegroups.com
Hi Sarah,

I restarted the service php5-fpm in Database Configuration form and the installation worked. 
I'm using AtoM in Ubuntu/Linux and I used the command XXXXX@XXXX:~$ sudo restart php5-fpm  to restart.
 

Best regards,
Bruno Freitas

Gregory Bevilaqua

unread,
Jul 28, 2015, 3:21:19 PM7/28/15
to ICA-AtoM Users, joelr...@gmail.com
Hi Sara and Bruno,

I was with the same problem of Bruno, and decided in the same way restarting PHP: sudo restart php5-fpm

Good Luck and Thank you

andybe...@gmail.com

unread,
Nov 15, 2015, 9:39:24 AM11/15/15
to ICA-AtoM Users
I have this problem too.

Clean install on a stand-alone AMD64 machine, following the installation instructions, then the Firewall document, then following the suggestions in this topic.

I am at the "http://localhost/index.php/sfInstallPlugin/configureSearch" screen, and get:
   Can't connect to the server (Failed to connect to localhost port 9200: Connection refused)

I also get:
   Nov 15 12:40:37 HARCATOM elasticsearch[732]: [warning] /etc/init.d/elasticsearch: No java runtime was found
as one of the lines in the status of elasticsearch server,  even though I have set $JAVA_HOME to the Java installation directory (/usr/lib/jvm/java-7-oracle).  None of the many suggestions on the web has worked.

I am attempting to set up AtoM for my local Archives Centre to trial;  I am a volunteer there.  I have considerable experience writing end-user software (for money!) but minimal experience of administering a GNU/Linux installation.

Help would be much appreciated.

David Juhasz

unread,
Nov 16, 2015, 1:36:12 PM11/16/15
to ica-ato...@googlegroups.com
Hi,

Please try the following commands, and report the output:

java -version
which java

Thanks,
David

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

Andrew Bewick

unread,
Nov 17, 2015, 4:50:19 AM11/17/15
to ica-ato...@googlegroups.com
David,
the result is:

rab@HARCATOM:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
rab@HARCATOM:~$ which java
/usr/bin/java

which is a link to : /etc/alternatives/java
which is a link to: /usr/lib/jvm/java-8-oracle/jre/bin/java

However:
rab@HARCATOM:~$ echo $JAVA_HOME
/usr/lib/jvm/java-7-oracle

I uninstalled Java 7 after my post.

Something is not keeping up, because I discovered "export -p", which includes:
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-7-oracle/bin:/usr/lib/jvm/java-7-oracle/db/bin:/usr/lib/jvm/java-7-oracle/jre/bin"
and
declare -x J2REDIR="/usr/lib/jvm/java-7-oracle/jre"
declare -x J2SDKDIR="/usr/lib/jvm/java-7-oracle"
declare -x JAVA_HOME="/usr/lib/jvm/java-7-oracle"

I shall keep looking for solutions, but if you can point me to one that would be useful.

Thanks

Andy
 



David Juhasz

unread,
Nov 17, 2015, 12:47:20 PM11/17/15
to ica-ato...@googlegroups.com
Hi Andy,

Are you running Ubuntu?  If so, I would try installing from the PPA listed as the top answer in this Stack Overflow thread:
http://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04


Best regards,
David



--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

andybe...@gmail.com

unread,
Nov 17, 2015, 1:57:31 PM11/17/15
to ICA-AtoM Users
David,
I did a clean install of Ubuntu 15.10, having cleared the disc.
I followed the instructions on the excellent Linux 2.2 page.
As part of that process I installed Java from
ppa:webupd8team/java
and Java 1.8 is now the only copy of Java on the machine.

Here is the terminal output of the various versions and status.
rab@HARCATOM:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

rab@HARCATOM:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
rab@HARCATOM:~$ which java
/usr/bin/java
rab@HARCATOM:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
rab@HARCATOM:~$ service elasticsearch status
● elasticsearch.service - LSB: Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch)
Active: active (exited) since Tue 2015-11-17 18:17:29 GMT; 9min ago
Docs: man:systemd-sysv-generator(8)
Process: 697 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Nov 17 18:17:28 HARCATOM systemd[1]: Starting LSB: Starts elasticsearch...
Nov 17 18:17:29 HARCATOM elasticsearch[697]: [warning] /etc/init.d/elasticsearch: No java runtime was found
Nov 17 18:17:29 HARCATOM systemd[1]: Started LSB: Starts elasticsearch.
rab@HARCATOM:~$

Does it help to say that on the configure search page setting '
Search host' field to "127.0.0.0" instead of "localhost" returns just:
Can't connect to the server ().
with no mention of port 9200.
I am prepared to restart the whole Ubuntu/AtoM install process, checking carefully as I go on, if that will help to determine whether
it is my finger trouble causing the problem.

Would it be useful to install Ubuntu 14.04 instead of 15.10? in case that is the cause.

Regards,
Andy
PS this is the sort of thing that could happen to you when you retire from paid work, if you are not careful about what you say!

David Juhasz

unread,
Nov 17, 2015, 2:07:42 PM11/17/15
to ica-ato...@googlegroups.com
Hi Andy,

Can please try opening the /etc/init.d/elasticsearch file with a text editor (nano is a good CLI editor) and look for the following lines:

# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/default-java"


Then update the default paths to match your java install, save the file, and try starting Elasticsearch again. I've got my fingers crossed for you. :)


Cheers,
David



--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

andybe...@gmail.com

unread,
Nov 17, 2015, 3:23:10 PM11/17/15
to ICA-AtoM Users

David,

couldn't find the lines you quoted, but did find this:

. /usr/share/java-wrappers/java-wrappers.sh
find_java_runtime openjdk8 oracle8 openjdk7 oracle7 openjdk6 sun6 default
export JAVA_HOME

so I deleted all but oracle8, but still getting the "No java runtime was found" warning, and still not connecting to the server.
I looked at
java-wrappers.sh and jvm-list.sh.  I am not fluent in shellscript, but found the "no runtime found" warning.  Looks over-complicated to me - but that's flexibility for you!  Couldn't find a java debug log, which might help.

It is now 8:15 pm here in Britain; my elderly brain is tiring. I'll pick this up in the morning.

Thanks for taking the time to help. 

Regards,

Andy

David Juhasz

unread,
Nov 17, 2015, 4:09:16 PM11/17/15
to ica-ato...@googlegroups.com
Hi Andy,

Hmm maybe check /etc/environment and /etc/profile.d/ for your system wide PATH definition (See: https://help.ubuntu.com/community/EnvironmentVariables#System-wide_environment_variables).

Cheers,
David


--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

andybe...@gmail.com

unread,
Nov 19, 2015, 5:00:54 PM11/19/15
to ICA-AtoM Users
David,

the good news is that AtoM is now running on Debian 8.2  :-)

I did as you suggested in your last post (on Ubuntu), and everything looked as if it should work - all the right things in all the right places.

I was able to set up the search host by calling the Search host 127.0.0.1 instead of localhost - no port 9200 access denied.

I shall stick with the Debian installation for the time being;  I expect to be busy trying to populate the database from the various Spreadsheets and databases that are at present in use.

Thanks again for your time.

Andy

David Juhasz

unread,
Nov 19, 2015, 5:15:51 PM11/19/15
to ica-ato...@googlegroups.com
Hi Andy,

That is good news! I'm glad you got it working and I wish you the best with loading your data!

Best regards,
David

--

David Juhasz
Director, AtoM Technical Services Artefactual Systems Inc. www.artefactual.com

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages