oxo icon indicating copy to clipboard operation
oxo copied to clipboard

Can't launch a scan

Open sscanavini opened this issue 3 years ago • 1 comments

I tried to run my first scan after the installation, but if fails with this:

root@v1793:~# ostorlab scan run --install --agent agent/ostorlab/nmap --agent agent/ostorlab/openvas --agent agent/ostorlab/tsunami --agent agent/ostorlab/nuclei ip 93.55.230.88 🍥 Pulling the image ostorlab.store/agents/agent_5448_inject_asset from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_tracker from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_local_persist_vulnz from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_nmap from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_openvas from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_tsunami from the ostorlab store.

🍏 Installation successful 🍥 Pulling the image ostorlab.store/agents/agent_5448_nuclei from the ostorlab store.

🍏 Installation successful 🍥 Creating scan entry 🍥 Creating network 🍥 Starting services 🍥 Checking services are healthy 🍥 Starting pre-agents 🍥 Checking pre-agents are healthy Traceback (most recent call last): File "/usr/local/bin/ostorlab", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/ostorlab/init.py", line 15, in main rootcli(None) File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/ostorlab/cli/scan/run/assets/ip.py", line 37, in ip_cli runtime.scan(title=ctx.obj['title'], agent_group_definition=ctx.obj['agent_group_definition'], assets=assets) File "/usr/local/lib/python3.10/dist-packages/ostorlab/runtimes/local/runtime.py", line 187, in scan is_healthy = self._check_agents_healthy() File "/usr/local/lib/python3.10/dist-packages/ostorlab/runtimes/local/runtime.py", line 348, in _check_agents_healthy return self._are_agents_ready() File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 324, in wrapped_f return self(f, *args, **kw) File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 404, in call do = self.iter(retry_state=retry_state) File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 349, in iter return fut.result() File "/usr/lib/python3.10/concurrent/futures/_base.py", line 439, in result return self.__get_result() File "/usr/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result raise self._exception File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 407, in call result = fn(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/ostorlab/runtimes/local/runtime.py", line 505, in _are_agents_ready if self._is_service_healthy(service): File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 324, in wrapped_f return self(f, *args, **kw) File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 404, in call do = self.iter(retry_state=retry_state) File "/usr/local/lib/python3.10/dist-packages/tenacity/init.py", line 357, in iter return self.retry_error_callback(retry_state) File "/usr/local/lib/python3.10/dist-packages/ostorlab/runtimes/local/runtime.py", line 394, in retry_error_callback=lambda lv: lv.result(), AttributeError: 'RetryCallState' object has no attribute 'result'

System is Ubuntu 22.04.

sscanavini avatar Sep 10 '22 17:09 sscanavini

Hi @sscanavini, Thanks for raising this issue. The pre-agent health check had failed. Could you please run docker service ls and check which service is not starting then run docker service ps xxxx --no-trunc with xxxxx the failing service id. You can share the output here to identify the root cause.

amine3 avatar Sep 20 '22 07:09 amine3

Closing since we don't have an answer.

3asm avatar Mar 08 '24 15:03 3asm