hack-fan / skadi-agent-shell

A demo of skadi agent binary running in linux shell.
MIT License
8 stars 3 forks source link

service fail #2

Closed liqilei closed 3 years ago

liqilei commented 3 years ago

感谢您的工作,根据教程,我在cent os 安装后,尝试开始服务,遇到以下问题:

(base) ~ sudo systemctl daemon-reload
(base) ~ sudo systemctl enable skadi
Created symlink from /etc/systemd/system/multi-user.target.wants/skadi.service to /usr/lib/systemd/system/skadi.service.
(base) ~ sudo systemctl start skadi
(base) ~ systemctl status skadi
● skadi.service - Skadi
   Loaded: loaded (/usr/lib/systemd/system/skadi.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2021-08-08 05:57:04 CST; 3s ago
     Docs: https://github.com/hack-fan/skadi-agent-shell
  Process: 3365 ExecStart=/usr/bin/skadi (code=exited, status=1/FAILURE)
 Main PID: 3365 (code=exited, status=1/FAILURE)

Aug 08 05:57:04 VM-4-15-centos systemd[1]: Started Skadi.
Aug 08 05:57:04 VM-4-15-centos skadi[3365]: {"level":"fatal","ts":1628373424.9373455,"caller":"skadi-agent-shell/main.go:217","msg":"token is required","stacktrace":"main.main\...roc.go:225"}
Aug 08 05:57:04 VM-4-15-centos systemd[1]: skadi.service: main process exited, code=exited, status=1/FAILURE
Aug 08 05:57:04 VM-4-15-centos systemd[1]: Unit skadi.service entered failed state.
Aug 08 05:57:04 VM-4-15-centos systemd[1]: skadi.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

烦请您施以援手

liqilei commented 3 years ago

参考上一个issue,要先进行agent add的操作。问题解决了,谢谢。