Openfire (ARCHIVED)

Allow plugin downloads to use a proxy server

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.0.0
  • Fix Version/s: 3.6.0
  • Component/s: Admin Console
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

Allow update checks and plugin downloads to use a proxy server. This will help users behind strict firewalls.

Activity

Hide
Olivier Kaloudoff added a comment -

Hello,

I have a proxy setup here (http proxy, no password), plugin list downloads fine, but plugin itself refuses to download.
Here is the message log;

2006.09.05 13:26:46 Error downloading new plugin version
java.net.UnknownHostException: www.jivesoftware.org
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at org.jivesoftware.wildfire.update.UpdateManager.downloadPlugin(UpdateManager.java:226)
at org.jivesoftware.wildfire.update.PluginDownloadManager.installPlugin(PluginDownloadManager.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81)
at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Maybe the bug has to be re-opened ?

Show
Olivier Kaloudoff added a comment - Hello, I have a proxy setup here (http proxy, no password), plugin list downloads fine, but plugin itself refuses to download. Here is the message log; 2006.09.05 13:26:46 Error downloading new plugin version java.net.UnknownHostException: www.jivesoftware.org at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) at org.jivesoftware.wildfire.update.UpdateManager.downloadPlugin(UpdateManager.java:226) at org.jivesoftware.wildfire.update.PluginDownloadManager.installPlugin(PluginDownloadManager.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239) at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48) at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:81) at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:816) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Maybe the bug has to be re-opened ?
Hide
Olivier Kaloudoff added a comment -

BTW, I'm using 3.0.1

Show
Olivier Kaloudoff added a comment - BTW, I'm using 3.0.1
Hide
Michael Puskar added a comment -

I think this is still broken. We are using Openfire Enterprise v. 3.4.2. I have set:

update.proxy.host proxy.nyu.edu
update.proxy.port 8000

And it uses the settings if I update the list of plugins. This is verified by netstat -a output:

jive.60247 PROXY2.NYU.EDU.8000 49232 0 66608 0 ESTABLISHED

But if I try to then install a plugin by pressing the "+", it ignores the proxy setting, as shown by netstat -a:

jive.59480 63-246-20-125.contegix.com.80 0 0 65700 0 SYN_SENT

Also, the new "Ignite Realtime News" on the main page of the console should likely also be using the proxy, but (I am guessing) doesn't seem to be.

Show
Michael Puskar added a comment - I think this is still broken. We are using Openfire Enterprise v. 3.4.2. I have set: update.proxy.host proxy.nyu.edu update.proxy.port 8000 And it uses the settings if I update the list of plugins. This is verified by netstat -a output: jive.60247 PROXY2.NYU.EDU.8000 49232 0 66608 0 ESTABLISHED But if I try to then install a plugin by pressing the "+", it ignores the proxy setting, as shown by netstat -a: jive.59480 63-246-20-125.contegix.com.80 0 0 65700 0 SYN_SENT Also, the new "Ignite Realtime News" on the main page of the console should likely also be using the proxy, but (I am guessing) doesn't seem to be.
Hide
Daryl Herzmann added a comment -

Looking at downloadPlugin() of UpdateManager.java , we notice a lack of proxy support.

Adding this:

// Check if a proxy should be used
if (isUsingProxy()) { HostConfiguration hc = new HostConfiguration(); hc.setProxy(getProxyHost(), getProxyPort()); httpClient.setHostConfiguration(hc); }

after HttpClient httpClient = new HttpClient(); should be all that is necessary? I don't have a real easy way to test it here.

Show
Daryl Herzmann added a comment - Looking at downloadPlugin() of UpdateManager.java , we notice a lack of proxy support. Adding this: // Check if a proxy should be used if (isUsingProxy()) { HostConfiguration hc = new HostConfiguration(); hc.setProxy(getProxyHost(), getProxyPort()); httpClient.setHostConfiguration(hc); } after HttpClient httpClient = new HttpClient(); should be all that is necessary? I don't have a real easy way to test it here.
Hide
Daryl Herzmann added a comment -

reassigning to 3.6.0

Show
Daryl Herzmann added a comment - reassigning to 3.6.0

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: