导出期间 Artifactory 备份失败

导出期间 Artifactory 备份失败

我们正在使用 Jfrog artifactory 版本 6.7.0。为了备份artifactory 存储库,我们遵循 JFrog Artifactory 记录的备份策略 -https://www.jfrog.com/confluence/display/RTF/Managing+Backups

Artifactory 二进制文件安装在 AWS EC2 实例中,对于数据库,我们使用 AWS RDS Postgresql 引擎。连接和备份工作正常,没有进行任何配置更改,但它在过去 2 天内停止工作。

以下是来自 /data/artifactory/artifactory-pro-6.7.0/logs/artifactory.log 的日志片段 ->

2019-04-30 00:00:00,000 [art-exec-16] [INFO ] (o.a.s.ArtifactoryApplicationContext:624) - Beginning full system export...
2019-04-30 00:00:00,001 [art-exec-16] [INFO ] (o.a.s.ArtifactoryApplicationContext:651) - Creating temp export directory: /data/artifactory/artifactory-pro-

6.7.0/backup/new_backup1/20190430.000000.tmp
2019-04-30 00:00:00,001 [art-exec-16] [INFO ] (o.a.s.ArtifactoryApplicationContext:658) - Using backup directory: '/data/artifactory/artifactory-pro-

6.7.0/backup/new_backup1/20190430.000000.tmp'.
2019-04-30 00:00:00,001 [art-exec-16] [INFO ] (o.a.c.CentralConfigServiceImpl:566) - Exporting config...
2019-04-30 00:00:01,070 [art-exec-10] [INFO ] (o.a.r.s.t.p.TrashcanPruner:111) - Trashcan pruning total execution time: '1.07 secs'
2019-04-30 00:00:01,636 [art-exec-10] [INFO ] (o.a.s.b.s.GarbageCollectorInfo:80) - Storage garbage collector report:
Number of binaries:      170,933
Total execution time:    505 millis
Candidates for deletion: 0
Checksums deleted:       0
Binaries deleted:        0
Total size freed:        0 bytes
Current total size:      113.97 GB
2019-04-30 00:00:56,091 [art-exec-16] [ERROR] (o.a.s.ArtifactoryApplicationContext:756) - Failed to check for config 'keystore' existence: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
org.artifactory.storage.StorageException: Failed to check for config 'keystore' existence: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at org.artifactory.storage.db.fs.service.ConfigsServiceImpl.hasConfig(ConfigsServiceImpl.java:85)
        at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
        at com.sun.proxy.$Proxy98.hasConfig(Unknown Source)
        at org.artifactory.addon.webstart.keystore.DbKeyStoreService.keyStoreExists(DbKeyStoreService.java:129)
        at org.artifactory.addon.webstart.keystore.DbKeyStoreService.exportTo(DbKeyStoreService.java:346)
        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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
        at com.sun.proxy.$Proxy180.exportTo(Unknown Source)
        at org.artifactory.addon.webstart.WebstartAddonImpl.exportKeyStore(WebstartAddonImpl.java:64)
        at org.artifactory.spring.ArtifactoryApplicationContext.exportTo(ArtifactoryApplicationContext.java:676)
        at org.artifactory.backup.BackupServiceImpl.backupSystem(BackupServiceImpl.java:194)
        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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
        at com.sun.proxy.$Proxy210.backupSystem(Unknown Source)
        at org.artifactory.backup.BackupJob.runBackup(BackupJob.java:123)
        at org.artifactory.backup.BackupJob.runAutomaticBackup(BackupJob.java:91)
        at org.artifactory.backup.BackupJob.onExecute(BackupJob.java:68)
        at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:48)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:50)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.GeneratedConstructorAccessor770.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:981)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:339)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
        at sun.reflect.GeneratedConstructorAccessor219.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:711)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:645)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:187)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
        at org.jfrog.storage.JdbcHelper.getConnection(JdbcHelper.java:123)
        at org.jfrog.storage.JdbcHelper.executeSelect(JdbcHelper.java:159)
        at org.jfrog.storage.JdbcHelper.executeSelect(JdbcHelper.java:139)
        at org.artifactory.storage.db.fs.dao.ConfigsDao.hasConfig(ConfigsDao.java:64)
        at org.artifactory.storage.db.fs.service.ConfigsServiceImpl.hasConfig(ConfigsServiceImpl.java:83)
        ... 34 common frames omitted
Caused by: java.net.UnknownHostException: mydb.aws.pnh.cloud: Temporary failure in name resolution
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
        at java.net.InetAddress.getAllByName(InetAddress.java:1193)
        at java.net.InetAddress.getAllByName(InetAddress.java:1127)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:188)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:298)
        ... 57 common frames omitted
2019-04-30 00:00:56,092 [art-exec-16] [ERROR] (o.a.s.ArtifactoryApplicationContext:757) - Full system export failed: Failed to check for config 'keystore' existence: Communications link 

failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.: Failed to check for config 'keystore' existence: 

Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
2019-04-30 00:00:56,092 [art-exec-16] [WARN ] (o.a.b.BackupJob     :95) - Backup completed with some errors (see the log messages above for details). Old backups will not be auto-removed.
2019-04-30 00:12:00,001 [art-exec-9] [INFO ] (o.a.r.c.VirtualCacheCleanupServiceImpl:123) - Starting cleanup of virtual repositories
2019-04-30 00:12:00,009 [art-exec-9] [INFO ] (o.a.r.c.VirtualCacheCleanupServiceImpl:127) - Completed virtual repositories cleanup: removed 0 cached files.

如果有人能指出这个问题并提供解决方法那将会非常有帮助。

非常感谢,Bluesaturn

答案1

看起来像是 DNS 问题。mydb.aws.pnh.cloud无法解析主机。

Caused by: java.net.UnknownHostException: mydb.aws.pnh.cloud: Temporary failure in name resolution
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)

相关内容