[ 
https://issues.apache.org/jira/browse/AXIS2-4823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dzung Tran updated AXIS2-4823:
------------------------------

    Description: 
We generate a proxy client using wsdl2Java. We do not have any proxy server 
enabled in our system. However, after the system is in use for some time (a few 
hours), something sets the system variable http.proxyHost to "" (blank) instead 
of null. That is, the call to System.getProperty(HTTP_PROXY_HOST) returns "" 
instead of null. We have yet to figure out why this happens. 

That causes the following if block in 
org.apache.axis2.transport.http.AbstractHTTPSender to evaluate to true and 
execute, 

        // proxy configuration

        if (ProxyConfiguration.isProxyEnabled(msgCtx,targetURL)) {
            log.debug("ProxyConfiguration");
            ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
            proxyConfiguration.configure(msgCtx,client,config);
        }

Because of this, the program thinks a proxy connection with proxy host = "" is 
enabled and it tries to use it. See below 
(org.apache.commons.httpclient.HttpConnection)

    public void open() throws IOException {
        LOG.trace("enter HttpConnection.open()");

        final String host = (proxyHostName == null) ? hostName : proxyHostName;
        final int port = (proxyHostName == null) ? portNumber : proxyPortNumber;
        assertNotOpen();

And because the host is "', we get the error "Address is invalid on local 
machine, or port is not valid on remote machine". 
This prevents all transactions from being sent to the server, and requires a 
restart of our services. 

Question:
What is setting the http.proxyHost to blank? 
Should blank http.proxyHost be treated the same way as null? (If blanks were 
treated like nulls in this case, we wouldn't have this issue.)




  was:
We generate a proxy client using wsdl2Java. We do not have any proxy server 
enabled in our system. However, after the system is in use for some time (a few 
hours), something sets the system variable http.proxyHost to "" (blank) instead 
of null. That is, the call to System.getProperty(HTTP_PROXY_HOST) returns "" 
instead of null. We have yet to figure out why this happens. 

That causes the following if block in 
org.apache.axis2.transport.http.AbstractHTTPSender to evaluate to true and 
execute, 

        // proxy configuration

        if (ProxyConfiguration.isProxyEnabled(msgCtx,targetURL)) {
            log.debug("ProxyConfiguration");
            ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
            proxyConfiguration.configure(msgCtx,client,config);
        }

Because of this, the program thinks a proxy connection with proxy host = "" is 
enabled and it tries to use it. See below 
(org.apache.commons.httpclient.HttpConnection)

    public void open() throws IOException {
        LOG.trace("enter HttpConnection.open()");

        final String host = (proxyHostName == null) ? hostName : proxyHostName;
        final int port = (proxyHostName == null) ? portNumber : proxyPortNumber;
        assertNotOpen();

And because the host is "', you get the error "Address is invalid on local 
machine, or port is not valid on remote machine". 
This prevents all transactions from being sent to the server, and requires a 
restart of our services. 

Question:
Do you know what is setting the http.proxyHost to blank? 
Should blank http.proxyHost be treated the same way as null? (If blanks were 
treated like nulls in this case, we wouldn't have this issue.)





> Error "Address is invalid on local machine..." occurs when http.proxyHost is 
> "" (blank) instead of null.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4823
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4823
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5
>         Environment: Windows Sever 2003
>            Reporter: Dzung Tran
>            Priority: Critical
>
> We generate a proxy client using wsdl2Java. We do not have any proxy server 
> enabled in our system. However, after the system is in use for some time (a 
> few hours), something sets the system variable http.proxyHost to "" (blank) 
> instead of null. That is, the call to System.getProperty(HTTP_PROXY_HOST) 
> returns "" instead of null. We have yet to figure out why this happens. 
> That causes the following if block in 
> org.apache.axis2.transport.http.AbstractHTTPSender to evaluate to true and 
> execute, 
>         // proxy configuration
>         if (ProxyConfiguration.isProxyEnabled(msgCtx,targetURL)) {
>             log.debug("ProxyConfiguration");
>             ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
>             proxyConfiguration.configure(msgCtx,client,config);
>         }
> Because of this, the program thinks a proxy connection with proxy host = "" 
> is enabled and it tries to use it. See below 
> (org.apache.commons.httpclient.HttpConnection)
>     public void open() throws IOException {
>         LOG.trace("enter HttpConnection.open()");
>         final String host = (proxyHostName == null) ? hostName : 
> proxyHostName;
>         final int port = (proxyHostName == null) ? portNumber : 
> proxyPortNumber;
>         assertNotOpen();
> And because the host is "', we get the error "Address is invalid on local 
> machine, or port is not valid on remote machine". 
> This prevents all transactions from being sent to the server, and requires a 
> restart of our services. 
> Question:
> What is setting the http.proxyHost to blank? 
> Should blank http.proxyHost be treated the same way as null? (If blanks were 
> treated like nulls in this case, we wouldn't have this issue.)

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to