LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2020, 06:01 PM   #1
burgas
LQ Newbie
 
Registered: Sep 2020
Posts: 22

Rep: Reputation: Disabled
Question How to access from docker worker node to service from docker manager node?


I have created docker swarm add join to it from another docker host. In main swarm host I have full control to any swarm services, network, secrets and so on.
But in joined node (worker swarm) for any attempt as
sudo docker node ls
or
sudo docker service ls
I receive
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.
Why? What going wrong?

And I can not attach from secondary node to swarm as manager, only as worker, of course:

Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Last edited by burgas; 11-27-2020 at 07:27 PM.
 
Old 11-27-2020, 09:19 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by burgas View Post
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.
Why? What going wrong?
Obviously you did not join that node correctly. You might get help if you showed how you joined the node. Also check the swarm's status, for example https://stackoverflow.com/questions/...-in-swarm-mode.

By the way, Swarm is not a very future-proof technology. A year ago (?) Docker sold it to a company named Mirantis, which is a major Kubernetes contributor.

Last edited by berndbausch; 11-27-2020 at 09:21 PM.
 
Old 11-29-2020, 12:19 PM   #3
burgas
LQ Newbie
 
Registered: Sep 2020
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thank you @berndbausch, but my idea is store password in one place and share it for all swarm. And I still can not rich this simple goal. Any commands wiht swarm finished with error. This two machines directly connected and has no firewalls. But

X: docker init
X: docker service create …
Y: docker swarm join --token YYYYY xxx.xxx.xxx.xxx:2377 (YYY - worker token)
X: docker node promote x-name
Y: docker node info
Error: manager stopped: can’t initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Y: docker service list
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
node recovery when the node becomes fault by using another node to replace it jerinc Linux - Wireless Networking 0 02-21-2014 05:44 PM
How to transfer the services from node 1 to node 2 ,if node 1 is directly turned off sankarg304 Linux - Server 1 12-12-2012 10:06 AM
[SOLVED] Warning worker http://192.168.1.5/ already used by another worker Apache problem tkmsr Linux - Server 2 06-30-2010 06:37 AM
Tomcat6 Mod_jk - Service finished with status=400 for worker=ajp13 HiOctane21 Linux - Server 0 02-14-2008 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration