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

salt-master does not respond #22270

Closed
lrhazi opened this issue Apr 2, 2015 · 8 comments
Closed

salt-master does not respond #22270

lrhazi opened this issue Apr 2, 2015 · 8 comments

Comments

@lrhazi
Copy link

lrhazi commented Apr 2, 2015

Fresh install of salt git develop, in docker container from centos6 or centos7 images.
Staring master in foreground, never seems to print anything after:

[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master

this command times out:

➜  ~  salt '*' test.ping     
Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
@lrhazi
Copy link
Author

lrhazi commented Apr 2, 2015

Here is a minimum dockerfile to reproduce the issue:

FROM centos:7
# Update System
RUN yum update -y && yum -y install epel-release curl 
RUN curl -L https://bootstrap.saltstack.com | sh -s -- -M -N -P -F -I -Z -X git develop; exit 0
RUN yum clean all

# Ports
EXPOSE 4505 4506 

# Run Command
CMD salt-master -l debug

build it:

docker build -t salt-master .

run it:

docker run -d --name saltmaster -h saltmaster -p 4505:4505 -p 4506:4506  salt-master

Watch the logs:

# docker logs -f saltmaster
...
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[INFO    ] Found minion id from generate_minion_id(): saltmaster
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Reading configuration from /etc/salt/master

@lrhazi
Copy link
Author

lrhazi commented Apr 2, 2015

I tried with https://github.com/phusion/baseimage-docker, instead of plain centos images and its seems to work fine. so I guess this is Salt in Docker container issue, and not Salt proper. Feel free to close.

Thanks.

@basepi basepi closed this as completed Apr 2, 2015
@basepi
Copy link
Contributor

basepi commented Apr 2, 2015

Thanks for the update @lrhazi !

@basepi
Copy link
Contributor

basepi commented Apr 2, 2015

PS: If you wanted to debug this more, I would recommend getting into the docker container, stopping the master, and then starting it in the foreground with debug loglevel:

salt-master -ldebug

Might give you a better idea of what's going on.

@lrhazi
Copy link
Author

lrhazi commented Apr 3, 2015

I am happy with the my new container image, but I can help debug this if needed. I did what you suggest before, it behaves exactly the same way.. startup seems to stop at same spot!

@basepi
Copy link
Contributor

basepi commented Apr 3, 2015

Well, if you're happy, I'm happy, so let's hold off for now. ;)

@garo
Copy link

garo commented May 19, 2015

I have the same issue here with one of my salt masters: I can't execute any commands with salt from there (for example: salt '*' test.ping).

I'm not using docker and I've installed salt with bootstrap script, using version 2015.5.0

@wangwenchao
Copy link

aha I get it ,

please change the salt master config file the follow:

user: root
return_port: 4506
publish_port : 4505
pid:

after salt-master -l debug

I find the debug verbose tip me that it cant excute some system command need but no permission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants