Ant Fresh Build Error

20 views
Skip to first unread message

Manabjyoti Baro

unread,
Dec 19, 2024, 5:45:03 PM12/19/24
to DSpace Technical Support
Hi Support team
I am using KVM1 VPS Machine Ubuntu 24.04 
Jdk-17.0.13 Maven 3.8.7 ant-1.10.14 Dspace 8 
I run ant fresh-install but its is  build failed because of database connection




test_database:
     [java] 2024-12-19 16:28:06,538 ERROR org.dspace.storage.rdbms.DatabaseUtils @ Unable to setup Flyway against DSpace database
     [java] java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "dspace")
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:633) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:535) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:711) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.setupFlyway(DatabaseUtils.java:594) [dspace-api-8.0.jar:8.0]
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:108) [dspace-api-8.0.jar:8.0]
     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
     [java]     at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:283) [dspace-api-8.0.jar:8.0]
     [java]     at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:134) [dspace-api-8.0.jar:8.0]
     [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:99) [dspace-api-8.0.jar:8.0]
     [java] Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "dspace"
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:698) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:207) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:273) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.Driver.makeConnection(Driver.java:446) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.postgresql.Driver.connect(Driver.java:298) ~[postgresql-42.7.3.jar:42.7.3]
     [java]     at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:414) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:113) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:629) ~[commons-dbcp2-2.11.0.jar:2.11.0]
     [java]     ... 11 more
     [java] Caught exception:
  [java] Caught exception:
     [java] java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "dspace")
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:633)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:535)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:711)
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:113)
     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
     [java]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]     at java.base/java.lang.reflect.Method.invoke(Method.java:569)
     [java]     at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:283)
     [java]     at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:134)
     [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:99)
     [java] Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "dspace"
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:698)
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:207)
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262)
     [java]     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)
     [java]     at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:273)
     [java]     at org.postgresql.Driver.makeConnection(Driver.java:446)
     [java]     at org.postgresql.Driver.connect(Driver.java:298)
     [java]     at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
     [java]     at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:414)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:113)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:629)
     [java]     ... 10 more

BUILD FAILED
/build/DSpace-dspace-8.0/dspace/target/dspace-installer/build.xml:783: Java returned: 1

2024-12-19 16:27:46.292 UTC [21966] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:27:46.292 UTC [21966] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:27:46.520 UTC [21967] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:27:46.520 UTC [21967] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:28:06.525 UTC [22023] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:28:06.525 UTC [22023] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:28:06.752 UTC [22024] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:28:06.752 UTC [22024] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:33:37.957 UTC [21782] LOG:  checkpoint starting: immediate force wait
2024-12-19 16:33:37.964 UTC [21782] LOG:  checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.008 s; sync files=2, longest=0.001 s, average=0.001 s; distance=1 kB, estimate=1 kB; lsn=0/196C4C0, redo lsn=0/196C488
2024-12-19 16:38:38.065 UTC [21782] LOG:  checkpoint starting: time
2024-12-19 16:39:18.667 UTC [22282] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:39:18.667 UTC [22282] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:39:18.911 UTC [22285] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:39:18.911 UTC [22285] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:40:11.811 UTC [21782] LOG:  checkpoint complete: wrote 936 buffers (5.7%); 1 WAL file(s) added, 0 removed, 0 recycled; write=93.705 s, sync=0.010 s, total=93.747 s; sync files=306, longest=0.001 s, average=0.001 s; distance=4283 kB, estimate=4283 kB; lsn=0/1D9B238, redo lsn=0/1D9B200
2024-12-19 16:43:54.903 UTC [21781] LOG:  received fast shutdown request
2024-12-19 16:43:54.904 UTC [21781] LOG:  aborting any active transactions
2024-12-19 16:43:54.913 UTC [21781] LOG:  background worker "logical replication launcher" (PID 21787) exited with exit code 1
2024-12-19 16:43:54.913 UTC [21782] LOG:  shutting down
2024-12-19 16:43:54.915 UTC [21782] LOG:  checkpoint starting: shutdown immediate
2024-12-19 16:43:54.918 UTC [21782] LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.005 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=3855 kB; lsn=0/1D9B2E8, redo lsn=0/1D9B2E8
2024-12-19 16:43:54.927 UTC [21781] LOG:  database system is shut down
2024-12-19 16:43:55.077 UTC [22383] LOG:  starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit
2024-12-19 16:43:55.077 UTC [22383] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-12-19 16:43:55.077 UTC [22383] LOG:  listening on IPv6 address "::", port 5432
2024-12-19 16:43:55.078 UTC [22383] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-19 16:43:55.082 UTC [22386] LOG:  database system was shut down at 2024-12-19 16:43:54 UTC
2024-12-19 16:43:55.088 UTC [22383] LOG:  database system is ready to accept connections
2024-12-19 16:48:55.170 UTC [22384] LOG:  checkpoint starting: time
2024-12-19 16:48:55.177 UTC [22384] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.008 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1D9B3D0, redo lsn=0/1D9B398
2024-12-19 16:49:03.235 UTC [22383] LOG:  received fast shutdown request
2024-12-19 16:49:03.237 UTC [22383] LOG:  aborting any active transactions
2024-12-19 16:49:03.243 UTC [22383] LOG:  background worker "logical replication launcher" (PID 22389) exited with exit code 1
2024-12-19 16:49:03.243 UTC [22384] LOG:  shutting down
2024-12-19 16:49:03.244 UTC [22384] LOG:  checkpoint starting: shutdown immediate
2024-12-19 16:49:03.247 UTC [22384] LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.005 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB, estimate=0 kB; lsn=0/1D9B480, redo lsn=0/1D9B480
2024-12-19 16:49:03.252 UTC [22383] LOG:  database system is shut down
2024-12-19 16:49:03.417 UTC [22506] LOG:  starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit
2024-12-19 16:49:03.418 UTC [22506] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-12-19 16:49:03.418 UTC [22506] LOG:  listening on IPv6 address "::", port 5432
2024-12-19 16:49:03.418 UTC [22506] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-19 16:49:03.423 UTC [22509] LOG:  database system was shut down at 2024-12-19 16:49:03 UTC
2024-12-19 16:49:03.430 UTC [22506] LOG:  database system is ready to accept connections
2024-12-19 16:49:51.304 UTC [22585] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:49:51.304 UTC [22585] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:49:51.514 UTC [22586] dspace@dspace FATAL:  password authentication failed for user "dspace"
2024-12-19 16:49:51.514 UTC [22586] dspace@dspace DETAIL:  Connection matched file "/etc/postgresql/16/main/pg_hba.conf" line 121: "host    all             dspace             127.0.0.1/32                md5"
2024-12-19 16:54:03.521 UTC [22507] LOG:  checkpoint starting: time
2024-12-19 16:54:03.528 UTC [22507] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.007 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1D9B568, redo lsn=0/1D9B530
 

DSpace Technical Support

unread,
Dec 19, 2024, 10:01:58 PM12/19/24
to DSpace Technical Support
Hi,

The stacktrace you shared shows that the error is caused by:

 FATAL:  password authentication failed for user "dspace"

This means that your database password (db.password) is likely incorrect.  Or maybe your "db.username" setting should not be "dspace"?   You'll need to look more closely at your Database configurations (db.*) in your local.cfg to fix this problem. https://wiki.lyrasis.org/display/DSDOC8x/Configuration+Reference#ConfigurationReference-DSpaceDatabaseConfiguration

Tim

Manabjyoti Baro

unread,
Dec 19, 2024, 10:25:00 PM12/19/24
to DSpace Technical Support

I have checked double that db.username and db.password is correct but still build failed with same error


--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/qj9bqee6894/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dspace-tech/597d4344-c89f-4d7d-ad2e-0b962a5e73bfn%40googlegroups.com.

DSpace Technical Support

unread,
Dec 19, 2024, 10:34:18 PM12/19/24
to DSpace Technical Support
Hi,

Then that likely means that DSpace is unable to connect to your database.  DSpace cannot build successfully without access to the database, and this error appears to be saying that DSpace is unable to connect to it or login to it.

So, I'd again recommend looking closer at your database configuration.  You also may want to make sure there's no firewall or anything else that could be blocking the DSpace code from accessing the database.

Tim

Manabjyoti Baro

unread,
Dec 20, 2024, 6:29:38 PM12/20/24
to DSpace Technical Support
after solving one i got this error

Exception: Problem connecting to database. This indicates issue with either network or version (or possibly some other). If you are running this in docker-compose, please make sure dspace-cli was built from the same sources as running dspace container AND that they are in the same project/network.
java.lang.IllegalStateException: Problem connecting to database. This indicates issue with either network or version (or possibly some other). If you are running this in docker-compose, please make sure dspace-cli was built from the same sources as running dspace container AND that they are in the same project/network.
        at org.dspace.administer.CreateAdministrator.<init>(CreateAdministrator.java:124)
        at org.dspace.administer.CreateAdministrator.main(CreateAdministrator.java:69)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:283)
        at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:134)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:99)

Reply all
Reply to author
Forward
0 new messages