Elastic Agent Unhealthy - No valid comms client available

When I install the elastic agent onto a Ubuntu machine through Security Onion the device will check in as healthy for about 30 seconds and then it will go to an Unhealthy state. I have installed the agent on another Ubuntu machine and it never switches to this Unhealthy state. For some context this is for a school project and then way I've installed these agents is by connecting up to the Security Onion Console then downloading the Elastic agent that way. I make the installer executable then install it.

This is what it is displaying in the logs over and over after initial setup and check-in:

I have run the elastic-agent status command and it shows that it is Healthy and connected but that it is degraded.

Not really sure where to go from here, I have found people with similar issues but not this exact one. Any help is appreciated.