Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
shaselai
Posts: 6
Joined: 2010/06/10 15:24:36

Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Post by shaselai » 2011/03/03 22:49:07

I am trying to work with http-bind and have following virtual host:

[code]
<VirtualHost *>

ServerName openfire
DocumentRoot /usr/local/apache2/htdocs/jwchat-1.0

<Directory "/usr/local/apache2/htdocs/jwchat-1.0">
Options +MultiViews
</Directory>

AddDefaultCharset UTF-8
ProxyRequests On

ProxyPass /http-bind http://127.0.0.1:8080/http-bind/
ProxyPass http-bind/ http://127.0.0.1:8080/http-bind/
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
ErrorLog /usr/local/apache2/logs/jwchat_log
LogLevel warn
</VirtualHost>
[/code]
When i go to "http://openfire/http-bind/" i get the "service unavailable" page and here are the logs:
From jwchat_log:

[quote]
[Thu Mar 03 17:27:25 2011] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
[Thu Mar 03 17:27:25 2011] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[/quote]
From apache access.log:

[quote]
12.34.567.89 - - [03/Mar/2011:17:27:25 -0500] "GET /http-bind/ HTTP/1.1" 503 323
[/quote]
Now i tried this on my windows VM and get:

[quote]
windows:
[Thu Mar 03 17:30:33 2011] [error] (OS 10061)No connection could be made because the target machine actively refused it. : proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
[Thu Mar 03 17:30:33 2011] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)

127.0.0.1 - - [03/Mar/2011:17:30:32 -0500] "POST /http-bind/ HTTP/1.1" 503 323
[/quote]
If i go directly to "localhost" i see the server page and when i try to connect (login) i get:

[quote]


503 Service Temporarily Unavailable

Service Temporarily Unavailable
The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.

[/quote]
So basically it seems the http-bind for the conf is working in trying to connect but is getting blocked AND the server's functions is getting blocked too... I am using centos 5.5 and it has SE Linux on it. I tried to disable firewall and SE Linux (didn't restart) but still nothing..
I checked the iptables and it is:

[quote]
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 8080 -j ACCEPT
[/quote]
doesnt this mean it is being allowed?

i am really confused why this is happening..some help please!
thanks!

[Moderator edited to insert [i]code[/i] and [i]quote[/i] tags to aid readability.]

User avatar
TrevorH
Forum Moderator
Posts: 24098
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Post by TrevorH » 2011/03/05 15:06:32

Do you have any error messages in /var/log/messages? What is the output from

[code]
getsebool httpd_can_network_connect
getsebool httpd_can_network_relay
[/code]

shaselai
Posts: 6
Joined: 2010/06/10 15:24:36

Re: Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Post by shaselai » 2011/03/07 16:02:20

it's set to on for connect and off for relay.

User avatar
TrevorH
Forum Moderator
Posts: 24098
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Post by TrevorH » 2011/03/07 17:12:10

I would expect that you'd get selinux denial messages in the log if it were hitting one of those rules but I guess you can try enabling httpd_can_network_relay to see if it makes any difference.

yyagol
Posts: 1015
Joined: 2006/06/10 18:27:44
Location: 32 4&#8242;N 34 47&#8242;E
Contact:

Help needed with 8080 being blocked when accessing 127.0.0.1

Post by yyagol » 2011/03/08 06:58:23

When using mod_proxy
you need to enable access to the proxy settings by :
[code] <Proxy *>
Order deny,allow
Allow from all
</Proxy>[/code]

User avatar
TrevorH
Forum Moderator
Posts: 24098
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help needed with 8080 being blocked when accessing 127.0.0.1:8080

Post by TrevorH » 2011/03/08 12:37:36

True. And looking back at the OP's first post, ProxyRequests should be [b]OFF[/b] unless he wants to create an open proxy :-(

Post Reply