jfrog artifactory无法验证路由器错误
当我下载、解包并启动jfrog artifactory无法验证路由器错误,artifactory,Artifactory,当我下载、解包并启动artifactory.sh时,我看到以下错误 2020-02-26T21:32:50.496Z [jfac ] [ERROR] [c1b4de79a3f11666] [.j.a.s.s.r.JoinServiceImpl:253] [http-nio-8040-exec-1] - Could not validate router Check-url: http://XXXXXX:8082/router/api/v1/system/ping 然后 2020-02-26T2
artifactory.sh
时,我看到以下错误
2020-02-26T21:32:50.496Z [jfac ] [ERROR] [c1b4de79a3f11666] [.j.a.s.s.r.JoinServiceImpl:253] [http-nio-8040-exec-1] - Could not validate router Check-url: http://XXXXXX:8082/router/api/v1/system/ping
然后
2020-02-26T21:32:55.636Z [jfac ] [WARN ] [67b9d42698f5614c] [o.j.c.ExecutionUtils:141 ] [pool-6-thread-2 ] - Retry 20 Elapsed 9.04 secs failed: Registration with router on URL http://localhost:8046 failed with error: UNAVAILABLE: io exception. Trying again
我意识到我遗漏了一些明显的东西,但我还没弄明白。有什么建议吗?谢谢。Alexey,您是否看到以下方面有任何错误:
- tomcat本地主机日志-将位于var/log/tomcat
- 路由器_service.log-将位于var/log
- access_service.log-将位于var/log
- 您的设备不允许本地主机调用(由于某些安全设置),或者
- 由于其他原因,所有依赖服务都没有启动
另外-请检查您使用的脚本,app/bin文件夹中有一个新的artifactory.sh脚本,应该使用它。Alexey,我怀疑启动脚本拾取了ipv6 ip,导致此问题 您能用以下内容更新system.yaml(将在var/etc/文件夹中)并重试吗
shared:
node:
ip: <your ipv4 IP>
共享:
节点:
知识产权:
在我的例子中,我在尝试访问artifactory时遇到了类似的错误。路由器服务日志:
[root@artifactory-master log]# tail -f router-service.log
2020-03-20T22:17:05.328Z [jfrou] [INFO ] [ ] [bootstrap.go:70 ] [main ] - Router (jfrou) service initialization started. Version: 1.1.0 Revision: c2646fcb28e2d4ca095b07aacebe509d934cef77 PID: 19062 Home: /opt/jfrog/artifactory
2020-03-20T22:17:05.329Z [jfrou] [INFO ] [ ] [bootstrap.go:73 ] [main ] - JFrog Router IP: ::1
2020-03-20T22:17:05.334Z [jfrou] [INFO ] [ ] [bootstrap.go:159 ] [main ] - System configuration encryption report:
shared.newrelic.licenseKey: does not exist in the config file
shared.security.joinKeyFile: file '/opt/jfrog/artifactory/var/etc/security/join.key' - already encrypted
2020-03-20T22:17:05.336Z [jfrou] [INFO ] [ ] [bootstrap.go:78 ] [main ] - JFrog Router Service ID: jfrou@01e3wgemz9esckmd8v48etdy18
2020-03-20T22:17:05.336Z [jfrou] [INFO ] [ ] [bootstrap.go:79 ] [main ] - JFrog Router Node ID: artifactory-master
2020-03-20T22:17:07.354Z [jfrou] [INFO ] [ ] [config_holder.go:107 ] [main ] - configuration update detected
2020-03-20T22:17:10.738Z [jfrou] [FATAL] [ ] [bootstrap.go:100 ] [main ] - Cluster join: Failed joining the cluster; Error: Error response from service registry, status code: 400; message: Could not validate router Check-url: http://::1:8082/router/api/v1/system/ping; detail: I/O error on GET request for "http:///:1:8082/router/api/v1/system/ping": URI does not specify a valid host name: http:///:1:8082/router/api/v1/system/ping; nested exception is org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http:///:1:8082/router/api/v1/system/ping
为了给您一些上下文,我在centos 8虚拟机中运行artifactory,并通过windows机器访问artifactory图形界面。
这意味着,我正在使用web浏览器(Chrome)导航到artifactory实例
为此,我在VM端更新了文件“hosts”和“hostname”(/etc/):
主持人:
127.0.0.1 localhost artifactory-master
::1 localhost artifactory-master
127.0.0.1 localhost artifactory-master
#::1 localhost artifactory-master
主机名:
artifactory-master
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.100.100.10 artifactory-master
在windows计算机中,我用VM主机ip和主机名更新了位于“C:\windows\System32\drivers\etc”中的主机文件:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.100.100.10 artifactory-master
(为了获得VM机器的ip,请运行命令ifconfig)
然后,我通过运行以下命令启动artifactory:
service artifactory start
尝试在浏览器中访问artifactory失败:
http://artifactory-master:8082/ui
我停止了服务,为了在一些试用后实现我的目标,我意识到我必须在“hosts”文件(/etc/)中注释掉地址“::1”:
主持人:
127.0.0.1 localhost artifactory-master
::1 localhost artifactory-master
127.0.0.1 localhost artifactory-master
#::1 localhost artifactory-master
最后,我再次启动了服务,并能够访问artifactory。路由器服务日志:
2020-03-24T23:02:17.219Z [jfrou] [INFO ] [ ] [bootstrap.go:70 ] [main ] - Router (jfrou) service initialization started. Version: 1.1.0 Revision: c2646fcb28e2d4ca095b07aacebe509d934cef77 PID: 14542 Home: /opt/jfrog/artifactory
2020-03-24T23:02:17.220Z [jfrou] [INFO ] [ ] [bootstrap.go:73 ] [main ] - JFrog Router IP: 127.0.0.1
2020-03-24T23:02:17.224Z [jfrou] [INFO ] [ ] [bootstrap.go:159 ] [main ] - System configuration encryption report:
shared.newrelic.licenseKey: does not exist in the config file
shared.security.joinKeyFile: file '/opt/jfrog/artifactory/var/etc/security/join.key' - already encrypted
2020-03-24T23:02:17.227Z [jfrou] [INFO ] [ ] [bootstrap.go:78 ] [main ] - JFrog Router Service ID: jfrou@01e3wgemz9esckmd8v48etdy18
2020-03-24T23:02:17.227Z [jfrou] [INFO ] [ ] [bootstrap.go:79 ] [main ] - JFrog Router Node ID: artifactory-master
2020-03-24T23:02:19.572Z [jfrou] [INFO ] [ ] [config_holder.go:107 ] [main ] - configuration update detected
2020-03-24T23:02:25.663Z [jfrou] [INFO ] [ ] [join_executor.go:180 ] [main ] - Cluster join: Successfully joined the cluster
2020-03-24T23:02:25.813Z [jfrou] [INFO ] [ ] [registry_handler.go:89 ] [main ] - the following services were registered automatically based on persisted data: jfac@01e3wgdn6q0gvj0czswc8k0gp8, jffe@000, jfmd@01e3wges9tvwawj403y5mxfjp7, jfrt@01e3wgfass87mh1nbcv5rv1t98
2020-03-24T23:02:25.984Z [jfrou] [INFO ] [ ] [main.go:36 ] [main ] - Router (jfrou) service initialization completed in 8.808 seconds. Listening on port: 8082
2020-03-24T23:03:01.281Z [jfrou] [INFO ] [7e7df2f621a4e1aa] [local_topology.go:212 ] [main ] -
###############################################################
### All services started successfully in 44.081 seconds ###
###############################################################
PS:我的人工版本是OSS 7.2.1,可能对任何人都有帮助。为了解决这个问题,我尝试了谷歌上提到的很多东西,但都不起作用。最后,通过设置适当的资源来解决这个问题。我使用了4 GB RAM和2个内核,它工作正常我尝试了新的安装,问题依然存在。嗨,Prasanna,感谢您的回复。我确实使用了
artifactory-oss-7.2.1/app/bin/artifactory.sh
.Prasanna,谢谢你的建议。我尝试了127.0.0.1和分配给我的机器的特定IPv4。不过,这并没有真正起作用。我仍然在日志中看到IPv6。我想你重新启动了吗?你能发送router-service.log的初始部分吗?它在哪里记录它选择的共享节点IP?如果它没有启动,我不会让它继续运行。所以我总是启动/artifactory.sh
。按照指示,在system.yaml
中有127.0.0.1
,我在终端上看到了这一点2020-03-03T11:12:08.556Z[shell][INFO][[installerCommon.sh:2518][main]-将JF_共享节点IP设置为fe80::20ac:2da:2a77:51ab%enp0s31f6
thenJF_共享节点IP:fe80::20ac:2da:2a77:51ab%enp0s31f6
然后2020-03-03T11:16:06.821Z[jfrou][INFO][[bootstrap.go:73][main]-JFrog路由器IP:fe80::20ac:2da:2a77:51ab%enp0s31f6
在路由器服务中。日志共享:###节点设置节点:#默认:通过启动脚本IP:127.0.0.1Prasanna自动解决,您建议在系统中设置IP
。yaml
实际上解决了这个问题。最初它对我不起作用的原因是这个文件在开始时显然被重新格式化了#ip
最初被注释掉了,所以我只是取消了注释,当然这还不够。通过确保ip
嵌套在'node'下来调整格式后,我指定的值127.0.0.1
生效。谢谢你花时间帮我弄明白,这很有道理。摘要:如果system.yaml
中未提供shared.node.ip,则该脚本将使用hostname-i
生成shared.node.ip。如果您使hostname-i
返回ipv4或在system.yaml中强制使用ipv4 ip,它将起作用。