not able to connect minion with master

576 views
Skip to first unread message

Aman Raj Singh

unread,
Mar 22, 2021, 11:23:03 AM3/22/21
to Salt-users
hi There,i have installed one salt-master in my ubuntu and one salt-minion in my centos.
in my centos(salt-minion)machine,i have run command touch new.conf in cd etc/salt/minion.d and then wrote-
master: 10.0.2.15
master_port: 4506
then restarted the minion but i am not able to send the minion key to master

ubuntu@salt-master-1:/etc/salt$ sudo salt-key
Accepted Keys:
Denied Keys:
Unaccepted Keys:
Rejected Keys:

master-
Sorry, try again.
[sudo] password for ubuntu: 
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Configuration file path: /etc/salt/master
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO    ] Setting up the Salt Master
[WARNING ] Unable to bind socket 0.0.0.0:4505, error: [Errno 98] Address already in use; Is there another salt-master running?
[INFO    ] The Salt Master is shut down
[DEBUG   ] Stopping the multiprocessing logging queue listener
[DEBUG   ] closing multiprocessing queue
[DEBUG   ] joining multiprocessing queue thread
[DEBUG   ] Stopped the multiprocessing logging queue listener
The salt master is shutdown. The ports are not available to bind

minion-
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] Including configuration from '/etc/salt/minion.d/new.conf'
[DEBUG   ] Reading configuration from /etc/salt/minion.d/new.conf
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: 10.0.2.15
[DEBUG   ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO    ] Setting up the Salt Minion "10.0.2.15"
[INFO    ] An instance is already running. Exiting the Salt Minion
[INFO    ] Shutting down the Salt Minion
[DEBUG   ] Stopping the multiprocessing logging queue listener
[DEBUG   ] closing multiprocessing queue
[DEBUG   ] joining multiprocessing queue thread
[DEBUG   ] Stopped the multiprocessing logging queue listener
The Salt Minion is shutdown.

Although both the salt master and minion are running
master:

ubuntu@salt-master-1:/etc/salt$ systemctl status salt-master
● salt-master.service - The Salt Master Server
     Loaded: loaded (/lib/systemd/system/salt-master.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-03-21 05:36:32 IST; 10h ago
       Docs: man:salt-master(1)
             file:///usr/share/doc/salt/html/contents.html
   Main PID: 24111 (salt-master)
      Tasks: 32 (limit: 2315)
     Memory: 231.4M
     CGroup: /system.slice/salt-master.service
             ├─24111 /usr/bin/python3 /usr/bin/salt-master
             ├─24118 /usr/bin/python3 /usr/bin/salt-master
             ├─24144 /usr/bin/python3 /usr/bin/salt-master
             ├─24145 /usr/bin/python3 /usr/bin/salt-master
             ├─24148 /usr/bin/python3 /usr/bin/salt-master
             ├─24149 /usr/bin/python3 /usr/bin/salt-master
             ├─24150 /usr/bin/python3 /usr/bin/salt-master
             ├─24157 /usr/bin/python3 /usr/bin/salt-master
             ├─24158 /usr/bin/python3 /usr/bin/salt-master
             ├─24159 /usr/bin/python3 /usr/bin/salt-master
             ├─24160 /usr/bin/python3 /usr/bin/salt-master
             ├─24161 /usr/bin/python3 /usr/bin/salt-master
             └─24163 /usr/bin/python3 /usr/bin/salt-master

Mar 21 05:36:30 salt-master-1 systemd[1]: Starting The Salt Master Server...
Mar 21 05:36:32 salt-master-1 systemd[1]: Started The Salt Master Server.


minion:
root@localhost salt]# systemctl status salt-minion
● salt-minion.service - The Salt Minion
   Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2021-03-21 06:42:36 EDT; 13min ago
     Docs: man:salt-minion(1)
           file:///usr/share/doc/salt/html/contents.html
 Main PID: 12725 (salt-minion)
    Tasks: 8 (limit: 8046)
   Memory: 69.7M
   CGroup: /system.slice/salt-minion.service
           ├─12725 /usr/bin/python3.6 /usr/bin/salt-minion
           ├─12734 /usr/bin/python3.6 /usr/bin/salt-minion
           └─12738 /usr/bin/python3.6 /usr/bin/salt-minion

Mar 21 06:48:17 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:49:07 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:49:57 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:50:47 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:51:37 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:52:27 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:53:17 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:54:07 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >
Mar 21 06:54:57 localhost.localdomain salt-minion[12725]: [ERROR   ] Error while bringing up minion >

can someone please help on it

ende...@gmail.com

unread,
Mar 23, 2021, 9:35:32 AM3/23/21
to Salt-users
The first thing that jumps out at me is that you minion is connecting to 4505 but your master is failing to start because something is already bound to port 4506.  Are you truing to run on 4505 of 4605?  Any reason why you aren't using the default ports?  

Phipps, Thomas

unread,
Mar 23, 2021, 11:45:25 AM3/23/21
to salt-...@googlegroups.com
4505 and 4506 are the default ports. I would say stop using the port settings. If you are going to use default settings just don't set them.

since the logs look like standard out logs I'm willing to bet the user tried running the salt-master by hand while the system daemon was already running. which would give the output.

As for the original question, check for firewalls, on the minion, master, and in the network between them. stop using options that are set to defaults, only add settings if you mean to actually change away from default.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/0ccbebca-95d1-4406-b4dc-b3ce50a512dan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages