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

Missing SELinux policies when using instances #276

Open
bostrowski13 opened this issue Nov 12, 2018 · 1 comment
Open

Missing SELinux policies when using instances #276

bostrowski13 opened this issue Nov 12, 2018 · 1 comment

Comments

@bostrowski13
Copy link
Contributor

bostrowski13 commented Nov 12, 2018

As I was implementing a number of instances on my RHEL 7.x i ran into 2 issues.

  1. It doesn't look like ulimit is getting set correctly for each service.
    It looks like this could be implemented on each individual service level with this in the systemd unit file.
    LimitNOFILE=$ulimit

Since the available class for ulimit is private and not being called unless you use config via the "default_install => true" arguement, i think its a pretty safe addition to add it to the unit file template and reference it where necessary.

  1. I'm using selinux (because RHEL). and because i'm defining multiple instances, every instance runs on a different port. The problem was the port group for selinux was not allowing me start the service. i was receiving the following error in the redis logfile.

# Creating Server TCP listening socket 192.168.0.5:6381: bind: Permission denied

After looking around a bit, i found that the selinux group is not configured to allow the non-default port i was using (6381) to bind.

# semanage port -l | grep "redis_port_t"
redis_port_t                   tcp      6379, 16379, 26379

I was able to temporarily work around this with the addition of the non-default port
semanage port -a -t redis_port_t -p tcp 6381

now its all happy...

# semanage port -l | grep "redis_port_t"
redis_port_t                   tcp      6381, 6379, 16379, 26379

@bostrowski13 bostrowski13 changed the title selinux Missing - Ulimit and selinux policies when using instances Nov 12, 2018
@ekohl
Copy link
Member

ekohl commented Apr 27, 2021

The ulimit part has been fixed in 0f930aa. Adjusting the title to only reflect the SELinux part.

@ekohl ekohl changed the title Missing - Ulimit and selinux policies when using instances Missing SELinux policies when using instances Apr 27, 2021
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

2 participants