Islandora Configuration Problem - Unable to authenticate when connecting to to Fedora Server Please

167 views
Skip to first unread message

Brendan C

unread,
Jul 6, 2017, 8:25:11 AM7/6/17
to islandora

Hello,

I am trying to Install the Islandora Stack onto a Ubuntu Server.

I am following the instructions in Islandora 7.x-1.9 – Enterprise – Option 1 as found at:

https://wiki.duraspace.org/display/ISLANDORA715/Option+1%3A+Installing+the+Minimum+Islandora+Stack


Here is what I’ve installed:
- Ubuntu Server 16.04 (w/ LAMP 16.04 )
- Java JDK 8
-
Maven 3.3.9
- Fedora 3.8.1
- Drupal 7.56
-
fcrepo-drupalauthfilter-3.8.1

- Tuque 1.5

- Islandora Core Module for Drupal: islandora-7.x-1.5.zip


My issue occurs in Milestone 5. When attempting to configure the Islandora Core Moduleon my Drupal Website,I keep getting this error from the Islandora configuration page.


Fedora base URL *

http://localhost:8080/fedora

Unable to authenticate when connecting to to Fedora Server (Version 3.8.1). Please configure the Drupal Filter.”


- I am following the milestones exactly to the writing, using the above versions of Fedora and Drupal.

- I have worked through milestones 1 and 2 with no problems. I can login to both the Fedora repository

and drupal site through admin accounts, and operate each.


- This is my filter-drupal.xml (located in $FEDORA_HOME/server/config/filter-drupal.xml) which contains values that are listed in drupal's settings.php file:

<FilterDrupal_Connection>

<connection server="localhost" dbname="drupal" user="drupalAdmin" password="ttpNewRupal" port="3306">

<sql>

<!--Different sql statement for each connection. This is for drupal

multisites that are setup using one database with table prefixes.

We don't do this but some people might.-->

SELECT DISTINCT u.uid AS userid, u.name AS Name, u.pass AS Pass,r.name AS Role FROM (users u LEFT JOIN users_roles ON u.uid=users_roles.$

</sql>

</connection>

- The logs found in $FEDORA_HOME/server/logs/fedora.log print the following, in regards to the connection attempt

ERROR 2017-07-05 14:51:09.396 [http-bio-8080-exec-21] (DrupalAuthModule) Error retrieving user info Parameter index out of range (2 > number of parameters, which is 0).

ERROR 2017-07-05 14:51:09.396 [http-bio-8080-exec-21] (AuthFilterJAAS) javax.security.auth.login.LoginException: Login Failure: all modules ignored

- Using the drupal_filter_validator to test the filter-drupal.xml file gave successful connection results:

user@server:~/drupal_filter_validator$ sudo ./test_db_connection.py $FEDORA_HOME/server/config/filter-drupal.xml

Connection 1 - OK: connection to Drupal database successful, and user drupalAdmin has select,insert,update privileges on the users table.

- Inserting incorrect values in filter-drupal.xml give different errors in the logs, which complained about incorrect credentials, so the values are not wrong. I am able to login to mysql with the same user and password found in settings.php

ERROR 2017-07-05 16:08:40.075 [http-bio-8080-exec-1] (DrupalAuthModule) SQLException: Access denied for user 'drupalAdmin'@'localhost' (using password: YES)

ERROR 2017-07-05 16:08:40.075 [http-bio-8080-exec-1] (DrupalAuthModule) SQLState: 28000

ERROR 2017-07-05 16:08:40.075 [http-bio-8080-exec-1] (DrupalAuthModule) VendorError: 1045

ERROR 2017-07-05 16:08:40.075 [http-bio-8080-exec-1] (DrupalAuthModule) Error Connecting to Database server jdbc:mysql://localhost:3306/drupal?user=drupalAdmin&password=ttpNewRupallll

ERROR 2017-07-05 16:08:40.075 [http-bio-8080-exec-1] (AuthFilterJAAS) javax.security.auth.login.LoginException: Login Failure: all modules ignored

- Running the drupal testing module onto Islandora (as per later instruction) produces this exception 12 times:

RepositoryException: Unauthorized in RepositoryConnection->parseFedoraExceptions() (line 229 of /var/www/html/drupal/sites/all/libraries/tuque/RepositoryConnection.php).

- I've tried
* Making the filter-drupal.xml file executable

* Changing ownership of tuque library to www-data
* Restarting fedora, mysql, etc.
* Rebooting the Ubuntu server

- Even reinstalling the whole server up to milestone 5 lead to no success.

- I've documented and retraced every step I took, but I've got no clue whats wrong at this point.

- If anyone can provide suggestions or a solution, I'd highly appreciate it!

Brendan

dp...@metro.org

unread,
Jul 7, 2017, 10:13:49 AM7/7/17
to islandora
Hi, 
First, a few comments: i would suggest installing a newer version of Islandora, i see you are on 7.x-1.5 there and your docs are pointing to that also (https://wiki.duraspace.org/display/ISLANDORA715/Option+1%3A+Installing+the+Minimum+Islandora+Stack), we are already in 7.x-1.9 and in core and tuque there have been quite a few improvements since 1.5. Please also try a newer version of the drupal filter from here https://github.com/Islandora/islandora_drupal_filter/releases

Second, the Islandora/Drupal testing module part can be skipped, i think this is something that pops up from time to time in the forums, and those tests are not meant to be run on deployments but as part of our automated testings during development, so they can and will fail in your local instance.

Third, a few silly questions that can maybe lead to a fix:
 Does any of your user/password combinations contain some character that needs to be escaped? Drupal filter does not do that for you (failing), as stated in the docs:
The Drupal Filter does not currently escape the database url before attempting to connect to the Mysql database, which can cause problems if the user name or password has '%' symbol within it.

Also, to be sure credentials and actual needed data match, try, via terminal, on the same machine to do a:
mysql -u therealuseryouhave -p insert your real herealpassword and inside the mysql console, select the choosen DB in the XML ( "use databasenameyouhavefordrupal") and execute the whole SQL statement from your XML you have there replacing the "?"  with the real credentials of a Drupal user. Does that run? Do you get actual roles and pretty data?

The drupal_filter_validator only tests if the credentials are correct for a given database (silly!), basically the connection itself, but not if the query runs and gives actual results for a given drupal user for that db (hope i explained myself correctly)

The piece that is failing in your installations is at:
where the query throws an exception and is being catched, so basically it is giving 0 results, probably the ? placeholders are not being replaced correctly. Which, again, could mean some unescaped character in your credentails, even a user or password with an " inside?

Remember> the ? are replaced by the drupal user credentials, not the MYSQL DB ones.

Hope any of this helps.

Best

Diego Pino
Metro.org

Brendan C

unread,
Jul 7, 2017, 6:45:34 PM7/7/17
to islandora
Hello, and thanks for the reply.

The problem was the SQL statement in the filter-drupal.xml file. The statement was apparently unfinished, and ended with a '$', must've been truncated for some reason, or I pasted it in wrong.


<FilterDrupal_Connection>

 
<connection server="localhost" dbname="drupal" user="drupalAdmin" password="ttpNewRupal" port="3306">
 
<sql>
 
<!--Different sql statement for each connection. This is for drupal
  multisites that are setup using one database with table prefixes.
  We don't do this but some people might.-->


  SELECT DISTINCT u.uid AS userid,
u.name AS Name, u.pass AS Pass,r.name AS Role FROM (users u LEFT JOIN users_roles ON u.uid=users_roles.$

 
</sql>
 
</connection>
I visited the milestone 3 page and pasted in the correct statement. The Islandora configuration page (http://192.168.0.212/drupal/admin/islandora/configure) stated a successful connection was made. I did not have a password that was in need of character escapes for special symbols.

I am using the latest version of the drupal filter module, which seems to be fcrepo-3.8.1 at https://github.com/Islandora/islandora_drupal_filter/releases

In regards to your recommendation to try a different Islandora module:

Every milestone I've followed has been directly linked by the sidebar under "Option 1: Installing the Minimum Islandora Stack" So if I'm downloading modules and software that are out of date, that's from following what seems to be the most recent instructions linked from "Islandora 7.x-1.9" on the websites sidebar.

I was instructed to download 7.x-1.5 by Milestone 5, and even the link to the Islandora releases included in the milestone showed no listing for 7.x-1.9
https://wiki.duraspace.org/display/ISLANDORA/milestone+5+-++Installing+the+Islandora+Essential+Modules

There IS an updated version of milestone 5 which instructs using 7.x-1.9, but it isn't in plain sight, or correctly linked. In fact I've lost the link,and I can't find the correct one in my history.

So if there is updated instructions, they need to be properly linked, because I can't find them through simple and convenient ways.

Thanks again for the reply, it lead me to a solution.

- Brendan

Rosemary Le Faive

unread,
Jul 8, 2017, 4:59:59 PM7/8/17
to islandora
Oh... Yep, I was the last person to edit those docs, and I am so, so sorry. Thanks for pointing that out, and I'll update them now. 

Daniel Lamb

unread,
Jul 10, 2017, 8:45:51 AM7/10/17
to isla...@googlegroups.com

Rosie++


On 2017-07-08 05:59 PM, Rosemary Le Faive wrote:
Oh... Yep, I was the last person to edit those docs, and I am so, so sorry. Thanks for pointing that out, and I'll update them now. 
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/28e3bac9-f368-4c8d-8e4a-59f545cf1280%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages