-
Notifications
You must be signed in to change notification settings - Fork 362
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
'Failed to connect to database: no reachable servers' using official docker image #796
Comments
Hello, please check out https://github.com/activecm/rita/blob/master/docs/Docker%20Usage.md We recommend using docker compose in order to easily link together RITA and MongoDB. You will first need a copy of the RITA configuration file. A copy can be found at https://raw.githubusercontent.com/activecm/rita/master/etc/rita.yaml Next, edit that configuration file to ensure the internal subnets match your own. (See these lines) If you are using standard RFC1918 internal subnets, you may skip this step. Then, grab a copy of the docker-compose file at https://raw.githubusercontent.com/activecm/rita/master/docker-compose.yml Finally, run the following in the directory with the docker-compose.yml file:
That should kick off an import. From there, you can interrogate the data with commands like
|
This does not work on my Kubuntu installation, I get
I have Docker version 24.0.5, and I have followed all the steps you provided (fetching config file and docker-compose.yml setting env vars with Any idea what goes wrong here? |
One thing that might be at play here is not having the Dockerized configuration in use, since a successful DB connection depends on resolving the database via a container name. RITA has two default configurations to choose from in etc/, and the difference is in the connection spec: --- rita.yaml 2024-06-15 11:40:39.833925486 -0700
+++ rita_docker.yaml 2024-06-15 11:40:39.833925486 -0700
@@ -1,7 +1,7 @@
# This section configures the connection to the MongoDB server and the database name to use
MongoDB:
# See https://docs.mongodb.com/manual/reference/connection-string/
- ConnectionString: mongodb://localhost:27017
+ ConnectionString: mongodb://db:27017
# Example with authentication. Be sure to change the AuthenticationMechanism as well.
# ConnectionString: mongodb://username:password@localhost:27017 |
I get this error:
Failed to connect to database: no reachable servers
when using the official docker hub image.command:
docker run quay.io/activecm/rita import pcap_to_log
pcap_to_log is a folder that contains all log files generated from a pcap using zeek.
output of
ls -l pcap_to_log
:I'm on Manjaro (Linux loris-laptop 5.15.106-1-MANJARO #1 SMP PREEMPT Wed Apr 5 09:58:14 UTC 2023 x86_64 GNU/Linux)
The text was updated successfully, but these errors were encountered: