Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

采集主机信息时,其中一台linux机器出现报错 #14

Open
lihaha0218 opened this issue Jan 26, 2022 · 1 comment
Open

采集主机信息时,其中一台linux机器出现报错 #14

lihaha0218 opened this issue Jan 26, 2022 · 1 comment

Comments

@lihaha0218
Copy link

如图
image
填写完csv文件后,第一台192.168.10.10的机器采集报错,其余机器正常采集完成

报错如下
bash-4.2# prophet-cli collect --host-file /root/scan_hosts.csv --output-path /root/
2022-01-26 07:17:58,697 58 INFO [-] Creating collection path /root/hosts_collection...
2022-01-26 07:17:58,736 58 INFO [-] Collecting hosts information from /root/scan_hosts.csv...
2022-01-26 07:17:59,066 58 INFO [-] Found 26 host(s) in csv...
2022-01-26 07:17:59,098 58 INFO [-] Collecting host [LINUX]192.168.10.10...
2022-01-26 07:18:09,139 58 INFO [-] Precheck for Linux 192.168.10.10 connection
2022-01-26 07:18:09,140 58 INFO [-] Checking 192.168.10.10 SSH info...
2022-01-26 07:18:09,140 58 INFO [-] Collecting host 192.168.10.10 info...
2022-01-26 07:18:09,140 58 INFO [-] Prepare config file for Linux collection...
2022-01-26 07:18:09,206 58 INFO [-] Write ansible hosts to /tmp/tmpfgiu4wvr/hosts...
2022-01-26 07:18:09,234 58 INFO [-] Running ansible command...
2022-01-26 07:18:15,440 58 INFO [-] Collected host 192.168.10.10 info
2022-01-26 07:18:15,440 58 ERROR [-] Host 192.168.10.10 check failed due to:
2022-01-26 07:18:15,441 58 ERROR [-] Collect Linux 192.168.10.10 failed, please check yaml file for detailed
Traceback (most recent call last):
File "/opt/prophet/prophet/collector/collector.py", line 149, in collect_hosts
c.collect()
File "/opt/prophet/prophet/collector/hosts/linux.py", line 49, in collect
"check yaml file for detailed" % self.ip)
Exception: Collect Linux 192.168.10.10 failed, please check yaml file for detailed
2022-01-26 07:18:15,644 58 INFO [-] Saving collection report to /root/hosts_collection/collection_report.csv
2022-01-26 07:18:15,644 58 INFO [-] Saved collection report to /root/hosts_collection/collection_report.csv
2022-01-26 07:18:15,645 58 INFO [-] Skip to check host [LINUX]192.168.10.11
2022-01-26 07:18:15,646 58 INFO [-] Skip to check host [LINUX]192.168.10.12
2022-01-26 07:18:15,647 58 INFO [-] Collecting host [LINUX]192.168.10.13...

@lihaha0218
Copy link
Author

把宿主机/root映射到容器的/root目录,之前宿主机登陆过192.168.10.10机器,但是后期192.168.10.10机器被重新安装导致authorized_keys里面保存了192.168.10.10记录,无法ssh,删除authorized_keys中 192.168.10.10记录后可以正常采集

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant