Alfresco Community 4.0 通过 https 与 Microsoft Office 集成
背景
我们正在使用 Alfresco 来取代 SharePoint。主要用途是文档共享和管理。
我在 Windows Server 2008 R2 上使用 MySQL 全新安装了 Alfresco Community 4.0。客户端是Windows 7,安装了Microsoft Office 2010。使用Chrome和最新的IE访问Alfresco。两种浏览器都可以正常工作。客户端安装了 Web 文件夹更新 (KB907306) 并设置了注册表,以允许对 SSL 和非 SSL 共享进行基本身份验证,仅用于测试目的。真实场景只需要SSL。
问题
开箱即用(客户端更新后)Microsoft Office 集成仅在没有 HTTPS 的情况下工作。我们要求它始终使用 HTTPS 运行。 Alfresco 文档包含有关如何设置 SharePoint 协议支持和 HTTPS 的说明。问题是它不会工作,因为 Alfresco 最终崩溃了。它只会显示错误页面并在 Tomcat 日志中生成数百行(主要是堆栈跟踪)。大多数异常源自 Lucene 和 Quartz,确定哪些错误相关是有些困难的。当我禁用文档中描述的更改时,Alfresco 可以工作,但仍然在日志中生成错误。
那么,问题是如何配置 Alfresco 在线编辑以通过 HTTPS 与 Microsoft Office 配合使用?
我遇到的例外情况是:
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception java.lang.nullPointerException
更新
Alfresco Explorer Web 客户端似乎已启动,但从一开始它就在执行任何操作时崩溃。已通过全新安装完成,同时共享网络客户端工作正常。现在,按照官方说明进行操作后,共享将无法使用 HTTPS。
启动实例时的堆栈跟踪。
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:401)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
at org.alfresco.encryption.ssl.AuthSSLProtocolSocketFactory.createSocket(AuthSSLProtocolSocketFactory.java:168)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.alfresco.httpclient.AbstractHttpClient.executeMethod(AbstractHttpClient.java:110)
at org.alfresco.httpclient.AbstractHttpClient.sendRemoteRequest(AbstractHttpClient.java:86)
at org.alfresco.httpclient.HttpClientFactory$HttpsClient.sendRequest(HttpClientFactory.java:307)
at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1008)
at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1453)
at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1126)
at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:483)
at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
尝试访问共享时的堆栈跟踪。也多次收到上述内容。
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception
java.lang.NullPointerException
at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:87)
at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Background
We're using Alfresco to replace SharePoint. The primary use is document sharing and management.
I've got a fresh install of Alfresco Community 4.0 using MySQL on Windows Server 2008 R2. The client is Windows 7 with Microsoft Office 2010 installed. Using Chrome and the latest IE to access Alfresco. Both browsers work mostly fine. The client has the Web Folder update (KB907306) installed as well as registry set to allow basic authentication both for SSL and non-SSL shares just for testing purposes. The real scenario needs to have only SSL.
The issue
Out of the box (well, after client updates) Microsoft Office integration works only without HTTPS. We require that it operates always with HTTPS. The Alfresco documentation contains instructions on how to set up SharePoint protocol support and HTTPS. The problem is that it won't work since Alfresco ends up crashing. It will only display error page and generates hundreds of lines in the Tomcat log (mostly stack traces). Most exceptions originate from Lucene and Quartz and it's somewhat difficult to determine which errors are relevant. When I disable the changes described in the documentation Alfresco works but still generates errors in the log.
So, the question is how to configure Alfresco online edit to work with Microsoft Office via HTTPS?
The exceptions I've got are:
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception java.lang.nullPointerException
Update
It seems that the Alfresco Explorer web client starts but from the beginning it has been crashing on about any action. Has done it with clean install also while Share web client has worked fine. Now after following the official instructions the Share wont' work with HTTPS.
Stack trace when starting the instance.
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:401)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
at org.alfresco.encryption.ssl.AuthSSLProtocolSocketFactory.createSocket(AuthSSLProtocolSocketFactory.java:168)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.alfresco.httpclient.AbstractHttpClient.executeMethod(AbstractHttpClient.java:110)
at org.alfresco.httpclient.AbstractHttpClient.sendRemoteRequest(AbstractHttpClient.java:86)
at org.alfresco.httpclient.HttpClientFactory$HttpsClient.sendRequest(HttpClientFactory.java:307)
at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1008)
at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1453)
at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1126)
at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:483)
at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Stack trace when trying to access Share. Also receive the above multiple times.
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception
java.lang.NullPointerException
at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:87)
at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了在 Alfresco Community 4.0c 和 Microsoft Office 之间启用 HTTPS 通信,我最终将 Jetty 设置为通过标准 7070 端口使用 HTTPS。 Alfresco Share 客户端也使用 HTTPS 与 Web 浏览器进行通信。然而,Alfresco 存储库与 Share、solr 和其他组件之间的通信不能是 HTTPS,因为 Alfresco 似乎会失去连接并抛出一般错误页面。
按照官方说明可以完成设置,但必须跳过一些步骤。其他所有内容均有效,但请勿更改 share-config-custom.xml。此外,alfresco-global.properties 必须将 Alfresco 设置为标准端口,并将 Share 设置为 HTTPS 协议和端口。确保 Web 服务器域不是环回地址。
不知道这是一个错误还是功能。至少它可以与 Office 2010 配合使用。
To enable HTTPS communication between Alfresco Community 4.0c and Microsoft Office I ended up setting Jetty to use HTTPS over the standard 7070 port. Also Alfresco Share client is using HTTPS to communicate with the web browser. However, the communications in between Alfresco repository and Share, solr and other componentes MUST NOT be HTTPS since Alfresco seems to lose connectivity and throw general error page.
By following the official instructions the setup can be done but some steps must be skipped. All else is valid but don't change the share-config-custom.xml. Also alfresco-global.properties must have Alfresco set to standard port and Share set to HTTPS protocol and port. Make sure the web server domain is not loopback address.
Don't know if this is a bug or feature. At least it will work with Office 2010.