一键安装0.13.0版本时报空指针错误panic: runtime error: invalid memory address or nil pointer dereference


#1
  • Choerodon平台版本: 0.13.0

  • 遇到问题的执行步骤:
    1、按文档指导,分别执行安装手册里面的第一步、第二步、第三步、第四步
    2、执行“ 一键部署Choerodon”,./c7nctl install -c config.yml --no-timeout --version=0.13

  • 文档地址:https://choerodon.io/zh/docs/installation-configuration/steps/install/choerodon/

  • 环境信息(如:节点信息):
    [root@c7n-test01 c7nctl-0.13.0]# helm ls --all
    NAME REVISION UPDATED STATUS CHART NAMESPACE
    agile-service 1 Mon Jan 14 10:12:19 2019 DEPLOYED agile-service-0.12.0 c7n-system
    api-gateway 1 Mon Jan 14 09:06:46 2019 DEPLOYED api-gateway-0.12.0 c7n-system
    asgard-service 1 Mon Jan 14 08:39:58 2019 DEPLOYED asgard-service-0.12.1 c7n-system
    chartmuseum 1 Fri Jan 11 14:37:03 2019 DEPLOYED chartmuseum-1.6.1 c7n-system
    choerodon-front 1 Mon Jan 14 09:52:06 2019 DEPLOYED choerodon-front-0.12.3 c7n-system
    config-server 1 Fri Jan 11 15:19:39 2019 DEPLOYED config-server-0.12.0 c7n-system
    devops-service 1 Mon Jan 14 09:37:12 2019 DEPLOYED devops-service-0.12.2 c7n-system
    file-service 1 Mon Jan 14 09:29:35 2019 DEPLOYED file-service-0.12.0 c7n-system
    gateway-helper 1 Mon Jan 14 09:13:10 2019 DEPLOYED gateway-helper-0.12.0 c7n-system
    gitlab 1 Fri Jan 11 14:35:35 2019 DEPLOYED gitlab-0.2.0 c7n-system
    gitlab-mysql 1 Fri Jan 11 14:23:10 2019 DEPLOYED mysql-0.1.0 c7n-system
    gitlab-service 1 Mon Jan 14 09:39:42 2019 DEPLOYED gitlab-service-0.12.0 c7n-system
    harbor 1 Fri Jan 11 14:36:55 2019 DEPLOYED harbor-0.3.2 c7n-system
    iam-service 1 Mon Jan 14 08:58:59 2019 DEPLOYED iam-service-0.12.1 c7n-system
    issue-service 1 Mon Jan 14 10:27:27 2019 DEPLOYED issue-service-0.12.1 c7n-system
    manager-service 1 Mon Jan 14 08:39:08 2019 DEPLOYED manager-service-0.12.1 c7n-system
    minio 1 Fri Jan 11 14:36:26 2019 DEPLOYED minio-0.1.0 c7n-system
    mysql 1 Fri Jan 11 14:23:28 2019 DEPLOYED mysql-0.1.0 c7n-system
    nfs-client-provisioner 1 Tue Jan 29 09:55:12 2019 DEPLOYED nfs-client-provisioner-0.1.0 kube-system
    nfs-provisioner 1 Fri Jan 11 13:14:32 2019 DEPLOYED nfs-provisioner-0.1.0 kube-system
    notify-service 1 Mon Jan 14 08:49:21 2019 DEPLOYED notify-service-0.12.1 c7n-system
    oauth-server 1 Mon Jan 14 09:19:08 2019 DEPLOYED oauth-server-0.12.0 c7n-system
    redis 1 Fri Jan 11 14:23:35 2019 DEPLOYED redis-0.1.0 c7n-system
    register-server 1 Fri Jan 11 14:37:06 2019 DEPLOYED go-register-server-0.12.0 c7n-system
    state-machine-service 1 Mon Jan 14 10:22:15 2019 DEPLOYED state-machine-service-0.12.3 c7n-system
    test-manager-service 1 Mon Jan 14 10:37:12 2019 DEPLOYED test-manager-service-0.12.2 c7n-system
    wiki-service 1 Mon Jan 14 11:06:24 2019 DEPLOYED wiki-service-0.12.0 c7n-system
    xwiki 1 Mon Jan 14 10:48:07 2019 DEPLOYED xwiki-0.12.1 c7n-system
    [root@c7n-test01 c7nctl-0.13.0]#

  • 报错日志:
    2019/01/29 09:56:24 [INFO] using exist release wiki-service
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1610507]

goroutine 1 [running]:
github.com/choerodon/c7nctl/pkg/utils.GetPublicIP(0x0, 0x0)
/Users/vink/go/src/github.com/choerodon/c7nctl/pkg/utils/metrics.go:69 +0x97
github.com/choerodon/c7nctl/pkg/utils.(*Metrics).Send(0x2fdebc8)
/Users/vink/go/src/github.com/choerodon/c7nctl/pkg/utils/metrics.go:41 +0x151
github.com/choerodon/c7nctl/pkg/install.(*Context).CheckExist(0x2fdeb60, 0x0, 0x0, 0x0, 0x0)
/Users/vink/go/src/github.com/choerodon/c7nctl/pkg/install/tools.go:115 +0x17b
github.com/choerodon/c7nctl/pkg/install.(*Install).Run(0xc00053afc0, 0xc00028ca00, 0x0, 0x4, 0x0, 0x0)
/Users/vink/go/src/github.com/choerodon/c7nctl/pkg/install/install.go:590 +0x52b
github.com/choerodon/c7nctl/cmd/app.Install(0x2fcf580, 0xc00028ca00, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0)
/Users/vink/go/src/github.com/choerodon/c7nctl/cmd/app/c7n.go:148 +0xcc
github.com/choerodon/c7nctl/cmd.glob..func3(0x2fcf580, 0xc00028ca00, 0x0, 0x4, 0x0, 0x0)
/Users/vink/go/src/github.com/choerodon/c7nctl/cmd/install.go:67 +0x12e
github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra.(*Command).execute(0x2fcf580, 0xc00028c9c0, 0x4, 0x4, 0x2fcf580, 0xc00028c9c0)
/Users/vink/go/src/github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra/command.go:762 +0x473
github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2fcfa40, 0x2fcfa40, 0xc0007a5f60, 0x1)
/Users/vink/go/src/github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra.(*Command).Execute(0x2fcfa40, 0x405700, 0xc0000e0058)
/Users/vink/go/src/github.com/choerodon/c7nctl/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/choerodon/c7nctl/cmd.Execute()
/Users/vink/go/src/github.com/choerodon/c7nctl/cmd/root.go:46 +0x2d
main.main()
/Users/vink/go/src/github.com/choerodon/c7nctl/main.go:20 +0x20
[root@c7n-test01 c7nctl-0.13.0]#

  • 原因分析:

    提出您分析问题的过程,以便我们能更准确的找到问题所在

  • 疑问:

    提出您对于遇到和解决该问题时的疑问


#2

Hi, 请问你在何种操作系统上执行的c7nctl


#3

你好,相关的操作系统信息如下:
[root@c7n-test01 c7nctl-0.13.0]# uname -a
Linux c7n-test01 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@c7n-test01 c7nctl-0.13.0]#
[root@c7n-test01 c7nctl-0.13.0]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@c7n-test01 c7nctl-0.13.0]#


#4

[root@c7n-test01 c7nctl-0.13.0]# free -m
total used free shared buff/cache available
Mem: 257662 43541 169524 4087 44595 208563
Swap: 0 0 0
[root@c7n-test01 c7nctl-0.13.0]#
[root@c7n-test01 c7nctl-0.13.0]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 36G 15G 72% /
devtmpfs 126G 0 126G 0% /dev
tmpfs 126G 0 126G 0% /dev/shm
tmpfs 126G 4.0G 122G 4% /run
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sda1 1014M 189M 826M 19% /boot
/dev/mapper/centos-home 4.6T 9.6G 4.6T 1% /home


#5

在这台机器上执行 curl ns1.dnspod.net:6666 有没有报错信息


#7

执行curl ns1.dnspod.net:6666报超时
curl: (7) Failed connect to ns1.dnspod.net:6666; Connection timed out


#8

Hi, 我们已修复这个问题,你可以更新到0.13.1再试一下

curl -L https://file.choerodon.com.cn/choerodon-install/c7nctl/0.13.1/c7nctl-0.13.1-`uname -s`-amd64.tar.gz | tar -xz && cd c7nctl-0.13.1

#9

thanks,已解决