daemonUtil.go:68: Get “http://localhost:9999/wgcloud/license/getDaemon“

wgcloud的agent在启动时候,日志打印如下错误


[wgcloud-agent]2023/02/10 14:14:00 daemonUtil.go:68: Get "http://localhost:9999/wgcloud/license/getDaemon": dial tcp [::1]:9999: connectex: No connection could be made because the target machine actively refused it.

[wgcloud-agent]2023/02/10 14:14:00 daemonUtil.go:48: runtime error: invalid memory address or nil pointer dereference

[wgcloud-agent]2023/02/10 14:14:00 WgcloudAgent.go:356: 防篡改校验失败: 1

[wgcloud-agent]2023/02/10 14:14:02 licenseUtil.go:34: Get "http://localhost:9999/wgcloud/license/get": dial tcp [::1]:9999: connectex: No connection could be made because the target machine actively refused it.

[wgcloud-agent]2023/02/10 14:14:02 licenseUtil.go:20: runtime error: invalid memory address or nil pointer dereference

[wgcloud-agent]2023/02/10 14:14:02 WgcloudAgent.go:469: Agent started successfully. v3.4.0 . ©2017-2022 www.wgstart.com . All rights reserved.

[wgcloud-agent]2023/02/10 14:14:02 WgcloudAgent.go:470: serverUrl: http://localhost:9999/wgcloud

[wgcloud-agent]2023/02/10 14:14:02 WgcloudAgent.go:471: bindIp: 192.168.1.6

[wgcloud-agent]2023/02/10 14:14:10 WgcloudAgent.go:110: 主机监控信息上报server错误: Post "http://localhost:9999/wgcloud/agentGo/minTask": dial tcp [::1]:9999: connectex: No connection could be made because the target machine actively refused it.

[wgcloud-agent]2023/02/10 14:14:15 WgcloudAgent.go:44: runtime error: invalid memory address or nil pointer dereference

[wgcloud-agent]2023/02/10 14:14:17 WgcloudAgent.go:256: 主机磁盘信息上报server错误: Post "http://localhost:9999/wgcloud/agentDiskGo/minTask": dial tcp [::1]:9999: connectex: No connection could be made because the target machine actively refused it.

[wgcloud-agent]2023/02/10 14:14:17 WgcloudAgent.go:226: runtime error: invalid memory address or nil pointer dereference

解决方案

这个是因为agent连不上server导致的问题,我们在agent主机上,测试下能否ping通server主机

ping [server主机IP]

在agent主机再测试下,能否连通server端口9999(这个是默认的端口,如果我们修改过,就用修改过的端口)

telnet [server主机IP] 9999

如果端口不通,可能是防火墙没有放行端口,或安全软件规则没有放行端口导致的,放行就好了

最后,我们检查下agent配置文件agent/config/application.properties中,serverUrl配置是否正确

#wgcloud-server端访问地址,将下方替换为server主机IP和web端口即可,端口一定要写,即使是80也要写哈

serverUrl=http://localhost:9999

我这里是因为serverUrl配置错了,用的是默认localhost,这个应该修改为server的实际IP

然后重启agent就ok了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值