Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Fedora 14 instance on Amazon EC2 and I want to make an http request from that instance to another one in the same amazon security group. When I use wget to make the request it works fine. However, when I use Apache HTTP client running through JBoss 6 I get a

HttpClient ConnectException: Connection refused

JBoss does not run as root but rather as user "jboss". I suspect this is an SELinux issue. I logged in as root and I called

setsebool -P httpd_can_network_connect 1


setsebool -P httpd_can_network_relay 1

But still no luck. Any advice would be much appreciated.


share|improve this question
up vote 0 down vote accepted

First, double check that SELinux is, in fact, the culprit by checking your audit log in /var/log/audit/audit.log. There should be message with type=AVC related to JBoss.

Then, you can use that message in conjunction with the audit2allow tool to authorize the blocked access. To authorize everything blocked for any binary with the name jboss in it thus far, run this as root:

grep jboss /var/log/audit/audit.log | audit2allow -M jboss
semodule -i jboss.pp

However, it's better to only allow the specific permissions needed. To do that, copy and paste the relevant lines from your audit log to a new file, and cat that to audit2allow instead.

share|improve this answer

Your Answer


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.