You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Vesa Varimo (JIRA)" <ji...@apache.org> on 2008/01/02 16:41:34 UTC

[jira] Created: (SYNAPSE-220) Synapse doesn't support virtual hosting

Synapse doesn't support virtual hosting
---------------------------------------

                 Key: SYNAPSE-220
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
             Project: Synapse
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.1
            Reporter: Vesa Varimo



I have environment which has multiple virtual network interfaces. 
I'm unable to specify the ip address that I'm willing to use for Synapse.
It would be great to have this feature implemented.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Commented: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557247#action_12557247 ] 

Asankha C. Perera commented on SYNAPSE-220:
-------------------------------------------

Vesa

I do not agree the address printed in the logs is wrong, as it prints the 'hostname' or the 'ip' of the host server (and not the virtual address being used by the http transport it hosts). We do this by setting the IP and hostname to the Log4J MDC as follows:

            InetAddress addr = InetAddress.getLocalHost();
            if (addr != null) {
                // Get IP Address
                String ipAddr = addr.getHostAddress();
                if (ipAddr != null) {
                    MDC.put("ip", ipAddr);
                }

                // Get hostname
                String hostname = addr.getHostName();
                if (hostname == null) {
                    hostname = ipAddr;
                }
                MDC.put("host", hostname);


> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1-QA-B3
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Commented: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Vesa Varimo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556212#action_12556212 ] 

Vesa Varimo commented on SYNAPSE-220:
-------------------------------------

Yes, this is our case. We want only to listen one address of many available.
If Synapse binds itself to all available addresses, I will have to use different ports for each instances and that is not good.
But your suggested fix will resolve this.

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Reopened: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Vesa Varimo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vesa Varimo reopened SYNAPSE-220:
---------------------------------


The fix that you made on main branch of Synapse fixed the problem correctly in binding to virtual interfaces.

I found another problem with using same port numbers on multiple virtual interfaces, for example 10.0.0.1:9080 and 10.0.0.2:9080.
Synapse checks on startup if port 9080 is used, without using bind-address as an argument, this will result choosing of port 9081 for the second instance.

The problem is in class org.apache.synapse.ServerManager on method private static void selectPort(ConfigurationContext configCtx);. This method doesn't use bind-address as an argument when it resolves port numbers used.

BR,

Vesa

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1-QA-B2
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Resolved: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera resolved SYNAPSE-220.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.1
         Assignee: Asankha C. Perera

Vesa

I assume what you primarily want to do is to listen only on a designated address instead of all addresses on the host? As this is quite simple and straightforward to implement, I am going to push the following fix into the upcoming 1.1.1

<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
     <parameter name="bind-addresses">9.1.2.3</parameter>
     <parameter name="port">port</parameter>
     <parameter name="non-blocking">true</parameter>
</transportReceiver> 

This will allow you to specify the address you want to listen on, as "bind-address"

Please reopen this issue, if this does not solve your problem..

asankha

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Commented: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Vesa Varimo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557170#action_12557170 ] 

Vesa Varimo commented on SYNAPSE-220:
-------------------------------------

Also address printed in log entries is wrong:

2008-01-09 09:07:51,416 [192.168.40.197-qa.ss.company.com] [WrapperSimpl
eAppMain]  INFO HttpCoreNIOListener HTTPS Listener starting on port : 9443
2008-01-09 09:07:51,417 [192.168.40.197-qa.ss.company.com] [WrapperSimpl
eAppMain]  INFO ServerManager Starting transport https on port 9443

I was binding Synapse to interfaces 192.168.40.104 and 192.168.40.105. The main (eth0) interface is 192.168.40.197.



Vesa


> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1-QA-B2
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Resolved: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera resolved SYNAPSE-220.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.1.1-QA-B2)
                   1.1.1-QA-B3

fixed issue with selectPort() method

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>            Assignee: Asankha C. Perera
>             Fix For: 1.1.1-QA-B3
>
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Commented: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Vesa Varimo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555366#action_12555366 ] 

Vesa Varimo commented on SYNAPSE-220:
-------------------------------------

Yes. this should satisfy our needs.

Many thanks,

Vesa

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


[jira] Commented: (SYNAPSE-220) Synapse doesn't support virtual hosting

Posted by "Paul Fremantle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555335#action_12555335 ] 

Paul Fremantle commented on SYNAPSE-220:
----------------------------------------

Is it sufficient to have a list of IP addresses that you wish Synapse to bind to? I guess maybe if its a list it should be address:port. 
So in other words the NIO HTTP Config would look like this:

<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
    	<parameter name="bindaddresses">9.1.2.3:8080, 9.2.240.1:8090</parameter>
    	<parameter name="non-blocking">true</parameter>
    </transportReceiver>

Thoughts?

Paul

> Synapse doesn't support virtual hosting
> ---------------------------------------
>
>                 Key: SYNAPSE-220
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-220
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vesa Varimo
>
> I have environment which has multiple virtual network interfaces. 
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org