Skip to content

No Route to Host Server #17

Open
Open

Description

@Redteamer0101

Hi I have followed the instructions but getting this error after installation while running the onboard command.

[2024-04-22 07:33:46,752] --> INFO: MANTIS ASSET DISCOVERY - STARTED
[2024-04-22 07:33:46,753] --> INFO: Executing workname workflowName='default' schedule='daily between 00:00 and 04:00' cmd=[] scanNewOnly=False workflowConfig=[Module(moduleName='discovery', tools=['Subfinder', 'Amass'], order=1), Module(moduleName='prerecon', tools=['FindCDN', 'Naabu'], order=2), Module(moduleName='activehostscan', tools=['HTTPX_Active', 'HTTPX'], order=3), Module(moduleName='activerecon', tools=['Wafw00f'], order=4), Module(moduleName='scan', tools=['DNSTwister', 'Nuclei', 'Corsy'], order=5), Module(moduleName='secretscanner', tools=['SecretScanner'], order=6)]
[2024-04-22 07:33:46,766] --> INFO: Inserting user input into database
Traceback (most recent call last):
File "/home/mantis/launch.py", line 29, in
main()
File "/home/mantis/launch.py", line 23, in main
MantisWorkflow.select_workflow(args=args)
File "/home/mantis/mantis/workflows/mantis_workflow.py", line 9, in select_workflow
asyncio.run(Workflow.workflow_executor(args))
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/home/mantis/mantis/modules/workflow.py", line 62, in workflow_executor
await CrudUtils.insert_assets(assets=asset_dict_list, source='internal')
File "/home/mantis/mantis/utils/crud_utils.py", line 73, in insert_assets
await add_assets_query(asset_data=asset_list)
File "/home/mantis/mantis/db/crud_assets.py", line 7, in add_assets_query
asset = await assets_collection.insert_many(asset_data, False) # 'ordered': "false"}
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pymongo/collection.py", line 707, in insert_many
blk.execute(write_concern, session=session)
File "/usr/local/lib/python3.9/site-packages/pymongo/bulk.py", line 513, in execute
return self.execute_command(generator, write_concern, session)
File "/usr/local/lib/python3.9/site-packages/pymongo/bulk.py", line 390, in execute_command
with client._tmp_session(session) as s:
File "/usr/local/lib/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1729, in _tmp_session
s = self._ensure_session(session)
File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1712, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1657, in __start_session
self._topology._check_implicit_session_support()
File "/usr/local/lib/python3.9/site-packages/pymongo/topology.py", line 538, in _check_implicit_session_support
self._check_session_support()
File "/usr/local/lib/python3.9/site-packages/pymongo/topology.py", line 554, in _check_session_support
self._select_servers_loop(
File "/usr/local/lib/python3.9/site-packages/pymongo/topology.py", line 238, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: mantis.db:27017: [Errno 113] No route to host, Timeout: 30s, Topology Description: <TopologyDescription id: 662612da92d7553a2b77459f, topology_type: Unknown, servers: [<ServerDescription ('mantis.db', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('mantis.db:27017: [Errno 113] No route to host')>]>

Activity

  1. Prateek-Thakare commented on Apr 22, 2024

    @Prateek-Thakare
    Collaborator

    Hey @Redteamer0101
    This is the db connection problem. Please check if the MongoDB container is created, you can check this in the docker dashboard.

  2. Redteamer0101 commented on Apr 22, 2024

    @Redteamer0101
    Author

    I have installed in kali linux and while installing I got success message and yes mongo, appsmith and mantis dockers are there

  3. Redteamer0101 commented on Apr 23, 2024

    @Redteamer0101
    Author

    I have trying installing in ubuntu after allow ports 1337,1338 and 27000 same error I'm getting after installation compelted

  4. Ncoder2 commented on Apr 23, 2024

    @Ncoder2
    Collaborator

    Hi @Redteamer0101 , can you please let us know the below:

    1. Once you ran the setup script, did the final message say, all the 3 were created, mantis, db and dashboard ? If you didnt notice, can you retry the setup file, choose option 1 and paste the last message if all the containers are up.
    2. Ensure you dont have any other mongo instance running in docker, docker ps -a
  5. mastomii commented on Apr 24, 2024

    @mastomii

    Facing the same error, trying to check mongodb container logs and find this error:

    WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
    

    In my case, this happens because I run on virtualization and simply enable the AVX support to fix the errors.

  6. Redteamer0101 commented on Apr 25, 2024

    @Redteamer0101
    Author

    Hi @Ncoder2 ,

    Yese Script ends with success message of all 3 instance created and no there is no another mongo instance I freshly downloaded ubuntu iso for this setup.

  7. Redteamer0101 commented on Apr 25, 2024

    @Redteamer0101
    Author

    Btw, I'm installing his in vm my host machine is windows 11 and in vm i have installed ubuntu and kali to install mantis

  8. Ncoder2 commented on May 1, 2024

    @Ncoder2
    Collaborator

    Hi @Redteamer0101 , The issue here is, that the mongoDB is unreachable when mantis is trying to insert data. In our setup scripts, the way it works is, we have assigned an IP:

    sudo -- sh -c -e "echo '10.10.0.3 mantis.db' >> /etc/hosts";

    It could be that this IP is not reachable from the mantis container.

  9. Redteamer0101 commented on May 2, 2024

    @Redteamer0101
    Author

    @Ncoder2 okay any solution to this???

  10. Ncoder2 commented on May 5, 2024

    @Ncoder2
    Collaborator

    Hi @Redteamer0101 , you can also use our discord for asking questions, just letting you know.
    To decode this issue:

    • please execute this command, 'docker ps -a'. Check if mongo has a port assigned to it.
    • As a secondary step to confirm, please execute 'docker network inspect 'docker network inspect mantis-network'. You should see "IPv4Address": "10.10.0.3/16", attached under mongodb container name
    • Now, from the above error message, it says "no route to host 'mantis.db', 27017", we also add the mantis.db reference in hosts file, so from your host machine where you ran the setup/sh file please check cat /etc/hosts, you should find this mapping - 10.10.0.3 mantis.db.
    • The last option that could go wrong is that since you are running from the VM, how your VM interacts with your host machine, experiment the network options of your kali linux VM from virtualbox or the VM software you are using.
    • The problem statement here really is, when mantis is trying to push the results to mongodb, the mongodb IP is not reachable for some reason
  11. Ncoder2 commented on Jun 14, 2024

    @Ncoder2
    Collaborator

    HI @Redteamer0101 , did you get to look at these points ?

  12. Redteamer0101 commented on Jul 15, 2024

    @Redteamer0101
    Author

    Hi @Ncoder2 , I have tried but same issue I gone through some old issues someone also having issues in VB in windows 11 might be the issue with VB and windows. Also I have tried installing with docker in windows but not getting success can you make installation in windows.

  13. Prateek-Thakare commented on Feb 1, 2025

    @Prateek-Thakare
    Collaborator

    Hi @Redteamer0101
    Was this solved? Is any assistance required from our end on this?

  14. Redteamer0101 commented on May 22, 2025

    @Redteamer0101
    Author

    Hi @Prateek-Thakare , The same issue persists it seems issue is with windows. can you build a docker for windows please it will be a lot helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions