Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently upgraded one of my application servers to CentOS 6(.2) and was getting it ready for production use when I can across the following issue; Whenever I try to add a custom http port by way of semanage, I keep getting the following error messages:

libsemanage.semanage_exec_prog: Child process /sbin/setfiles did not exit cleanly.
libsemanage.semanage_install_active: setfiles returned error code -1.
libsemanage.semanage_exec_prog: Child process /sbin/setfiles did not exit cleanly.
libsemanage.semanage_install_active: setfiles returned error code -1.
/usr/sbin/semanage: Could not commit semanage transaction

The command I am trying to run:

semanage port -a -t http_port_t -p tcp 27960

Current kernel:

 2.6.32-220.4.1.el6.x86_64 #1 SMP Tue Jan 24 02:13:44 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux

Current policycoreutils-python:

2.0.83-19.18.el6

And finally, current selinux settings:

SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

Anyone come across this issue before? If so how did you resolve?

Thanks in advance

-- Edit --

I checked /var/log/messages and it looks like semanage is failing due to " kernel: Out of memory: Kill process 1648 (semanage) score 769 or sacrifice child". This is odd because I have an near exact clone (on linode.com) with same cpu/mem specs and the command runs fine.

free -t -m on server where semanage keeps failing:

             total       used       free     shared    buffers     cached
Mem:           489         79        410          0          0         11
-/+ buffers/cache:         67        422
Swap:            0          0          0
Total:         489         79        410
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Found the issue, I forgot to add a swap drive when I implemented my own custom kernel vs the pre-canned kernels. When I added the swap drive back, the command ran fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.