<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
More on this.<br>
<br>
From the log:<br>
<br>
<blockquote>ArchivesSpaceThreadDump: Touch the file
'/usr/share/archivesspace/thread_dump_backend.txt' to trigger a
thread dump<br>
I, [2022-06-15T11:54:40.827499 #9472] INFO -- : Thread-2000:
Connecting to database:
jdbc:mysql://localhost:3306/archivesspace?user=[REDACTED]&password=[REDACTED]&useUnicode=true&characterEncoding=UTF-8.
Max c><br>
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new
driver class is `com.mysql.cj.jdbc.Driver'. The driver is
automatically registered via the SPI and manual loading of the
driver class is genera><br>
I, [2022-06-15T11:54:42.592887 #9472] INFO -- : Thread-2000: All
tables checked and confirmed set to UTF-8. Nice job!<br>
========================================================================<br>
A trace file has been written to the following location:
/usr/share/archivesspace/data/tmp/aspace_diagnostic_1655294083.txt<br>
<br>
This file contains information that will assist developers
in diagnosing<br>
problems with your ArchivesSpace installation. Please
review the file's<br>
contents for sensitive information (such as passwords) that
you might not<br>
want to share.<br>
========================================================================<br>
Jun 15, 2022 11:54:43 AM
org.eclipse.jetty.server.handler.ContextHandler$Context log<br>
INFO: An exception happened during JRuby-Rack startup<br>
undefined method `[]' for nil:NilClass<br>
--- System<br>
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 OpenJDK 64-Bit Server VM
25.312-b07 on 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 +jit
[linux-x86_64]<br>
Time: 2022-06-15 11:54:43 +0000<br>
Server: jetty/8.1.5.v20120716<br>
jruby.home: uri:classloader://META-INF/jruby.home<br>
</blockquote>
<br>
Indicates a deprecation in the JDBC call, AND YET it successfully
checks the tables and confirms they are set to UTF-8.<br>
<br>
I am using the latest MySQL Connector jar for this:
mysql-connector-java-8.0.29.jar for Ubuntu<br>
<br>
It's just so weird to me that the JDBC connection seems to be
working, yet "can't connect to backend". <br>
<br>
From the trace file:<br>
<br>
<blockquote> "exception": {<br>
"msg": "undefined method `[]' for nil:NilClass",<br>
"backtrace": [<br>
"uri:classloader:/record_inheritance.rb:31:in `block in
prepare_schemas'",<br>
"org/jruby/RubyArray.java:1735:in `each'",<br>
"uri:classloader:/record_inheritance.rb:16:in `block in
prepare_schemas'",<br>
"org/jruby/RubyHash.java:1350:in `each'",<br>
"uri:classloader:/record_inheritance.rb:15:in
`prepare_schemas'",<br>
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:108:in
`block in ArchivesSpaceService'",<br>
"/usr/share/archivesspace/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1411:in
`configure'",<br>
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:79:in
`<class:ArchivesSpaceService>'",<br>
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:39:in
`<main>'",<br>
"org/jruby/RubyKernel.java:956:in `require'",<br>
"uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55:in
`require'",<br>
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:1:in
`block in (root)'",<br>
"org/jruby/RubyBasicObject.java:1691:in `instance_eval'",<br>
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:4:in
`(root)'",<br>
"uri:classloader:/vendor/rack-1.6.8/rack/builder.rb:55:in
`<main>'",<br>
"launcher/launcher.rb:92:in `start_server'",<br>
"launcher/launcher.rb:157:in `main'",<br>
"launcher/launcher.rb:261:in `<main>'"<br>
]<br>
}<br>
}<br>
</blockquote>
<br>
Advice appreciated! Again, all I'm trying to do is duplicate our
ASpace in Vagrant.<br>
<br>
Mark<br>
<pre class="moz-signature" cols="72"><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
<a class="moz-txt-link-abbreviated" href="mailto:mcyzyk@jhu.edu">mcyzyk@jhu.edu</a>
Verba volant, scripta manent.
</pre>
<div class="moz-cite-prefix">On 6/11/22 17:08, Mark Cyzyk wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7ef40694-9b64-676c-ea32-0de4111db367@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
All,<br>
<br>
I am trying to duplicate our Archivesspace production app in a
local Vagrant box.<br>
<br>
I am getting an "unable to connect to backend" error when it
boots.<br>
<br>
I've checked to make sure the database is indeed present.<br>
<br>
I've checked permissions for the "archivesspace" user to the
"archivesspace" DB:<br>
<br>
<blockquote>
<blockquote>MariaDB [archivesspace]> SHOW GRANTS for
archivesspace@localhost;<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
| Grants for
archivesspace@localhost
|<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
| GRANT USAGE ON *.* TO `archivesspace`@`localhost` IDENTIFIED
BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |<br>
| GRANT ALL PRIVILEGES ON `archivesspace`.* TO
`archivesspace`@`localhost` WITH GRANT
OPTION |<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
2 rows in set (0.000 sec)<br>
<br>
MariaDB [archivesspace]><br>
</blockquote>
</blockquote>
<br>
Then I do same for 127.0.0.1:<br>
<br>
<blockquote>
<blockquote>MariaDB [archivesspace]> SHOW GRANTS for <a
class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:archivesspace@127.0.0.1" moz-do-not-send="true">archivesspace@127.0.0.1</a>;<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
| Grants for
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
href="mailto:archivesspace@127.0.0.1" moz-do-not-send="true">archivesspace@127.0.0.1</a>
|<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
| GRANT USAGE ON *.* TO `archivesspace`@`127.0.0.1` IDENTIFIED
BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |<br>
| GRANT ALL PRIVILEGES ON `archivesspace`.* TO
`archivesspace`@`127.0.0.1` WITH GRANT
OPTION |<br>
+----------------------------------------------------------------------------------------------------------------------+<br>
2 rows in set (0.000 sec)<br>
<br>
MariaDB [archivesspace]> <br>
</blockquote>
</blockquote>
<br>
I AM able to restore into the "archivesspace" database with:<br>
<br>
<blockquote>
<blockquote>sudo mysql -u archivesspace -pREDACTED archivesspace
< /vagrant/archivesspace_CURRENT.sql<br>
</blockquote>
</blockquote>
<br>
The connect string in my config.rb file:<br>
<br>
<blockquote>
<blockquote>AppConfig[:db_url] =
"jdbc:mysql://localhost:3306/archivesspace?user=archivesspace&password=REDACTED&useUnicode=true&characterEncoding=UTF-8"<br>
</blockquote>
</blockquote>
<br>
And yet I get the "unable to connect to backend" error. No fair!<br>
<br>
Advice in previous posts down through the years suggested this was
a permissions problem, or running MySQL on something other than
localhost/127.0.0.1, but I think what I've done above rules this
out.<br>
<br>
Are there other reasons why I might be getting the "unable to
connect to backend" error?<br>
<br>
Advice appreciated!<br>
<br>
Mark<br>
<br>
PS: I don't think this is relevant to the connection issue, but
here are the permissions I've set on the file system:<br>
<br>
<blockquote>
<blockquote>vagrant@vagrant:/usr/share/archivesspace$ ls -la<br>
total 84<br>
drwxr-xr-x 16 archivesspace archivesspace 4096 Jun 11 18:59 .<br>
drwxr-xr-x 122 root root 4096 Jun 11 18:59
..<br>
-rwxr-xr-x 1 archivesspace archivesspace 813 Jun 11 18:54
archivesspace.bat<br>
-rwxr-xr-x 1 archivesspace archivesspace 5364 Jun 11 18:53
archivesspace.sh<br>
drwxr-xr-x 4 archivesspace archivesspace 4096 Jun 11 18:53
clustering<br>
drwxr-xr-x 2 archivesspace archivesspace 4096 Jun 11 21:05
config<br>
-rwxr-xr-x 1 archivesspace archivesspace 665 Jun 11 18:53
COPYING<br>
drwxr-xr-x 9 archivesspace archivesspace 4096 Jun 11 18:59
data<br>
drwxr-xr-x 14 archivesspace archivesspace 4096 Jun 11 18:54
docs<br>
drwxr-xr-x 9 archivesspace archivesspace 4096 Jun 11 18:54
gems<br>
drwxr-xr-x 8 archivesspace archivesspace 4096 Jun 11 18:54
launcher<br>
drwxr-xr-x 2 archivesspace archivesspace 4096 Jun 11 18:59
lib<br>
drwxr-xr-x 4 archivesspace archivesspace 4096 Jun 11 18:53
locales<br>
drwxr-xr-x 2 archivesspace archivesspace 4096 Jun 11 18:59
logs<br>
drwxr-xr-x 22 archivesspace archivesspace 4096 Jun 11 18:54
plugins<br>
-rwxr-xr-x 1 archivesspace archivesspace 2326 Jun 11 18:53
README.md<br>
drwxr-xr-x 12 archivesspace archivesspace 4096 Jun 11 18:53
reports<br>
drwxr-xr-x 3 archivesspace archivesspace 4096 Jun 11 18:54
scripts<br>
drwxr-xr-x 3 archivesspace archivesspace 4096 Jun 11 18:54
stylesheets<br>
drwxr-xr-x 2 archivesspace archivesspace 4096 Jun 11 18:54
wars<br>
vagrant@vagrant:/usr/share/archivesspace$ <br>
</blockquote>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:mcyzyk@jhu.edu" moz-do-not-send="true">mcyzyk@jhu.edu</a>
Verba volant, scripta manent.
</pre>
</blockquote>
<br>
</body>
</html>