seashell / drago

☁️ Securely connect anything with WireGuard® and manage all your networks from a single place.

Home Page:https://seashell.github.io/drago

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client not connecting to server

mikkel1156 opened this issue · comments

Trying to setup Drago, got the server up and running currently. On my other host (VM) I'm trying to setup a client with this configuration:

name = "docker2"
ports {
    http = 8181
    rpc = 8282
}

client {
    enabled = true
    servers = ["10.0.10.2:8080"]
}

It's called docker2 since that's the name of the host, but the client is currently not running in docker

I get this output when starting my client (this is the 2nd or 3rd run) and it says it has registered successfully, but I can't see it inside the UI under clients (which is where I expect it to appear).

==> Loading configurations from: [config.hcl]
==> Starting Drago agent...
==> Drago agent configuration:

Bind Addrs: HTTP: 0.0.0.0:8181; RPC: 0.0.0.0:8282
Advertise Addrs: Peer: 0.0.0.0; Server: 0.0.0.0:8282
Log Level: DEBUG
Client: true
Server: true
Version: dev
Acl Enabled: false
Data Dir: /tmp/drago

[DEBUG] server: rpc server started at 0.0.0.0:8282
[INFO] client: using state directory /tmp/drago
[DEBUG] client: interface updates: (created: 0, deleted: 0, updated: 0, unchanged: 0)
[INFO] client: started client node 63c6db4a-192b-88ea-d329-1f796c77ed3e
[DEBUG] agent: http server started at [::]:8181
[DEBUG] client: registering node (client -> server)
[DEBUG] client: running node
[DEBUG] client: updating interface status (client -> server)
[DEBUG] client: updating interface configuration (server -> client)
[DEBUG] client: interface updates: (created: 0, deleted: 0, updated: 0, unchanged: 0)
[DEBUG] server: node 63c6db4a-192b-88ea-d329-1f796c77ed3e already registered.
[DEBUG] client: heartbeating (client -> server)
[DEBUG] client: updating node status (client -> server)
[DEBUG] server: heartbeat from node 63c6db4a-192b-88ea-d329-1f796c77ed3e
[DEBUG] client: updating interface status (client -> server)

Something I'm missing?

It seems that the client that has registered successfully is, in fact, the client running alongside the server (I suppose you started it in dev mode). Apparently, the other client (docker-2) was not able to register properly, which is probably due to the fact that the server address within the servers config is incorrect. Can you please test with the correct RPC port i.e., servers=[ "10.0.10.2:8282"] and let me know if it works?

Ah you were correct, I was making it connect to HTTP instead of RPC. Probably need to create some more documentation on this as well. How many things does Drago need documentation for? I wouldn't mind help writing.

I'm glad it worked! So, we tried to document most of the commands here, but as you noticed, there are still many things missing. For instance, documentation about the client configuration block should be here. It would be amazing if you could help with this. Even if you could point out, from the user perspective, where things are not clear enough or missing, that would be super helpful.