D
Dokploy8mo ago
mpcref

What IS the multi-server feature and why isn't it working for me?

Looking at the documentation it's unclear what the multi-server feature does. It only explains how to enable it. So in order to find out I've added and successfully set up a server. I've deployed a static application to the server. The deploy logs show success but the deployment itself is shown as an error and it doesn't work. I've deployed various apps from a template that work fine when I deploy them normally. When I deploy them by choosing the newly added server the deployment fails with the error:
Error response from daemon: Could not attach to network dokploy-network: context deadline exceeded
Error: ❌ Docker command failed".
Error response from daemon: Could not attach to network dokploy-network: context deadline exceeded
Error: ❌ Docker command failed".
I see the docker containers listed for the remote server with the "Created" state and status and when I click "View Logs" I see there are no logs. In short, I can't get this feature to work and so I don't get what the difference is with adding a node to the cluster and targeting that node using placement constraints. - Is it just used as a build server? - Is it a stand-alone server without any swarm cluster features? - Is it a separate Traefik entrypoint and swarm manager node that manages its own set of worker nodes? (I'm hoping it's this) And how can I get it to work?
20 Replies
Siumauricio
Siumauricio8mo ago
Did you setup the server?
mpcref
mpcrefOP8mo ago
yes
Siumauricio
Siumauricio8mo ago
Can you enter to your server and do docker service ls
mpcref
mpcrefOP8mo ago
Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager.
Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager.
Siumauricio
Siumauricio8mo ago
Can you go to setup server and click again ?
mpcref
mpcrefOP8mo ago
ok
Siumauricio
Siumauricio8mo ago
And pass me the logs?
mpcref
mpcrefOP8mo ago
Here you go. I see the same error there but the UI doesn't show it as failed.
Initializing Setup Server
Installing Server Dependencies: ✅
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4734 100 4734 0 0 17664 0 --:--:-- --:--:-- --:--:-- 17664

The latest version of rclone rclone v1.68.1 is already installed.

Docker already installed ✅
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
Swarm initialized ✅
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
Network created ✅
/etc/dokploy already exists ✅
Traefik config already exists ✅
Middlewares config already exists ✅
Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager.
Error response from daemon: network dokploy-network not found
Nixpacks already installed ✅
Buildpacks already installed ✅
Connection closed ✅
Initializing Setup Server
Installing Server Dependencies: ✅
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4734 100 4734 0 0 17664 0 --:--:-- --:--:-- --:--:-- 17664

The latest version of rclone rclone v1.68.1 is already installed.

Docker already installed ✅
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
Swarm initialized ✅
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
Network created ✅
/etc/dokploy already exists ✅
Traefik config already exists ✅
Middlewares config already exists ✅
Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager.
Error response from daemon: network dokploy-network not found
Nixpacks already installed ✅
Buildpacks already installed ✅
Connection closed ✅
I guess I need to run docker swarm leave and then run it again?
Siumauricio
Siumauricio8mo ago
try it, but i think it will not work, let me check the order of the scripts
mpcref
mpcrefOP8mo ago
I think that did it:
Initializing Setup Server
Installing Server Dependencies: ✅
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4734 100 4734 0 0 15420 0 --:--:-- --:--:-- --:--:-- 15420

The latest version of rclone rclone v1.68.1 is already installed.

Docker already installed ✅
Swarm initialized: current node (XXXXXXfxp7pfcg24fimks55fo) is now a manager.

To add a worker to this swarm, run the following command:

docker swarm join --token SWMTKN-1-XXXXXX0icz11enyz9m8mr8eh9sg1zuoliebv5d73t1uqi0e1dk-4byyl02su4lttlpu84t9jqxd1 X.X.X.X:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

Swarm initialized ✅
XXXXXXg1gw3b22ek61r926qt9
Network created ✅
/etc/dokploy already exists ✅
Traefik config already exists ✅
Middlewares config already exists ✅
XXXXXXlzwn3uifmy9smu7o9qb
overall progress: 0 out of 1 tasks
1/1:
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 1 out of 1 tasks
verify: Waiting 5 seconds to verify that tasks are stable...
<snip>
verify: Waiting 1 seconds to verify that tasks are stable...
verify: Service kc3ev9lzwn3uifmy9smu7o9qb converged
Nixpacks already installed ✅
Buildpacks already installed ✅
Connection closed ✅
Initializing Setup Server
Installing Server Dependencies: ✅
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4734 100 4734 0 0 15420 0 --:--:-- --:--:-- --:--:-- 15420

The latest version of rclone rclone v1.68.1 is already installed.

Docker already installed ✅
Swarm initialized: current node (XXXXXXfxp7pfcg24fimks55fo) is now a manager.

To add a worker to this swarm, run the following command:

docker swarm join --token SWMTKN-1-XXXXXX0icz11enyz9m8mr8eh9sg1zuoliebv5d73t1uqi0e1dk-4byyl02su4lttlpu84t9jqxd1 X.X.X.X:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

Swarm initialized ✅
XXXXXXg1gw3b22ek61r926qt9
Network created ✅
/etc/dokploy already exists ✅
Traefik config already exists ✅
Middlewares config already exists ✅
XXXXXXlzwn3uifmy9smu7o9qb
overall progress: 0 out of 1 tasks
1/1:
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 0 out of 1 tasks
overall progress: 1 out of 1 tasks
verify: Waiting 5 seconds to verify that tasks are stable...
<snip>
verify: Waiting 1 seconds to verify that tasks are stable...
verify: Service kc3ev9lzwn3uifmy9smu7o9qb converged
Nixpacks already installed ✅
Buildpacks already installed ✅
Connection closed ✅
Siumauricio
Siumauricio8mo ago
did you have something installed before you linked the server?
mpcref
mpcrefOP8mo ago
apparently so. it's a server that was already being used. let me see if things work for me now...
Siumauricio
Siumauricio8mo ago
Yeah, that could be the reasson
mpcref
mpcrefOP8mo ago
the "Setup server" page should show an error message when the script fails so that users know that it didn't work. yes! deployment succesful and I see logs
Siumauricio
Siumauricio8mo ago
yeah in fact is showing an error but the script is not stopping there, i will check the scripts
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
Swarm initialized ✅
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
Swarm initialized ✅
Nice let me know if you have any troubles
mpcref
mpcrefOP8mo ago
cool, so is it indeed a separate cluster from the main Dokploy server instance?
Siumauricio
Siumauricio8mo ago
yes
mpcref
mpcrefOP8mo ago
It's a nice addition to Dokploy! But IMHO the feature needs some clarification so people understand what it is, especially compared to adding a node. If I understand correctly I can register additional nodes with this cluster but Dokploy UI needs to be updated in order to show those nodes.
Siumauricio
Siumauricio8mo ago
basically multi server allows you that dokploy ui does not need to be running for your applications to work on the remote server. instead cluster feature needs the manager node which is dokploy ui to be on for it to work, if you try to turn off your dokploy instance and visit the page you deployed with multi server, it should still work.
mpcref
mpcrefOP8mo ago
Thanks for helping out! 👍🏼

Did you find this page helpful?