pgcrypto not installed error

30 views
Skip to first unread message

Jose Blanco

unread,
Feb 11, 2020, 11:55:54 AM2/11/20
to DSpace Technical Support
getting this error when doing "ant fresh_install"

     [java] Database Type: postgres

     [java] Database URL: jdbc:postgresql://localhost:5432/dspace-dev-63

     [java] Database Schema: public

     [java] Database Username: dspace-dev-30

     [java] Database Software: PostgreSQL version 9.4.25

     [java] Database Driver: PostgreSQL JDBC Driver version 42.2.1.jre7

     [java] PostgreSQL 'pgcrypto' extension installed/up-to-date? false (not installed)

     [java] 

     [java] WARNING: Required PostgreSQL 'pgcrypto' extension is NOT INSTALLED on this database.

     [java] 

     [java] ** DSpace REQUIRES PostgreSQL >= 9.4 AND pgcrypto extension >= 1.1 **

     [java] 

     [java] To install it, please connect to your DSpace database as a 'superuser' and manually run the following command: 

     [java] 

     [java]   CREATE EXTENSION pgcrypto;

     [java] 

     [java] 2020-02-11 11:50:18,893 WARN  org.dspace.services.sessions.SessionRequestServiceImpl @ Request interceptor (org.dspace.services.events.SystemEventService$EventRequestInterceptor@2bfc86ba) failed to execute on end (request-796-1581439818722): null


but I see that it is installed.


dspace-dev-63=> SELECT * FROM pg_available_extensions WHERE name = 'pgcrypto';

   name   | default_version | installed_version |         comment         

----------+-----------------+-------------------+-------------------------

 pgcrypto | 1.1             |                   | cryptographic functions

(1 row)

Jose Blanco

unread,
Feb 11, 2020, 11:59:27 AM2/11/20
to DSpace Technical Support
Let me put in the whole section:

test_database:

     [java] 2020-02-11 11:50:18,422 WARN  org.dspace.services.email.EmailServiceImpl @ Couldn't get an email session from environment:  Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial

     [java] 

     [java] Attempting to connect to database

     [java] Connected successfully!

     [java] 

     [java] Database Type: postgres

     [java] Database URL: jdbc:postgresql://localhost:5432/dspace-dev-63

     [java] Database Schema: public

     [java] Database Username: dspace-dev-30

     [java] Database Software: PostgreSQL version 9.4.25

     [java] Database Driver: PostgreSQL JDBC Driver version 42.2.1.jre7

     [java] PostgreSQL 'pgcrypto' extension installed/up-to-date? false (not installed)

     [java] 

     [java] WARNING: Required PostgreSQL 'pgcrypto' extension is NOT INSTALLED on this database.

     [java] 

     [java] ** DSpace REQUIRES PostgreSQL >= 9.4 AND pgcrypto extension >= 1.1 **

     [java] 

     [java] To install it, please connect to your DSpace database as a 'superuser' and manually run the following command: 

     [java] 

     [java]   CREATE EXTENSION pgcrypto;

     [java] 

     [java] 2020-02-11 11:50:18,893 WARN  org.dspace.services.sessions.SessionRequestServiceImpl @ Request interceptor (org.dspace.services.events.SystemEventService$EventRequestInterceptor@2bfc86ba) failed to execute on end (request-796-1581439818722): null


BUILD FAILED

/deepblue/dspace/build/dspace-6.3-src-release/dspace/dspace/target/dspace-installer/build.xml:789: Java returned: 1

Jeffrey Sheldon

unread,
Feb 11, 2020, 12:04:06 PM2/11/20
to DSpace Technical Support
Jose,

The most common problem I've seen with this is related the pgcrypto extension being installed with a superuser account and database that aren't the same as what's being used by the DSpace installation. The documentation isn't explicit about this as I recall.

For instance, if your DSpace install uses a database called "dspace6" and the user "dspaceadmin", you'd want to connect into Postgres database dspace6 as dspaceadmin and install the pgcrypto extension that way so it's localized to the active DSpace database and visible to the user connecting in.


-Jeff


________________________________________
From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Jose Blanco <bla...@umich.edu>
Sent: Tuesday, February 11, 2020 10:55 AM
To: DSpace Technical Support
Subject: [dspace-tech] pgcrypto not installed error


[java] Database Type: postgres

[java] Database Schema: public

[java] Database Username: dspace-dev-30

[java]

[java]

[java]

[java]

[java] CREATE EXTENSION pgcrypto;

[java]

name | default_version | installed_version | comment

----------+-----------------+-------------------+-------------------------

pgcrypto | 1.1 | | cryptographic functions

(1 row)

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com<mailto:dspace-tech...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-t_8Yh0_5fS%2B4cTEvkcuuiXa%2B5O0L71rWcpWRf0yn_j%2Bg%40mail.gmail.com<https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-t_8Yh0_5fS%2B4cTEvkcuuiXa%2B5O0L71rWcpWRf0yn_j%2Bg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mark H. Wood

unread,
Feb 12, 2020, 8:43:18 AM2/12/20
to DSpace Technical Support
Presence of an extension in pg_available_extensions only shows that it
is available for installation. Above, 'installed_version' is null,
showing that the extension is *not* installed in that database.

https://www.postgresql.org/docs/9.4/view-pg-available-extensions.html

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Yassir Elnaw

unread,
Feb 12, 2020, 9:00:55 AM2/12/20
to DSpace Technical Support
What you need to do is to edit the file

nano /dspace/config/local.cfg.EXAMPLE
change the db.password = with the password you entered twice after the command:

createuser -U postgres -d -A -P dspace
save the changes to file local.cfg.EXAMPLE and save it as local.cfg, then run the command

sudo ant fresh_install
again and this will do it.

Yassir Elnaw

unread,
Feb 12, 2020, 9:02:10 AM2/12/20
to DSpace Technical Support
Reply all
Reply to author
Forward
0 new messages