Xfire unable to comm. to server under proxy

By | 2014-05-19

Log shows

xfire.transport.http.HttpChannel Server returned error code = 417

It sounds like xfire added a “Expect 100 continue” in the header once an outgoing proxy is used.
(E.g. by java property, -Dhttp.proxyHost=10.1.1.1 -Dhttp.proxyPort=8080)

If a reverse proxy server is used, the reverse proxy server may not response to Expect header.

Two solutions:
For apache as reverse proxy

(https://confluence.atlassian.com/display/CROWDKB/Apache+Forwarding+Requests+To+Crowd+Reports+Error+Code+417)

Use mod_header to remove the Expect header from the requests:
1. Edit your Apache configuration file (usually the httpd.conf file) and add the following line:
LoadModule headers_module modules/mod_headers.so
2. Add the following lines to the same configuration file:
RequestHeader unset Expect early

or edit xfire client side, add the parameter to disable EXPECT header
(http://jira.codehaus.org/browse/XFIRE-661)

MSWService service =proxyFactory.create(serviceModel, serviceUrl);
Client client = Client.getInstance(service);

HttpClientParams params = ….
….
params.setParameter(HttpClientParams.USE_EXPECT_CONTINUE,Boolean.FALSE);
client.setProperty(HTTP_CLIENT_PARAMS,params);

 

 

More ref.:

http://translate.google.com.hk/translate?hl=en&sl=es&u=http://enmododebug.wordpress.com/2010/12/10/http-error-417-en-clientes-ws/&prev=/search%3Fq%3Dxfire%2BServer%2Breturned%2Berror%2Bcode%2B%253D%2B417%26es_sm%3D93

 

Leave a Reply

Your email address will not be published. Required fields are marked *