Jfrog artifactory OSS port 8046 go away after sometime

Jfrog artifactory OSS port 8046 go away after sometime

我们最近安装了 artifactory 7.6.1。安装很顺利,我们可以访问控制台并在上面工作,但在一段时间未使用后,jfrog artifactory 在浏览器上没有响应,我们意识到端口 8046 消失了,它在 jfrog 最初启动时处于活动状态。下面是错误

2020-07-16T07:33:00.111Z [jfrt ] [ERROR] [8a0affa9a62fb8a2] [o.j.a.c.h.AccessHttpClient:130] [art-exec-6          ] - Error while executing /api/v1/users/ on access.
 Exception message: Connect to localhost:8046 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
2020-07-16T07:33:00.119Z [jfrt ] [ERROR] [8a0affa9a62fb8a2] [o.a.m.s.CallHomeService:118   ] [art-exec-6          ] - Failed calling home: Unable to connect to Acces
s server: Connect to localhost:8046 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
org.jfrog.access.client.AccessClientException: Unable to connect to Access server: Connect to localhost:8046 [localhost/127.0.0.1] failed: Connection refused (Connec
tion refused)
        at org.jfrog.access.client.http.AccessHttpClient.restCall(AccessHttpClient.java:136)
        at org.jfrog.access.client.AccessClientBaseImpl.makeRequestAndParseResponse(AccessClientBaseImpl.java:163)
        at org.jfrog.access.client.AccessClientBaseImpl.findAll(AccessClientBaseImpl.java:110)
        at org.jfrog.access.client.AccessClientBaseImpl.findAll(AccessClientBaseImpl.java:99)
        at org.jfrog.access.client.user.UsersClientImpl.findUsers(UsersClientImpl.java:60)
        at org.artifactory.storage.db.security.service.access.AccessUserGroupStoreService.getAllUsersInternal(AccessUserGroupStoreService.java:304)
        at org.artifactory.storage.db.security.service.access.AccessUserGroupStoreService.getAllUsers(AccessUserGroupStoreService.java:271)
        at org.artifactory.storage.db.security.service.access.AccessUserGroupStoreService.getAllUsers(AccessUserGroupStoreService.java:267)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
        at com.sun.proxy.$Proxy178.getAllUsers(Unknown Source)
        at org.artifactory.security.SecurityServiceImpl.getAllUsers(SecurityServiceImpl.java:778)
        at org.artifactory.security.SecurityServiceImpl.getAllUsers(SecurityServiceImpl.java:773)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
        at com.sun.proxy.$Proxy172.getAllUsers(Unknown Source)
        at org.artifactory.metrics.providers.features.SecurityFeature.addUsers(SecurityFeature.java:143)
        at org.artifactory.metrics.providers.features.SecurityFeature.getFeature(SecurityFeature.java:65)
        at java.base/java.util.stream.ReferencePipeline.accept(ReferencePipeline.java:195)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
        at org.artifactory.metrics.services.CallHomeService.addFeatures(CallHomeService.java:188)
        at org.artifactory.metrics.services.CallHomeService.callHomeEntity(CallHomeService.java:163)
        at org.artifactory.metrics.services.CallHomeService.callHome(CallHomeService.java:111)
       at org.artifactory.metrics.services.CallHomeService$$FastClassBySpringCGLIB$d14b447.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.artifactory.schedule.aop.TraceableMethodInvocation.proceed(TraceableMethodInvocation.java:72)
        at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:333)
        at org.artifactory.schedule.aop.AsyncAdvice.lambda$submit(AsyncAdvice.java:285)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.artifactory.opentracing.TraceableRunnableDecorator.run(TraceableRunnableDecorator.java:30)
        at org.artifactory.concurrent.ArtifactoryRunnable.run(ArtifactoryRunnable.java:53)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8046 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
        at org.jfrog.client.http.CloseableHttpClientDecorator.doExecute(CloseableHttpClientDecorator.java:109)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
        at org.jfrog.access.client.http.AccessHttpClient.restCall(AccessHttpClient.java:123)
        ... 49 common frames omitted
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
        at java.base/java.net.Socket.connect(Socket.java:609)
        at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
        ... 61 common frames omitted

我尝试 google 但我并没有真正成功地找到解决方案。请建议。谢谢!

这是来自 Access-log 的日志,看起来无法加载 Master.key 但该位置存在文件

2020-07-14T02:04:30.745Z [jfac] [INFO] [7f37937aee67c266] [a.k.m.MasterKeyBootstrapper:70] [ocalhost-startStop-2] - 未提供 master.key。正在生成 master.key 2020-07-14T02:04:30.842Z [jfac] [ERROR] [7f37937aee67c266] [.k.m.MasterKeyBootstrapper:122] [ocalhost-startStop-2] - 在 D 中找到现有的主密钥指纹 B、没有master.key文件。请在“/opt/app/jfrog/current/var/etc/security/master.key”中手动提供主密钥文件。 2020-07-14T02:04:30.842Z [jfac] [INFO] [7f37937aee67c266] [.k.m.MasterKeyBootstrapper:125] [ocalhost-startStop-2] - 等待 1 分钟直到提供密钥 手动... 2020-07-14T02:04:35.846Z [jfac] [INFO] [7f37937aee67c266] [o.j.s.c.KeyUtils:108] [ocalhost-startStop-2] - 主密钥丢失。等待 5 秒 w 第 60 秒超时 2020-07-14T02:04:40.847Z [jfac] [INFO] [7f37937aee67c266] [o.j.s.c.KeyUtils:108] [ocalhost-startStop-2] - 主密钥丢失。等待 5 秒 w 第 60 秒超时 2020-07-14T02:04:45.851Z [jfac] [INFO] [7f37937aee67c266] [o.j.s.c.KeyUtils:108] [ocalhost-startStop-2] - 主密钥丢失。等待 5 秒 w 第 60 秒超时

您可能知道 Artifactory 服务器是 Artifactory + Access 服务的组合。您共享的日志片段表明无法连接到端口 8046 上的服务 运行 即访问服务。看起来访问服务由于某种未知原因而关闭。寻找此失败背后原因的最佳位置是 access-service.log,它通常位于 /opt/jfrog/artifactory/var/log 下。如果您可以分享此文件中的片段可能会有所帮助