Alfresco分享503 Connection拒绝了

时间:2016-01-24 13:19:31

标签: alfresco alfresco-share

我是Alfresco的新手,并尝试通过本教程制作第一个webscripts https://www.youtube.com/watch?v=utYZaVe9Nd0#t=5m36s

我按照教程中的描述创建Maven项目(share-amp-archetype)和设置运行配置然后单击“运行”,控制台输出看起来像下面的输出

Led 24, 2016 1:56:09 ODP. org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8081"]
Led 24, 2016 1:56:09 ODP. org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Led 24, 2016 1:56:09 ODP. org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Led 24, 2016 1:56:17 ODP. org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Led 24, 2016 1:56:17 ODP. org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2016-01-24 13:56:30,403  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1]    Registered template processor freemarker for extension ftl
2016-01-24 13:56:30,412  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2016-01-24 13:56:30,413  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
2016-01-24 13:56:30,414  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2016-01-24 13:56:36,673  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 369 Web Scripts (+0 failed), 383 URLs
2016-01-24 13:56:36,673  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 8 Package Description Documents (+0 failed) 
2016-01-24 13:56:36,673  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 0 Schema Description Documents (+0 failed) 
2016-01-24 13:56:36,835  INFO  [extensions.webscripts.AbstractRuntimeContainer] [localhost-startStop-1] Initialised Spring Surf Container Web Script Container (in 6386.586ms)
2016-01-24 13:56:36,843  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
2016-01-24 13:56:36,844  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
2016-01-24 13:56:37,077  WARN  [shared_impl.util.LocaleUtils] [localhost-startStop-1] Locale name in faces-config.xml null or empty, setting locale to default locale : cs_CZ
Led 24, 2016 1:56:37 ODP. org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
Led 24, 2016 1:56:37 ODP. org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'Spring Surf Dispatcher Servlet'
Led 24, 2016 1:56:37 ODP. org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]

但是当我尝试连接到http://localhost:8081/share时,我得到 HttpHostConnectException ,每2秒重复抛出一次cca(如下所示)。

2016-01-24 14:03:25,796  INFO  [webscripts.connector.RemoteClient] [http-bio-8081-exec-3] Exception calling (GET) http://localhost:8080/alfresco/s/api/admin/restrictions?guest=true
2016-01-24 14:03:25,803  INFO  [webscripts.connector.RemoteClient] [http-bio-8081-exec-3] Error status 503 Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:140)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
    at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:1095)
    at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:875)
    at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:598)
    at org.alfresco.web.scripts.SlingshotRemoteClient.call(SlingshotRemoteClient.java)
    at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:532)
    at org.alfresco.web.scripts.SlingshotRemoteClient.call(SlingshotRemoteClient.java)
    at org.springframework.extensions.webscripts.connector.HttpConnector.call(HttpConnector.java:70)
    at org.springframework.extensions.webscripts.RequestCachingConnector.call(RequestCachingConnector.java:90)
    at org.springframework.extensions.webscripts.connector.AbstractConnector.call(AbstractConnector.java:116)
    at org.springframework.extensions.webscripts.connector.AuthenticatingConnector.call(AuthenticatingConnector.java:114)
    at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:94)
    at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:55)
    at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:130)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:913)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:168)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:322)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:447)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:117)
    ... 67 more
2016-01-24 14:03:25,814  INFO  [web.site.EditionInterceptor] [http-bio-8081-exec-3] Unable to retrieve License information from Alfresco: 503
2016-01-24 14:03:27,845  INFO  [webscripts.connector.RemoteClient] [http-bio-8081-exec-3] Exception calling (GET) http://localhost:8080/alfresco/s/remoteadm/has/alfresco/site-data/configurations/slingshot.site.configuration.xml?s=sitestore
2016-01-24 14:03:27,846  INFO  [webscripts.connector.RemoteClient] [http-bio-8081-exec-3] Error status 503 Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:140)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
    at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:1095)
    at org.springframework.extensions.webscripts.connector.RemoteClient.service(RemoteClient.java:875)
    at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:598)
    at org.alfresco.web.scripts.SlingshotRemoteClient.call(SlingshotRemoteClient.java)
    at org.springframework.extensions.webscripts.connector.RemoteClient.call(RemoteClient.java:532)
    at org.alfresco.web.scripts.SlingshotRemoteClient.call(SlingshotRemoteClient.java)
    at org.springframework.extensions.webscripts.connector.HttpConnector.call(HttpConnector.java:70)
    at org.springframework.extensions.webscripts.RequestCachingConnector.call(RequestCachingConnector.java:90)
    at org.springframework.extensions.webscripts.connector.AbstractConnector.call(AbstractConnector.java:116)
    at org.springframework.extensions.webscripts.connector.AuthenticatingConnector.call(AuthenticatingConnector.java:114)
    at org.springframework.extensions.webscripts.RemoteStore.callGet(RemoteStore.java:738)
    at org.springframework.extensions.webscripts.RemoteStore.hasDocument(RemoteStore.java:348)
    at org.springframework.extensions.surf.persister.PathStoreObjectPersister.getObject(PathStoreObjectPersister.java:329)
    at org.springframework.extensions.surf.persister.MultiObjectPersister.getObject(MultiObjectPersister.java:122)
    at org.springframework.extensions.surf.ObjectPersistenceService.getObject(ObjectPersistenceService.java:128)
    at org.springframework.extensions.surf.ModelObjectService.getObject(ModelObjectService.java:552)
    at org.springframework.extensions.surf.ModelObjectService.getConfiguration(ModelObjectService.java:157)
    at org.springframework.extensions.surf.site.SiteUtil.getSiteConfiguration(SiteUtil.java:104)
    at org.springframework.extensions.surf.site.SiteUtil.getRootPage(SiteUtil.java:53)
    at org.springframework.extensions.surf.support.AbstractRequestContext.getRootPage(AbstractRequestContext.java:320)
    at org.springframework.extensions.surf.mvc.PageViewResolver.canHandle(PageViewResolver.java:109)
    at org.alfresco.web.site.SlingshotPageViewResolver.canHandle(SlingshotPageViewResolver.java)
    at org.springframework.web.servlet.view.UrlBasedViewResolver.createView(UrlBasedViewResolver.java:386)
    at org.alfresco.web.site.SlingshotPageViewResolver.createView(SlingshotPageViewResolver.java)
    at org.springframework.extensions.webscripts.servlet.mvc.AbstractWebScriptViewResolver.resolveViewName(AbstractWebScriptViewResolver.java:64)
    at org.alfresco.web.site.SlingshotPageViewResolver.resolveViewName(SlingshotPageViewResolver.java)
    at org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1240)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1181)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:986)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:168)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:322)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:447)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:117)
    ... 83 more

在cca 2分钟后(当仍然抛出异常时)我获得了Alfresco登录屏幕,但无法登录(连接原因)。

端口可能存在一些问题。我使用默认的Alfresco(5.0)设置。在 alfresco-global.properties 中,share.port设置为8080(与alfresco.port相同)。

我很感激任何帮助来解决这个问题。提前谢谢。

1 个答案:

答案 0 :(得分:3)

尝试通过下载官方社区安装程序或运行如下的repo-amp来尝试在端口8080上运行OOTB露天战争:

mvn install -Pamp-to-war

您的共享正在尝试连接到您的回购层而没有成功,因为您没有成功。

更熟悉alfresco sdk访问this