Skip to content

Initial setup issue mythic_server unhealthy and RabbitMQ connection issues #317

Description

@TrustArgon

I'm starting a newly installed instance of Mythic3 and am running into issues with getting off the ground.
The system is running Debian 11 and the Docker version is 24.0.4, build 3713ee1.

When I start Mythic using sudo mythic-cli start it goes through the normal setup routine but fails all connection attempts to RabbitMQ. Once the process is done, I can open the mythic login page but when I attempt to connect, I get a popup error about incorrect syntax in the response. When I check the response using dev tools in the browser I see I get the following 502 error:

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.23.4</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

When I get the logs from the mythic_nginx container it shows the connection was refused:

2023/07/18 15:37:56 [error] 28#28: *202 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.1, server: , request: "POST /auth HTTP/1.1", upstream: "http://172.100.0.8:17443/auth", host: "10.0.0.3:7443", referrer: "https://10.0.0.3:7443/new/login"

When I check the logs of the mythic_server container, they are filled with the following:

{"level":"error","error":"URI must not contain whitespace","func":"github.com/its-a-feature/Mythic/rabbitmq.(*rabbitMQConnection).GetConnection","line":124,"time":"2023-07-18T15:13:26Z","message":"Failed to connect to rabbitmq"}

The containers are running:

MYTHIC SERVICE		WEB ADDRESS		BOUND LOCALLY
Nginx (Mythic Web UI)	https://127.0.0.1:7443	 false
Mythic Backend Server	http://127.0.0.1:17443	 true
Hasura GraphQL Console	http://127.0.0.1:8080	 true
Jupyter Console		http://127.0.0.1:8888	 true
Internal Documentation	http://127.0.0.1:8090	 true
								
ADDITIONAL SERVICES	IP			PORT	BOUND LOCALLY
Postgres Database	127.0.0.1		5432	 true
React Server		127.0.0.1		3000	 true
RabbitMQ		127.0.0.1		5672	 true
								
Mythic Main Services
CONTAINER NAME		STATE		STATUS				PORTS
mythic_documentation	running		Up 31 minutes (healthy)		8090/tcp -> 127.0.0.1:8090
mythic_graphql		running		Up 31 minutes (healthy)		8080/tcp -> 127.0.0.1:8080
mythic_jupyter		running		Up 31 minutes (healthy)		8888/tcp -> 127.0.0.1:8888
mythic_nginx		running		Up 31 minutes (healthy)		7443/tcp -> :::7443, 7443
mythic_postgres		running		Up 31 minutes (healthy)		5432/tcp -> 127.0.0.1:5432
mythic_rabbitmq		running		Up 31 minutes (healthy)		5672/tcp -> 127.0.0.1:5672
mythic_react		running		Up 31 minutes (healthy)		3000/tcp -> 127.0.0.1:3000
mythic_server		running		Up 31 minutes (unhealthy)	7000/tcp -> :::7000, 7001/tcp -> :::7001, 7002/tcp -> :::7002, 7003/tcp -> :::7003, 7004/tcp -> :::7004, 7005/tcp -> :::7005, 7006/tcp -> :::7006, 7007/tcp -> :::7007, 7008/tcp -> :::7008, 7009/tcp -> :::7009, 7010/tcp -> :::7010, 17443/tcp -> 127.0.0.1:17443, 17444/tcp -> 127.0.0.1:17444, 7000, 7001, 7002, 7003, 7004, 7005, 7006, 7007, 7008, 7009, 7010
										
Installed Services
CONTAINER NAME	STATE		STATUS				PORTS
athena		restarting	Restarting (1) 56 seconds ago	
									

[*] RabbitMQ is currently listening on localhost. If you have a remote Service, they will be unable to connect (i.e. one running on another server)
    Use 'sudo ./mythic-cli config set rabbitmq_bind_localhost_only false' and restart mythic ('sudo ./mythic-cli restart') to change this

[*] MythicServer is currently listening on localhost. If you have a remote Service, they will be unable to connect (i.e. one running on another server)
    Use 'sudo ./mythic-cli config set mythic_server_bind_localhost_only false' and restart mythic ('sudo ./mythic-cli restart') to change this
[*] If you are using a remote PayloadType or C2Profile, they will need certain environment variables to properly connect to Mythic.
    Use 'sudo ./mythic-cli config service' for configs for these services.

It shows the mythic_server container is 'unhealthy'. I'm not sure what else to check or verify in order to remedy the situation. Any help at all would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions