Host Environment: MacBook 12.0.1 (21A559) with Apple M1
Dockerfile: Attached in the thread
installation logs: Attached below
How to reproduce:
- replace the token with a valid one in docker file.
- docker build . -t datakit
- docker run -it --entrypoint bash datakit
- ./install.sh
- echo $? # expect 1
- ./install.sh
- echo $? #expect 0
root@dd2e01a6b885:/# ./install.sh
Detect installer installer-linux-arm64-1.1.9-rc7
* Downloading installer /tmp/dk-installer
##################################################################################################################################################################################################### 100.0%
* Installing DataKit...
tee: /var/log/datakit/install.log: No such file or directory
2021-12-19T04:26:11.306Z INFO installer installer/main.go:245 stoping datakit...
2021-12-19T04:26:11.310Z WARN installer installer/main.go:247 stop service: Failed to stop datakit: exit status 1, ignored
2021-12-19T04:26:11.310Z DEBUG installer installer/main.go:659 deprecated install path /usr/local/cloudcare/dataflux/datakit not exists, ignored
Downloading(datakit)... 17 MB/17 MB
Downloading( data)... 34 MB/34 MB
2021-12-19T04:26:53.322Z INFO installer installer/main.go:269 Installing version 1.1.9-rc7...
2021-12-19T04:26:53.322Z WARN installer installer/main.go:348 uninstall service: Failed to uninstall datakit: remove /etc/init.d/datakit: no such file or directory, ignored
2021-12-19T04:26:53.323Z DEBUG dataway dataway/dataway.go:208 httpCli: 0x4000244a00
2021-12-19T04:26:53.323Z INFO installer installer/main.go:498 set cloud provider to ok
2021-12-19T04:26:53.324Z DEBUG installer installer/main.go:501 main config:
default_enabled_inputs = ["cpu", "disk", "diskio", "mem", "swap", "system", "hostobject", "net", "host_processes", "container"]
install_date = 2021-12-19T04:26:53Z
upgrade_date = 0001-01-01T00:00:00Z
namespace = ""
install_version = "1.1.9-rc7"
protect_mode = true
enable_election = false
[[black_lists]]
hosts = []
inputs = []
[[white_lists]]
hosts = []
inputs = []
[dca]
enable = false
listen = "0.0.0.0:9531"
white_list = []
[http_api]
rum_origin_ip_header = "X-Forwarded-For"
listen = "localhost:9529"
disable_404page = false
rum_app_id_white_list = []
[io]
feed_chan_size = 1024
high_frequency_feed_chan_size = 2048
max_cache_count = 1024
cache_dump_threshold = 512
max_dynamic_cache_count = 1024
dynamic_cache_dump_threshold = 512
flush_interval = "10s"
output_file = ""
output_file_inputs = []
enable_cache = false
[dataway]
urls = ["https://aws-openway.guance.com?token=tkn_I_hope_there_is_no_revision_history"]
timeout = "5s"
http_proxy = ""
max_fail = 20
[logging]
log = "/var/log/datakit/log"
gin_log = "/var/log/datakit/gin.log"
level = "info"
disable_color = false
rotate = 32
[global_tags]
cluster = ""
project = ""
site = ""
[environments]
ENV_HOSTNAME = ""
[cgroup]
enable = true
cpu_max = 30.0
cpu_min = 5.0
[tracer]
trace_enabled = false
host = ""
port = ""
service = ""
version = ""
logs_startup = false
debug = false
env = ""
[git_repos]
pull_interval = "1m"
[[git_repos.repo]]
enable = false
url = ""
ssh_private_key_path = ""
ssh_private_key_password = ""
branch = "master"
2021-12-19T04:26:53.324Z INFO config config/cfg.go:520 here is hostname:
2021-12-19T04:26:53.324Z INFO config config/cfg.go:523 set hostname to dd2e01a6b885
2021-12-19T04:26:53.324Z INFO installer installer/main.go:449 installing service datakit...
2021-12-19T04:26:53.328Z INFO installer installer/main.go:274 starting service datakit...
2021-12-19T04:26:53.355Z DEBUG config config/cfg.go:839 remove link /usr/local/bin/datakit...
2021-12-19T04:26:53.355Z WARN config config/cfg.go:841 remove /usr/local/bin/datakit: no such file or directory, ignored
2021-12-19T04:26:53.355Z DEBUG config config/cfg.go:839 remove link /usr/local/sbin/datakit...
2021-12-19T04:26:53.355Z WARN config config/cfg.go:841 remove /usr/local/sbin/datakit: no such file or directory, ignored
2021-12-19T04:26:53.355Z DEBUG config config/cfg.go:839 remove link /sbin/datakit...
2021-12-19T04:26:53.355Z WARN config config/cfg.go:841 remove /sbin/datakit: no such file or directory, ignored
2021-12-19T04:26:53.356Z DEBUG config config/cfg.go:839 remove link /usr/sbin/datakit...
2021-12-19T04:26:53.356Z DEBUG config config/cfg.go:839 remove link /usr/bin/datakit...
2021-12-19T04:26:53.356Z WARN config config/cfg.go:841 remove /usr/bin/datakit: no such file or directory, ignored
2021-12-19T04:26:53.356Z INFO installer installer/main.go:289 :) Install Success!
Visit http://localhost:9529/man/changelog to see DataKit change logs.
Visit http://localhost:9529/monitor to see DataKit running status.
Visit http://localhost:9529/man to see DataKit manuals.
root@dd2e01a6b885:/# echo $?
1
root@dd2e01a6b885:/# ./install.sh
Detect installer installer-linux-arm64-1.1.9-rc7
* Downloading installer /tmp/dk-installer
##################################################################################################################################################################################################### 100.0%
* Installing DataKit...
2021-12-19T04:27:35.719Z INFO installer installer/main.go:245 stoping datakit...
2021-12-19T04:27:35.728Z DEBUG installer installer/main.go:659 deprecated install path /usr/local/cloudcare/dataflux/datakit not exists, ignored
Downloading(datakit)... 17 MB/17 MB
Downloading( data)... 34 MB/34 MB
2021-12-19T04:28:45.151Z INFO installer installer/main.go:269 Installing version 1.1.9-rc7...
2021-12-19T04:28:45.157Z DEBUG dataway dataway/dataway.go:208 httpCli: 0x4000132140
2021-12-19T04:28:45.158Z INFO installer installer/main.go:498 set cloud provider to ok
2021-12-19T04:28:45.160Z DEBUG installer installer/main.go:501 main config:
default_enabled_inputs = ["cpu", "disk", "diskio", "mem", "swap", "system", "hostobject", "net", "host_processes", "container"]
install_date = 2021-12-19T04:28:45Z
upgrade_date = 0001-01-01T00:00:00Z
namespace = ""
install_version = "1.1.9-rc7"
protect_mode = true
enable_election = false
[[black_lists]]
hosts = []
inputs = []
[[white_lists]]
hosts = []
inputs = []
[dca]
enable = false
listen = "0.0.0.0:9531"
white_list = []
[http_api]
rum_origin_ip_header = "X-Forwarded-For"
listen = "localhost:9529"
disable_404page = false
rum_app_id_white_list = []
[io]
feed_chan_size = 1024
high_frequency_feed_chan_size = 2048
max_cache_count = 1024
cache_dump_threshold = 512
max_dynamic_cache_count = 1024
dynamic_cache_dump_threshold = 512
flush_interval = "10s"
output_file = ""
output_file_inputs = []
enable_cache = false
[dataway]
urls = ["https://aws-openway.guance.com?token=tkn_I_hope_there_is_no_revision_history"]
timeout = "5s"
http_proxy = ""
max_fail = 20
[logging]
log = "/var/log/datakit/log"
gin_log = "/var/log/datakit/gin.log"
level = "info"
disable_color = false
rotate = 32
[global_tags]
cluster = ""
project = ""
site = ""
[environments]
ENV_HOSTNAME = ""
[cgroup]
enable = true
cpu_max = 30.0
cpu_min = 5.0
[tracer]
trace_enabled = false
host = ""
port = ""
service = ""
version = ""
logs_startup = false
debug = false
env = ""
[git_repos]
pull_interval = "1m"
[[git_repos.repo]]
enable = false
url = ""
ssh_private_key_path = ""
ssh_private_key_password = ""
branch = "master"
2021-12-19T04:28:45.161Z INFO config config/cfg.go:520 here is hostname:
2021-12-19T04:28:45.161Z INFO config config/cfg.go:523 set hostname to dd2e01a6b885
2021-12-19T04:28:45.163Z INFO installer installer/main.go:449 installing service datakit...
2021-12-19T04:28:45.167Z INFO installer installer/main.go:274 starting service datakit...
2021-12-19T04:28:45.198Z DEBUG config config/cfg.go:839 remove link /usr/local/bin/datakit...
2021-12-19T04:28:45.199Z DEBUG config config/cfg.go:839 remove link /usr/local/sbin/datakit...
2021-12-19T04:28:45.199Z DEBUG config config/cfg.go:839 remove link /sbin/datakit...
2021-12-19T04:28:45.199Z DEBUG config config/cfg.go:839 remove link /usr/sbin/datakit...
2021-12-19T04:28:45.199Z DEBUG config config/cfg.go:839 remove link /usr/bin/datakit...
2021-12-19T04:28:45.199Z INFO installer installer/main.go:289 :) Install Success!
Visit http://localhost:9529/man/changelog to see DataKit change logs.
Visit http://localhost:9529/monitor to see DataKit running status.
Visit http://localhost:9529/man to see DataKit manuals.
root@dd2e01a6b885:/# echo $?
0
root@dd2e01a6b885:/#