-
Notifications
You must be signed in to change notification settings - Fork 302
Syntax check fail if SELinux is Enforcing #24
Comments
It's strange to have this error with this step
It looks like "nginx -t" launch a deamon on your system. |
Hey @jrobeson , have you this problem with Centos 7 ? |
nope. but i only did a check to make sure it worked. I dont' usually use centos, i definitely didn't have this problem in fedora 19 from which centos 7 is based on. I also didn't have selinux enabled (as it defaults to off in digitalocean droplets). I'd suggest that @onemanstartup tries to login to the centos machine and execute it as normal without this role, to see if it can be replicated there. |
Sorry for delay.
|
yes, you do need to start it with super user privs. It's the same as with fedora 19/20/21. http://pkgs.fedoraproject.org/cgit/nginx.git/tree/nginx.service?h=epel7 |
It's the same for Debian also : |
I am starting it with sudo, problem is |
That strange, if you run ansible-playbooks with sudo activated it should work. |
Yes I'm talking exactly about this.
|
I am not sure that "user: root" exist or do what you think. /home/user/playbook_dir/ansible.cfg or ~/.ansible.cfg
|
Damn. I don't know why. It's very strange why nginx starts without this task, but after i read this http://kb.sp.parallels.com/en/121838 and switch SELinux to permissive mode it works. |
I have change the title to correspond to the error. |
Had the same issue with Centos7,
|
logged in a user? which one? |
the fedora 21 digital ocean droplets have enabled selinux by default. I can now replicate this behaviour. EDIT: it says the syntax check passed, but in the systemd journal it says: Jan 13 05:53:54 demo.ht.lazerbal.com nginx[2881]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok |
Thanks for the details, the role need a fix Solution 1
Solution 2 (need validation)
Solution of @beardyjay problem
Don't hesitate to send pull request to correct these problems (separated for each problem). |
solution 2 sounds pretty good to me. |
as far as the good path, couldn't we just default to calling: which nginx ? |
We could call "/usr/bin/env nginx -t" also ( have you try that @beardyjay ? ) |
Also having this issue, I just disabled |
I fixed this issue by adding |
I have an error after that step when starting nginx, without this step nginx is starting ok
With this i see
and when I'm check failed status it is
I don't know why this happen, but anyway, without this step restart or reload will failed anyway, so why this step is needed?
The text was updated successfully, but these errors were encountered: