[jira] Commented: (SM-733) Using "0.0.0.0" in http endpoint clashes with other http endpoints using the hostname or ip address of the machine, unless port is different

2006-11-01 Thread Guillaume Nodet (JIRA)
[ 
https://issues.apache.org/activemq/browse/SM-733?page=comments#action_37338 ] 

Guillaume Nodet commented on SM-733:


Yeah, you have understood the mechanism.
It needs to be enhanced but I'm not sure there is a real solution.
If one deploys a service on 0.0.0.0:8192, the server socket will be bound
to all IPs of the host.  If you deploy it on 10.9.5.29:8192, it will be bound
only to the specified IP.  The problem is that there is no way to fulfill these
requirements at the same time.

One option would be to enhance the component to support additional
configuration mechanism:
  * bind all services to a single jetty server (disregarding the host:port
  informations, as when installed in a managed mode inside a web server)
  * just use the port and disregard the host 
We also need to take into account the http / https protocol.

Thoughts ?

> Using "0.0.0.0" in http endpoint clashes with other http endpoints using the 
> hostname or ip address of the machine, unless port is different
> 
>
> Key: SM-733
> URL: https://issues.apache.org/activemq/browse/SM-733
> Project: ServiceMix
>  Issue Type: Bug
>  Components: servicemix-http
>Affects Versions: 3.0, 3.1
>Reporter: Chad Sturtz
>Priority: Minor
>
> Three tested scenarios:
> 1) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "10.9.5.29:8192" -- deploy fails (address already in use)
> 2) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "0.0.0.0:8192" --- deploy success
> 3) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "10.9.5.29:8193" --- deploy success
> Basically, ALL SUs must use 0.0.0.0 in their SUs or make sure they're using 
> different ports.
> For someone developing SUs/SAs that will be deployed in an environment with 
> SUs/SAs developed by others, this creates an item that must be coordinated 
> between everyone creating SUs/SAs to be deployed in the common environment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (SM-733) Using "0.0.0.0" in http endpoint clashes with other http endpoints using the hostname or ip address of the machine, unless port is different

2006-11-01 Thread Chad Sturtz (JIRA)
[ 
https://issues.apache.org/activemq/browse/SM-733?page=comments#action_37337 ] 

Chad Sturtz commented on SM-733:


I dug a little deeper and came up with more information.  In addition to the 
scenarios stated above, i've tested the following:

4) SA1 deployed with http endpoint using "10.9.5.29:8192", SA2 deployed using 
http endpoint with "B-1234:8192" where B-1234 and 10.9.5.29 are the same 
machine -- deploy failed
5) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
http endpoint with "B-1234:8192" --- deploy success

I've looked at the code (JettyContextManager.java).  What's happening is the 
created Servers are stored in a Map.  Upon looking at a new endpoint, it 
creates a key based on the location URL.  If there's no Server in the Map with 
that key, it creates a new one.  If you look at the method that creates the key 
based on the location URL (method is: getKey(URL url)), it either uses the host 
as is from the URL, or it uses the hostname if a wild-card host was used in the 
URL (0.0.0.0).  

I would say that the same key should be created for any host resolving to the 
local machine.  However, I don't know how that would affect scenarios where one 
machine has multiple ip addresses.  I've not worked in such an environment and 
don't know if that's an acceptable solution.





> Using "0.0.0.0" in http endpoint clashes with other http endpoints using the 
> hostname or ip address of the machine, unless port is different
> 
>
> Key: SM-733
> URL: https://issues.apache.org/activemq/browse/SM-733
> Project: ServiceMix
>  Issue Type: Bug
>  Components: servicemix-http
>Affects Versions: 3.0, 3.1
>Reporter: Chad Sturtz
>Priority: Minor
>
> Three tested scenarios:
> 1) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "10.9.5.29:8192" -- deploy fails (address already in use)
> 2) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "0.0.0.0:8192" --- deploy success
> 3) SA1 deployed with http endpoint using "0.0.0.0:8192", SA2 deployed using 
> http endpoint with "10.9.5.29:8193" --- deploy success
> Basically, ALL SUs must use 0.0.0.0 in their SUs or make sure they're using 
> different ports.
> For someone developing SUs/SAs that will be deployed in an environment with 
> SUs/SAs developed by others, this creates an item that must be coordinated 
> between everyone creating SUs/SAs to be deployed in the common environment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira