playit-cloud / playit-agent

The playit program
BSD 2-Clause "Simplified" License
259 stars 21 forks source link

Linux Client - Connection Refused On Client Start, Unable to Establish Agent Connection #80

Closed tenmar closed 7 months ago

tenmar commented 7 months ago

Environment

Install Methods Tried

Expected Behavior Running playit will result in tunnel claim/setup process starting so that I can connect agent using account

Actual Behavior Running playit -s results in the following console output:

2024-04-30T00:42:47.985518Z  INFO playit_cli::ui: no command provided, doing auto run
2024-04-30T00:42:48.986681Z  INFO playit_cli::playit_secret: loading secret file_path=/root/.config/playit_gg/playit.toml
2024-04-30T00:42:48.986743Z  INFO playit_cli::playit_secret: loading secret file_path=/root/.config/playit_gg/playit.toml
2024-04-30T00:42:48.994381Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:48.994399Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:48.994411Z  INFO playit_cli::ui: Preparing Setup
2024-04-30T00:42:51.003759Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:51.003781Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:53.012330Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:53.012350Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
root@deb-docker-pterodactyl-wing:~# docker container logs playit-cloud-agent-docker
2024-04-30T00:42:47.985518Z  INFO playit_cli::ui: no command provided, doing auto run
2024-04-30T00:42:48.986681Z  INFO playit_cli::playit_secret: loading secret file_path=/root/.config/playit_gg/playit.toml
2024-04-30T00:42:48.986743Z  INFO playit_cli::playit_secret: loading secret file_path=/root/.config/playit_gg/playit.toml
2024-04-30T00:42:48.994381Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:48.994399Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:48.994411Z  INFO playit_cli::ui: Preparing Setup
2024-04-30T00:42:51.003759Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:51.003781Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:53.012330Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:53.012350Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:55.020149Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:55.020170Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:57.029141Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:57.029165Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:59.037546Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:42:59.037573Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:42:59.037587Z  INFO playit_cli::ui: Preparing Setup
2024-04-30T00:43:01.042503Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:43:01.042527Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))
2024-04-30T00:43:03.051060Z ERROR playit_agent_core::api::http_client: API call failed error=RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }) request=playit_agent_core::api::api::ReqClaimSetup
2024-04-30T00:43:03.051078Z ERROR playit_cli: Failed loading claim setup error=ClientError(RequestError(Error { kind: Connect, source: Some(ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }))

Other Notes I HAVE BEEN ABLE TO GET A TUNNEL WORKING USING https://www.spigotmc.org/resources/playit-gg.105566/ it is running within a server that is running via pterodactyl wings agent, and it is working flawlessly (minus support for creating tunnels to other ports on the same instance, which seems to be broken, since I always get logs pointing at the port of the minecraft server even if the other tunnels (tcp, tcp+udp) were setup to point at a different port, but that seems to be a limitation of the plugin)

I was previously using this docker image without issue. This morning the tunnel suddenly stopped working. I was able to use the tunnel for both my server and a web page serving the server map on a different port on the same machine.

Is there a reason the linux client doesn't work anymore in either VM or Docker environments, but the minecraft plugin does?

tenmar commented 7 months ago

Update: Turns out my network started DNS blocking the playit gg api doman due to a DNS blocker (pi-hole) on the network. Allowlisting the domain(s) fixed the issue immediately.

To be sure: it didn't manifest until yesterday morning, I was running the proxy just fine for at least a week, and I don't have anything setup to automatically add a domain to a blocklist and hadn't updated my blocklists from external sources for some time.

In any case, the issue was on my end. Closing this.