commons icon indicating copy to clipboard operation
commons copied to clipboard

Add a command line parameter to specify IP to listen on for HTTP.

Open TJ09 opened this issue 11 years ago • 5 comments

Right now, the HTTP module only accepts a port as configuration. In a machine with multiple IPs/interfaces, there is no way to set which interface is used (e.g. a system with an external and LAN IP has no way to force a service to listen only on the LAN IP and not all interfaces). It'd be nice to have --http_ip or something to control this behavior.

TJ09 avatar Jul 02 '14 21:07 TJ09

@TJ09 Do you have a workaround for this issue?

StephanErb avatar Nov 19 '14 23:11 StephanErb

Does --http_host not work for some reason?

https://github.com/twitter/commons/blob/master/src/python/twitter/common/app/modules/http.py#L63-L69

kevints avatar Nov 19 '14 23:11 kevints

On second thought I assume this is an issue with the Java library?

kevints avatar Nov 19 '14 23:11 kevints

If I understand TJ09s intention correctly, this ticket was meant to be a prerequisite for https://issues.apache.org/jira/browse/AURORA-572. However, looking at the code this might not actually be true.

StephanErb avatar Nov 20 '14 07:11 StephanErb

That was the intention, specifically because I was directed (in #aurora on Freenode) to file tickets in both Twitter Commons and Aurora for solving the same overall problem.

And yes, this is a Java issue, rather than python. Sorry, I didn't realize that there were multiple languages in one repo.

TJ09 avatar Nov 20 '14 08:11 TJ09