What does getenforce say? This might be SELinux doing its job ;) Check /var/log/audit/audit.log for stuff related to tomcat/catalina, pgsql etc.
Check the pgsql logs, they usually have some pointer as to where it goes wrong. Also check the tomcat logs. And an important thing: The password stated in dspace.cfg or local.cfg must be entered as follows: db.password = un@b0mb3R? make sure the spaces are there and be careful that your password doesn't contain = or localized characters (german umlaut etc.) also try to connect to pgsql directly from the CLI as the dspace user like so: [dspace@rigel config]$ psql -U dspace -W -d dspace Password for user dspace: psql (9.5.14) Type "help" for help. dspace=>> \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+-------------+-------------+--------- -------------- dspace | dspace | UTF8 | C | C | postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows) dspace=> HTH /tony On Mon, 2019-06-17 at 09:35 -0400, Keith Jones wrote: > Hi, > I checked the dspace.cfg file and the information is correct. > > I've run this: > > -bash-4.2$ ../bin/dspace database test > > Attempting to connect to database using these configurations: > - URL: jdbc:postgresql://localhost:5432/dspace > - Driver: org.postgresql.Driver > - Username: dspace > - Password: [hidden] > - Schema: > > Testing connection... > Connected successfully! > > On Mon, Jun 17, 2019 at 9:26 AM Ayuka Phanuel <ayukaphan...@gmail.com > > wrote: > > > > Confirm your database credentials (name, url, password, username) > > added to your local.cfg or dspace.cfg > > > > > > > > On Mon, Jun 17, 2019 at 4:21 PM Keith Jones <mad...@udel.edu> > > wrote: > > > > > > Hi All, > > > > > > I'm trying to move an installation of Dspace 5.3 to a new Centos > > > 7 > > > server. I've installed all the software required and have > > > everything > > > running. I'm able to compile the Dspace software, which goes > > > without a > > > problem. I test the database connection and it works fine. When I > > > deploy the xmlui into the webapps area of Tomcat, I'm getting the > > > following error: > > > > > > SEVERE: Exception sending context destroyed event to listener > > > instance > > > of class org.dspace.app.util.DS > > > paceContextListener > > > java.lang.IllegalStateException: The connection attempt failed. > > > at > > > org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseMa > > > nager.java:655) > > > at > > > org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseMa > > > nager.java:629) > > > at org.dspace.core.Context.init(Context.java:121) > > > at org.dspace.core.Context.<init>(Context.java:95) > > > at > > > org.dspace.app.util.AbstractDSpaceWebapp.deregister(AbstractDSpac > > > eWebapp.java:97) > > > at > > > org.dspace.app.util.DSpaceContextListener.contextDestroyed(DSpace > > > ContextListener.java:146) > > > at > > > org.apache.catalina.core.StandardContext.listenerStop(StandardCon > > > text.java:5165) > > > at > > > org.apache.catalina.core.StandardContext.stopInternal(StandardCon > > > text.java:5829) > > > at > > > org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:22 > > > 1) > > > at > > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:1 > > > 49) > > > at > > > org.apache.catalina.core.ContainerBase.addChildInternal(Container > > > Base.java:899) > > > at > > > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.jav > > > a:875) > > > at > > > org.apache.catalina.core.StandardHost.addChild(StandardHost.java: > > > 652) > > > at > > > org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig > > > .java:1260) > > > at > > > org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostCo > > > nfig.java:2002) > > > at > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.jav > > > a:511) > > > at > > > java.util.concurrent.FutureTask.run(FutureTask.java:266) > > > at > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecu > > > tor.java:1149) > > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec > > > utor.java:624) > > > at java.lang.Thread.run(Thread.java:748) > > > Caused by: org.postgresql.util.PSQLException: The connection > > > attempt failed. > > > at > > > org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(C > > > onnectionFactoryImpl.java: > > > 152) > > > at > > > org.postgresql.core.ConnectionFactory.openConnection(ConnectionFa > > > ctory.java:66) > > > at > > > org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2 > > > Connection.java:125) > > > at > > > org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3 > > > Connection.java:30) > > > at > > > org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdb > > > c3gConnection.java:22) > > > at > > > org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4 > > > Connection.java:32) > > > at > > > org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java: > > > 24) > > > at org.postgresql.Driver.makeConnection(Driver.java:393) > > > at org.postgresql.Driver.connect(Driver.java:267) > > > at > > > java.sql.DriverManager.getConnection(DriverManager.java:664) > > > at > > > java.sql.DriverManager.getConnection(DriverManager.java:247) > > > at > > > org.apache.commons.dbcp.DriverManagerConnectionFactory.createConn > > > ection(DriverManagerConnec > > > tionFactory.java:75) > > > at > > > org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Pool > > > ableConnectionFactory.java > > > :582) > > > at > > > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Gener > > > icObjectPool.java:974) > > > at > > > org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDa > > > taSource.java:106) > > > at > > > org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManag > > > er.java:1336) > > > at > > > org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseMa > > > nager.java:650) > > > ... 19 more > > > Caused by: java.net.SocketException: Permission denied (connect > > > failed) > > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > > at > > > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImp > > > l.java:350) > > > at > > > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSo > > > cketImpl.java:206) > > > at > > > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl. > > > java:188) > > > at > > > java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > > > at java.net.Socket.connect(Socket.java:589) > > > at java.net.Socket.connect(Socket.java:538) > > > at java.net.Socket.<init>(Socket.java:434) > > > at java.net.Socket.<init>(Socket.java:211) > > > at org.postgresql.core.PGStream.<init>(PGStream.java:62) > > > at > > > org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(C > > > onnectionFactoryImpl.java: > > > 76) > > > ... 35 more > > > > > > Any help would be appreciated. > > > > > > Thanks > > > Keith > > > > > > -- > > > All messages to this mailing list should adhere to the DuraSpace > > > Code of Conduct: https://duraspace.org/about/policies/code-of-con > > > duct/ > > > --- > > > 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+unsubscr...@googlegroups.com. > > > To view this discussion on the web visit https://groups.google.co > > > m/d/msgid/dspace- > > > tech/CAJ6iCzMqLuYnomow3ngk2HPSMH_ybkg0Qj34E%3D_0J9QdLvd7LQ%40mail > > > .gmail.com. > > -- Tony Albers - Systems Architect - IT Development Royal Danish Library, Victor Albecks Vej 1, 8000 Aarhus C, Denmark Tel: +45 2566 2383 - CVR/SE: 2898 8842 - EAN: 5798000792142 -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/1560831973.1832.2.camel%40kb.dk.