dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moayi (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] moayi opened issue #2894: https 使用dubbo 的Hessian协议上传文件报错问题
Date Thu, 06 Dec 2018 07:17:41 GMT
各位大佬:
    今天在项目中添加https协议,再做文件上传时,报了以下异常,以前没有添加https时是没有问题的。
异常如下:
     14:28:30.309 [http-nio-443-exec-26] ERROR com.wits.ucp.system.controller.WorkflowController
- OH,MY GOD! SOME ERRORS OCCURED! AS FOLLOWS :
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method saveFiles in the service com.wits.file.provider.FileGridfsProvider.
Tried 3 times of the providers [10.1.100.35:8080] (1/1) from the registry 127.0.0.1:2181 on
the consumer 10.1.100.35 using the dubbo version 2.5.3. Last error is: Failed to invoke remote
service: interface com.wits.file.provider.FileGridfsProvider, method: saveFiles, cause: 302:

        at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:101)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.common.bytecode.proxy3.saveFiles(proxy3.java) ~[?:2.5.3]
        at com.wits.oss.common.FileUtil.uploadityInput(FileUtil.java:61) ~[classes/:?]
        at com.wits.ucp.system.controller.WorkflowController.uploadFile(WorkflowController.java:1690)
~[classes/:?]
        at com.wits.ucp.system.controller.WorkflowController$$FastClassBySpringCGLIB$$eda40a8a.invoke(<generated>)
~[classes/:?]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
~[spring-aop-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at com.wits.ucp.system.controller.WorkflowController$$EnhancerBySpringCGLIB$$def70519.uploadFile(<generated>)
~[classes/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.7.0_79]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
~[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
~[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
~[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
~[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
~[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
~[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) [servlet-api.jar:?]
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
[spring-webmvc-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [servlet-api.jar:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[catalina.jar:7.0.85]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.85]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[catalina.jar:7.0.85]
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
[shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
[shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
[shiro-web-1.2.3.jar:1.2.3]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[catalina.jar:7.0.85]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
[spring-web-4.3.0.RELEASE.jar:4.3.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
[catalina.jar:7.0.85]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
[catalina.jar:7.0.85]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) [catalina.jar:7.0.85]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.85]
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) [catalina.jar:7.0.85]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
[catalina.jar:7.0.85]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) [catalina.jar:7.0.85]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
[tomcat-coyote.jar:7.0.85]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
[tomcat-coyote.jar:7.0.85]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
[tomcat-coyote.jar:7.0.85]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
[tomcat-coyote.jar:7.0.85]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[?:1.7.0_79]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[?:1.7.0_79]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-coyote.jar:7.0.85]
        at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
Caused by: com.caucho.hessian.client.HessianConnectionException: 302: 
        at com.caucho.hessian.client.HessianURLConnection.sendRequest(HessianURLConnection.java:150)
~[hessian-4.0.7.jar:?]
        at com.caucho.hessian.client.HessianProxy.sendRequest(HessianProxy.java:283) ~[hessian-4.0.7.jar:?]
        at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:170) ~[hessian-4.0.7.jar:?]
        at com.sun.proxy.$Proxy117.saveFiles(Unknown Source) ~[?:?]
        at com.alibaba.dubbo.common.bytecode.Wrapper3.invokeMethod(Wrapper3.java) ~[?:2.5.3]
        at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:46)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:72)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol$2.doInvoke(AbstractProxyProtocol.java:93)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75) ~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53) ~[dubbo-2.5.3.jar:2.5.3]
        at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)
~[dubbo-2.5.3.jar:2.5.3]
        ... 78 more
我的配置文件:
     	<!-- 提供方应用信息,用于计算依赖关系 -->
	<dubbo:application name="wits-file-service" />

	<!-- 使用zookeeper注册中心暴露服务地址 -->
	<dubbo:registry protocol="zookeeper" address="${dubbo.registry.address}" />

	<!-- 用dubbo协议在20880端口暴露服务 -->
	<dubbo:protocol name="dubbo" port="20883" />
	

	<!-- 监控中心配置,protocol="registry",表示从注册中心发现监控中心地址
-->
	<dubbo:monitor protocol="registry" />

	<!-- 当ProtocolConfig和ServiceConfig某属性没有配置时,采用此缺省值 <dubbo:provider
timeout="10000" 
		threadpool="fixed" threads="100" accepts="1000" /> -->

	 <dubbo:protocol name="hessian" port="8080" contextpath="wits-file-service" server="servlet"/>

	<!-- 声明需要暴露的服务接口 --> 
	<dubbo:service  interface="com.wits.file.provider.FileProvider" ref="fileProvider" timeout="300000"/>
    <dubbo:service  interface="com.wits.file.provider.FileMangerProvider" ref="fileMangerProvider"
timeout="300000"/>
   
 	<dubbo:service protocol="hessian" interface="com.wits.file.provider.FileGridfsProvider"
ref="fileGridfsProvider" timeout="300000"/>


请各位大佬指教,谢谢。

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2894 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
Mime
View raw message