Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-root user on master cannot issue salt commands "Failed to connect to the Master, is the Salt Master running?" #15557

Closed
shofetim opened this issue Sep 5, 2014 · 13 comments
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@shofetim
Copy link

shofetim commented Sep 5, 2014

Setup:

Minions running: salt-minion 2014.1.10 (Hydrogen)
Master running: salt-master 2014.1.10 (Hydrogen)

OS: Debian Jessie

Master config:

# Allow salt to execute anything
client_acl:
  salt:
    - .*
    - test.ping

file_roots:
  base:
    - /home/salt/src/config/states

pillar_roots:
  base:
    - /home/salt/src/config/pillar

The master is running as root, and root can send commands:

The salt user cannot use salt to send commands, and reports:
"Failed to connect to the Master, is the Salt Master running?"

salt -l debug "*" cmd.run "uptime"
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/salt/.saltrc
[DEBUG   ] Configuration file path: /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /home/salt/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
Failed to connect to the Master, is the Salt Master running?
[DEBUG   ] Loaded no_out as virtual quiet
[DEBUG   ] Loaded json_out as virtual json
[DEBUG   ] Loaded yaml_out as virtual yaml
[DEBUG   ] Loaded pprint_out as virtual pprint

Salt version says:

salt --versions-report
           Salt: 2014.1.10
         Python: 2.7.8 (default, Aug 23 2014, 21:00:50)
         Jinja2: 2.7.3
       M2Crypto: 0.21.1
 msgpack-python: 0.4.2
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
         PyYAML: 3.11
          PyZMQ: 14.3.1
            ZMQ: 4.0.4

Full debug output from running salt-master -l debug

[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Configuration file path: /etc/salt/master
[INFO    ] Setting up the Salt Master
[DEBUG   ] Loaded master key: /etc/salt/pki/master/master.pem
[INFO    ] Preparing the root key for local communication
[DEBUG   ] Removing stale keyfile: /var/cache/salt/master/.root_key
[INFO    ] Preparing the salt key for local communication
[DEBUG   ] Removing stale keyfile: /var/cache/salt/master/.salt_key
[DEBUG   ] Created pidfile: /var/run/salt-master.pid
[INFO    ] salt-master is starting as user 'root'
[INFO    ] Current values for max open files soft/hard setting: 65536/65536
[INFO    ] The value for the 'max_open_files' setting, 100000, is higher than what the user running salt is allowed to raise to, 65536. Defaulting to 65536.
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Halite: Unavailable.
[INFO    ] Setting up the master communication server
[INFO    ] Starting Salt worker process 0
[INFO    ] Starting the Salt Publisher on tcp://0.0.0.0:4505
[INFO    ] Starting the Salt Puller on ipc:///var/run/salt/master/publish_pull.ipc
[INFO    ] Starting Salt worker process 1
[INFO    ] Starting Salt worker process 2
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Starting Salt worker process 3
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Starting Salt worker process 4
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Updating fileserver cache
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] diff_mtime_map: the maps are the same
[DEBUG   ] This salt-master instance has accepted 8 minion keys.
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /root/.saltrc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Guessing ID. The id can be explicitly in set /etc/salt/minion
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[INFO    ] Skipping lspci call because enable_gpu_grains was set to False in the config. GPU grains will not be available.
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded aptpkg as virtual pkg
[INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded systemd as virtual service
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded groupadd as virtual group
[DEBUG   ] Loaded systemd as virtual service
[INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded linux_sysctl as virtual sysctl
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded debian_ip as virtual ip
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded gnomedesktop as virtual gnome
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded linux_acl as virtual acl
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded aptpkg as virtual pkg
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded zcbuildout as virtual buildout
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] Loaded useradd as virtual user
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded dpkg as virtual lowpkg
[DEBUG   ] Loaded debconfmod as virtual debconf
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG   ] Loaded linux_lvm as virtual lvm
[INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
[DEBUG   ] Loaded linux_lvm as virtual lvm
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded couchdb_return as virtual couchdb
[DEBUG   ] Loaded carbon_return as virtual carbon
[DEBUG   ] Loaded sqlite3_return as virtual sqlite3
[INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
[INFO    ] Worker binding to socket ipc:///var/run/salt/master/workers.ipc
[WARNING ] Stopping the Salt Master

It was working with a previous salt version, but not sure which one.

@basepi
Copy link
Contributor

basepi commented Sep 5, 2014

I assume su-ing to root makes it start working just fine? Just wanted to make sure it was just an issue with that user.

@basepi
Copy link
Contributor

basepi commented Sep 5, 2014

Also, are the directories listed in this doc readable by the salt user?

@basepi basepi added Bug labels Sep 5, 2014
@basepi basepi added this to the Blocked milestone Sep 5, 2014
@shofetim
Copy link
Author

shofetim commented Sep 5, 2014

I assume su-ing to root makes it start working just fine?

Yes

Also, are the directories listed in this doc readable by the salt user?

They are.

@basepi
Copy link
Contributor

basepi commented Sep 5, 2014

Thanks for the update, I've learned to never assume. We will investigate this, see if we can reproduce it.

@basepi basepi modified the milestones: Approved, Blocked Sep 5, 2014
@ocdavid
Copy link

ocdavid commented Sep 5, 2014

I have been seeing the same problem since I upgraded my Salt Master to Ubuntu 14.04. I can't swear to it, but I did believe I saw the problem before I upgraded salt-master from 2014.1.7 to 2014.1.10. Certainly the problem is happening for me on 2014.1.10 and Ubuntu 14.04 right now.

@cachedout
Copy link
Contributor

Can you please double-check that the user in question can access files in /var/run/salt/master? The inability to access those files is nearly always the cause of this error.

@shofetim
Copy link
Author

shofetim commented Sep 9, 2014

Ah, that was the cause.

I had done
chmod 777 -R /var/run/salt/ after reading this which didn't work. But doing

chgrp salt -R /var/run/salt did the trick

Thank you @cachedout 💯

@shofetim shofetim closed this as completed Sep 9, 2014
@ocdavid
Copy link

ocdavid commented Sep 9, 2014

The chmod didn't help me either. And I do not have a salt group on my master to which to chgrp files under /var/run/salt. Is that necessary? I was hoping that setting client_acl in the master config is enough to make non-root users configured in client_acl work again as they used to, until very recently.

If this is caused by an oversight on my part, I'll be happy to learn what it was. Otherwise, it seems to me this should be reopened.

@shofetim
Copy link
Author

shofetim commented Sep 9, 2014

@ocdavid "salt" is the user that I've granted access in the client_acl. I think if you created a group, with any name, and added users to it as well as to the client_acl then that would get things working.

I closed the issues as @cachedout 's answer solved my problem, and since I had opened the issue.

It does seem like further action should probably be taken, perhaps updating the documentation would be a good idea. I will re-open the issue.

I cannot test at the moment, but if memory servers, when I used chmod to change the permissions like so chmod 777 -R /var/run/salt/ it had no effect. Perhaps something about the files being sockets (see the notes section) was the problem?

@shofetim shofetim reopened this Sep 9, 2014
@ocdavid
Copy link

ocdavid commented Sep 9, 2014

Creating a group and adding the users who need salt to the new group, then chgrp {groupname} -R /var/run/salt has resolved the issue for me, but it's unclear why, since the users were already in a group that had full access to the files under /var/run/salt. The individual user (as opposed to group) names in the client_acl stanza did not seem to take effect.

@shofetim
Copy link
Author

Back where I can test. It appears that salt-master modifies the permissions on the files under /var/run/salt upon startup.

ls -la
total 0
drwxrwxrwx 2 root root 120 Sep 10 18:08 ./
drwxr-xr-x 3 salt root  60 Sep  5 09:44 ../
srw-rw-rw- 1 root root   0 Sep 10 18:08 master_event_pub.ipc=
srw------- 1 root root   0 Sep 10 18:08 master_event_pull.ipc=
srw------- 1 root root   0 Sep 10 18:08 publish_pull.ipc=
srwxr-xr-x 1 root root   0 Sep 10 18:08 workers.ipc=

chmod 777 *
chgrp salt *

ls -la
total 0
drwxrwxrwx 2 root root 120 Sep 10 18:08 ./
drwxr-xr-x 3 salt root  60 Sep  5 09:44 ../
srwxrwxrwx 1 root salt   0 Sep 10 18:08 master_event_pub.ipc=
srwxrwxrwx 1 root salt   0 Sep 10 18:08 master_event_pull.ipc=
srwxrwxrwx 1 root salt   0 Sep 10 18:08 publish_pull.ipc=
srwxrwxrwx 1 root salt   0 Sep 10 18:08 workers.ipc=

Then /etc/init.d/salt-master restart

and

ls -la
total 0
drwxrwxrwx 2 root root 120 Sep 10 18:13 ./
drwxr-xr-x 3 salt root  60 Sep  5 09:44 ../
srw-rw-rw- 1 root root   0 Sep 10 18:13 master_event_pub.ipc=
srw------- 1 root root   0 Sep 10 18:13 master_event_pull.ipc=
srw------- 1 root root   0 Sep 10 18:13 publish_pull.ipc=
srwxr-xr-x 1 root root   0 Sep 10 18:13 workers.ipc=

However non-root users continue to be able to send commands via the salt master.

So something odd seems to be up, but I can no longer reproduce the bug. Let me know if I can be of any further help.

@SaltDBray
Copy link

Thanks @shofetim, glad it's no longer in existence. If it re-appears let us know.

@ghost
Copy link

ghost commented Aug 16, 2016

I have this exact issue on Ubuntu 16.4 and Salt 2016.3.2 (on Google Cloud) and no solution worked for me yet.

OMG. An hour of head bashing against the wall and it was only issue with interface in config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

5 participants