Re: [Archivesspace_Users_Group] Vagrant: "unable to connect to backend" error

2022-06-16 Thread Blake Carver
> Indicates a deprecation in the JDBC call, AND YET it successfully checks the 
> tables and confirms they are set to UTF-8.
> I am using the latest MySQL Connector jar for this:  
> mysql-connector-java-8.0.29.jar for Ubuntu

Yep, that's fine I think.


> It's just so weird to me that the JDBC connection seems to be working, yet 
> "can't connect to backend".

The problem is " undefined method `[]' for nil:NilClass " it's expectig a value 
there and it's not getting one. Did something change in the DB? Upgrade or 
something else that changed things?


From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
 on behalf of Mark 
Cyzyk 
Sent: Wednesday, June 15, 2022 9:01 AM
To: Archivesspace Users Group 
Subject: Re: [Archivesspace_Users_Group] Vagrant: "unable to connect to 
backend" error


More on this.

>From the log:

ArchivesSpaceThreadDump: Touch the file 
'/usr/share/archivesspace/thread_dump_backend.txt' to trigger a thread dump
I, [2022-06-15T11:54:40.827499 #9472]  INFO -- : Thread-2000: Connecting to 
database: 
jdbc:mysql://localhost:3306/archivesspace?user=[REDACTED]=[REDACTED]=true=UTF-8.
 Max c>
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>
I, [2022-06-15T11:54:42.592887 #9472]  INFO -- : Thread-2000: All tables 
checked and confirmed set to UTF-8.  Nice job!
  
  A trace file has been written to the following location: 
/usr/share/archivesspace/data/tmp/aspace_diagnostic_1655294083.txt

  This file contains information that will assist developers in diagnosing
  problems with your ArchivesSpace installation.  Please review the file's
  contents for sensitive information (such as passwords) that you might not
  want to share.
  
Jun 15, 2022 11:54:43 AM 
org.eclipse.jetty.server.handler.ContextHandler$Context log
INFO: An exception happened during JRuby-Rack startup
undefined method `[]' for nil:NilClass
--- System
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]
Time: 2022-06-15 11:54:43 +
Server: jetty/8.1.5.v20120716
jruby.home: uri:classloader://META-INF/jruby.home

Indicates a deprecation in the JDBC call, AND YET it successfully checks the 
tables and confirms they are set to UTF-8.

I am using the latest MySQL Connector jar for this:  
mysql-connector-java-8.0.29.jar for Ubuntu

It's just so weird to me that the JDBC connection seems to be working, yet 
"can't connect to backend".

>From the trace file:

 "exception": {
"msg": "undefined method `[]' for nil:NilClass",
"backtrace": [
  "uri:classloader:/record_inheritance.rb:31:in `block in prepare_schemas'",
  "org/jruby/RubyArray.java:1735:in `each'",
  "uri:classloader:/record_inheritance.rb:16:in `block in prepare_schemas'",
  "org/jruby/RubyHash.java:1350:in `each'",
  "uri:classloader:/record_inheritance.rb:15:in `prepare_schemas'",
  
"/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'",
  
"/usr/share/archivesspace/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1411:in 
`configure'",
  
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:79:in
 `'",
  
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:39:in
 `'",
  "org/jruby/RubyKernel.java:956:in `require'",
  
"uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55:in
 `require'",
  
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:1:in
 `block in (root)'",
  "org/jruby/RubyBasicObject.java:1691:in `instance_eval'",
  
"/usr/share/archivesspace/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:4:in
 `(root)'",
  "uri:classloader:/vendor/rack-1.6.8/rack/builder.rb:55:in `'",
  "launcher/launcher.rb:92:in `start_server'",
  "launcher/launcher.rb:157:in `main'",
  "launcher/launcher.rb:261:in `'"
]
  }
}

Advice appreciated!  Again, all I'm trying to do is duplicate our ASpace in 
Vagrant.

Mark

<><><><><><><><><><><><><><><><><><><><>&

Re: [Archivesspace_Users_Group] Vagrant: "unable to connect to backend" error

2022-06-11 Thread Peter Heiner
We just had a similar issue where we had to upgrade MySQL Connector/J to be
able to successfully connect to a database that has been upgraded from MariaDB
10.2 to 10.4.

The symptom was AS being unable to connect to the database and it logging a
'communications link failure' error.

We'd previously been using version 8.0.23 of the connector and
were only able to connect after an upgrade to 8.0.29.

Hope that helps,
p

Mark Cyzyk wrote on 2022-06-11 17:08:30:
> All,
> 
> I am trying to duplicate our Archivesspace production app in a local Vagrant
> box.
> 
> I am getting an "unable to connect to backend" error when it boots.
> 
> I've checked to make sure the database is indeed present.
> 
> I've checked permissions for the "archivesspace" user to the "archivesspace"
> DB:
> 
>MariaDB [archivesspace]> SHOW GRANTS for archivesspace@localhost;
>
> +--+
>| Grants for archivesspace@localhost |
>
> +--+
>| GRANT USAGE ON *.* TO `archivesspace`@`localhost` IDENTIFIED
>BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |
>| GRANT ALL PRIVILEGES ON `archivesspace`.* TO
>`archivesspace`@`localhost` WITH GRANT
>OPTION   |
>
> +--+
>2 rows in set (0.000 sec)
> 
>MariaDB [archivesspace]>
> 
> 
> Then I do same for 127.0.0.1:
> 
>MariaDB [archivesspace]> SHOW GRANTS for archivesspace@127.0.0.1;
>
> +--+
>| Grants for archivesspace@127.0.0.1 |
>
> +--+
>| GRANT USAGE ON *.* TO `archivesspace`@`127.0.0.1` IDENTIFIED
>BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |
>| GRANT ALL PRIVILEGES ON `archivesspace`.* TO
>`archivesspace`@`127.0.0.1` WITH GRANT
>OPTION   |
>
> +--+
>2 rows in set (0.000 sec)
> 
>MariaDB [archivesspace]>
> 
> 
> I AM able to restore into the "archivesspace" database with:
> 
>sudo mysql -u archivesspace -pREDACTED archivesspace <
>/vagrant/archivesspace_CURRENT.sql
> 
> 
> The connect string in my config.rb file:
> 
>AppConfig[:db_url] =
>
> "jdbc:mysql://localhost:3306/archivesspace?user=archivesspace=REDACTED=true=UTF-8"
> 
> 
> And yet I get the "unable to connect to backend" error.  No fair!
> 
> 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.
> 
> Are there other reasons why I might be getting the "unable to connect to
> backend" error?
> 
> Advice appreciated!
> 
> Mark
> 
> PS: I don't think this is relevant to the connection issue, but here are the
> permissions I've set on the file system:
> 
>vagrant@vagrant:/usr/share/archivesspace$ ls -la
>total 84
>drwxr-xr-x  16 archivesspace archivesspace 4096 Jun 11 18:59 .
>drwxr-xr-x 122 root  root  4096 Jun 11 18:59 ..
>-rwxr-xr-x   1 archivesspace archivesspace  813 Jun 11 18:54
>archivesspace.bat
>-rwxr-xr-x   1 archivesspace archivesspace 5364 Jun 11 18:53
>archivesspace.sh
>drwxr-xr-x   4 archivesspace archivesspace 4096 Jun 11 18:53
>clustering
>drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 21:05 config
>-rwxr-xr-x   1 archivesspace archivesspace  665 Jun 11 18:53 COPYING
>drwxr-xr-x   9 archivesspace archivesspace 4096 Jun 11 18:59 data
>drwxr-xr-x  14 archivesspace archivesspace 4096 Jun 11 18:54 docs
>drwxr-xr-x   9 archivesspace archivesspace 4096 Jun 11 18:54 gems
>drwxr-xr-x   8 archivesspace archivesspace 4096 Jun 11 18:54
>launcher
>drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 18:59 lib
>drwxr-xr-x   4 archivesspace archivesspace 4096 Jun 11 18:53 locales
>drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 18:59 logs
>drwxr-xr-x  22 archivesspace archivesspace 4096 Jun 11 18:54 plugins
>-rwxr-xr-x   1 archivesspace archivesspace 2326 Jun 11 18:53
>README.md
>drwxr-xr-x  12 archivesspace archivesspace 4096 Jun 11 18:53 reports
>drwxr-xr-x   3 archivesspace archivesspace 4096 Jun 11 

[Archivesspace_Users_Group] Vagrant: "unable to connect to backend" error

2022-06-11 Thread Mark Cyzyk

All,

I am trying to duplicate our Archivesspace production app in a local 
Vagrant box.


I am getting an "unable to connect to backend" error when it boots.

I've checked to make sure the database is indeed present.

I've checked permissions for the "archivesspace" user to the 
"archivesspace" DB:


   MariaDB [archivesspace]> SHOW GRANTS for archivesspace@localhost;
   
+--+
   | Grants for archivesspace@localhost |
   
+--+
   | GRANT USAGE ON *.* TO `archivesspace`@`localhost` IDENTIFIED
   BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |
   | GRANT ALL PRIVILEGES ON `archivesspace`.* TO
   `archivesspace`@`localhost` WITH GRANT
   OPTION   |
   
+--+
   2 rows in set (0.000 sec)

   MariaDB [archivesspace]>


Then I do same for 127.0.0.1:

   MariaDB [archivesspace]> SHOW GRANTS for archivesspace@127.0.0.1;
   
+--+
   | Grants for archivesspace@127.0.0.1 |
   
+--+
   | GRANT USAGE ON *.* TO `archivesspace`@`127.0.0.1` IDENTIFIED
   BY PASSWORD '*2C2611CEB83E695935FB2CA67F9EE3D56514F1CC' |
   | GRANT ALL PRIVILEGES ON `archivesspace`.* TO
   `archivesspace`@`127.0.0.1` WITH GRANT
   OPTION   |
   
+--+
   2 rows in set (0.000 sec)

   MariaDB [archivesspace]>


I AM able to restore into the "archivesspace" database with:

   sudo mysql -u archivesspace -pREDACTED archivesspace <
   /vagrant/archivesspace_CURRENT.sql


The connect string in my config.rb file:

   AppConfig[:db_url] =
   
"jdbc:mysql://localhost:3306/archivesspace?user=archivesspace=REDACTED=true=UTF-8"


And yet I get the "unable to connect to backend" error.  No fair!

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.


Are there other reasons why I might be getting the "unable to connect to 
backend" error?


Advice appreciated!

Mark

PS: I don't think this is relevant to the connection issue, but here are 
the permissions I've set on the file system:


   vagrant@vagrant:/usr/share/archivesspace$ ls -la
   total 84
   drwxr-xr-x  16 archivesspace archivesspace 4096 Jun 11 18:59 .
   drwxr-xr-x 122 root  root  4096 Jun 11 18:59 ..
   -rwxr-xr-x   1 archivesspace archivesspace  813 Jun 11 18:54
   archivesspace.bat
   -rwxr-xr-x   1 archivesspace archivesspace 5364 Jun 11 18:53
   archivesspace.sh
   drwxr-xr-x   4 archivesspace archivesspace 4096 Jun 11 18:53
   clustering
   drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 21:05 config
   -rwxr-xr-x   1 archivesspace archivesspace  665 Jun 11 18:53 COPYING
   drwxr-xr-x   9 archivesspace archivesspace 4096 Jun 11 18:59 data
   drwxr-xr-x  14 archivesspace archivesspace 4096 Jun 11 18:54 docs
   drwxr-xr-x   9 archivesspace archivesspace 4096 Jun 11 18:54 gems
   drwxr-xr-x   8 archivesspace archivesspace 4096 Jun 11 18:54
   launcher
   drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 18:59 lib
   drwxr-xr-x   4 archivesspace archivesspace 4096 Jun 11 18:53 locales
   drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 18:59 logs
   drwxr-xr-x  22 archivesspace archivesspace 4096 Jun 11 18:54 plugins
   -rwxr-xr-x   1 archivesspace archivesspace 2326 Jun 11 18:53
   README.md
   drwxr-xr-x  12 archivesspace archivesspace 4096 Jun 11 18:53 reports
   drwxr-xr-x   3 archivesspace archivesspace 4096 Jun 11 18:54 scripts
   drwxr-xr-x   3 archivesspace archivesspace 4096 Jun 11 18:54
   stylesheets
   drwxr-xr-x   2 archivesspace archivesspace 4096 Jun 11 18:54 wars
   vagrant@vagrant:/usr/share/archivesspace$



--
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Mark Cyzyk, M.A., M.L.S.
Library Applications Group
The Sheridan Libraries
The Johns Hopkins University
mcy...@jhu.edu

Verba volant, scripta manent.
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group