RhodeCode - What is blocking my connection?

1.5k views Asked by At

All connection attempts on RhodeCode on CentOS 6.3 are refused except from localhost.

Note that iptables is not running, and I am only trying to visit the web interface.

I have googled the exact error message below and looked around SO. I have yet to find a solution.

abort: error: No connection could be made because the target machine actively refused it

If the firewall is down, and I am not trying to modify any repository, what else is preventing me from connecting? EDIT: See #5 below. Not sure how to address it yet.

Things tried and other info

  1. Using localhost, 127.0.0.1 and hostname in production.ini
  2. service iptables stop
  3. Connected over HTTP successfully. In other words, connections are accepted outside RhodeCode.
  4. Made sure no authentication methods were enabled or configured in production.ini
  5. Although the server accepts connections on localhost, netstat -l does not show that port 5000 is listening. Port 5000 is set in production.ini and ps uax | grep paster confirms the server is running. No other software tries to grab port 5000.
1

There are 1 answers

0
Sage Gerard On BEST ANSWER

Ok, apparently I have been misunderstanding the host configuration. I was running on the assumption that host should be set to 127.0.0.1 or localhost in production.ini for RhodeCode to know what host to look for for another service. This was a faulty presumption on my part, since I am used to pointing web applications to local systems to look for databases.

It turns out that host binds the application to a specific address for access, meaning that it RhodeCode was supposed to only respond to local requests, regardless of what other system policies say. The setup docs did not make this clear because it did not specify that external connections would be refused. All it said was:

This command [paster serve] runs the RhodeCode server. The web app should be available at the 127.0.0.1:5000. This ip and port is configurable via the production.ini file created in previous step

The problem was fixed by binding RhodeCode to 0.0.0.0, which opened it to outside connections. Kudos to Ɓukasz Balcerzak for pointing this out in the RC support google group.