A few days ago,I changed the database of JFrog Artifactory according to the steps provided by JFrog, but there are some error when restarting the service.
Operate steps:
1.Run a full system export
2.Create a new DB scheme on your PostgreSQL (refer to: https://www.jfrog.com/confluence/display/RTF/PostgreSQL#PostgreSQL-ConfiguringArtifactorytousePostgreSQL)
3.Shutdown Artifactory
4.Configure your instance to connect to the new DB
db.properties info as below:
type=postgresql
driver=org.postgresql.Driver
url=jdbc:postgresql://localhost:5432/artifactory
username=artifactory
password=password
and I already copy the postgresql-9.2-1004.jdbc4.jar to $ARTIFACTORY/tomcat/lib/
5.Start Artifactory
6.Run a full system import from the export you performed
The error message are as below:
Caused by: java.lang.IllegalStateException: Could not initialize database: FATAL: Ident authentication failed for user "artifactory"
at org.jfrog.access.server.db.util.AccessJdbcHelperImpl.initDb(AccessJdbcHelperImpl.java:123)
at org.jfrog.access.server.db.util.AccessJdbcHelperImpl.init(AccessJdbcHelperImpl.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)
... 132 more
Caused by: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "artifactory"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:398)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:397)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
at org.jfrog.access.server.db.util.AccessJdbcHelperImpl.getDbMetadata(AccessJdbcHelperImpl.java:128)
at org.jfrog.access.server.db.util.AccessJdbcHelperImpl.initDb(AccessJdbcHelperImpl.java:120)
... 140 more
postgresql-9.2-1004.jdbc4.jar
is extremely outdated. You shouldn't use that any more. If you are indeed using Postgres 9.2 - that's also outdated and unsupported - you should upgrade to a Postgres 10 or 11 before you continue. – a_horse_with_no_name