dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #50210
Re: SMS Service Configuration Not Working on 2.27 & 2.28
Hi Sourabh,
Which type of sms gateway have you configured?
BR //
Zubair
On Sat, Oct 21, 2017 at 6:15 PM, Sourabh Bhardwaj <bsourabh191@xxxxxxxxx>
wrote:
> Hi All,
>
> I have setup a Sms Gateway. Gateway is configured successfully. But while
> sending a message through default send sms/ Sms widget available in
> Tracker Capture module it is getting failed each-time.
>
> However If I use same gateway on 2.26 , it is working fine there.
>
> Following is the response returned :
>
>
> *{"summaries":[{"total":1,"failed":1,"pending":0,"sent":0,"status":"FAILED","errorMessage":"failed","batchType":"SMS"}]} *
>
> On log getting error 403 forbidden :
>
>
> * INFO 2017-10-21 21:24:34,247 Response status code: 403 (SmsGateway.java
> [http-nio-8080-exec-7])
> * ERROR 2017-10-21 21:24:34,249 failed (SmsMessageSender.java
> [http-nio-8080-exec-7])
> * INFO 2017-10-21 21:28:51,252 Invoking message sender: SmsMessageSender (
> DefaultOutboundMessageBatchService.java [http-nio-8080-exec-4])
> * ERROR 2017-10-21 21:28:51,665 Client error (SmsGateway.java
> [http-nio-8080-exec-4])
> org.springframework.web.client.HttpClientErrorException: 403 FORBIDDEN
> at org.springframework.web.client.DefaultResponseErrorHandler.
> handleError(DefaultResponseErrorHandler.java:63)
> at org.springframework.web.client.RestTemplate.
> handleResponse(RestTemplate.java:700)
> at org.springframework.web.client.RestTemplate.doExecute(
> RestTemplate.java:653)
> at org.springframework.web.client.RestTemplate.execute(
> RestTemplate.java:613)
> at org.springframework.web.client.RestTemplate.exchange(
> RestTemplate.java:531)
> at org.hisp.dhis.sms.config.SmsGateway.send(SmsGateway.java:89)
> at org.hisp.dhis.sms.config.SimplisticHttpGetGateWay.send(
> SimplisticHttpGetGateWay.java:107)
> at org.hisp.dhis.sms.config.SimplisticHttpGetGateWay.
> lambda$sendBatch$0(SimplisticHttpGetGateWay.java:84)
> at java.util.stream.ReferencePipeline$3$1.accept(
> ReferencePipeline.java:193)
> at java.util.ArrayList$ArrayListSpliterator.
> forEachRemaining(ArrayList.java:1374)
> at java.util.stream.AbstractPipeline.copyInto(
> AbstractPipeline.java:481)
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(
> AbstractPipeline.java:471)
> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(
> ReduceOps.java:708)
> at java.util.stream.AbstractPipeline.evaluate(
> AbstractPipeline.java:234)
> at java.util.stream.ReferencePipeline.collect(
> ReferencePipeline.java:499)
> at org.hisp.dhis.sms.config.SimplisticHttpGetGateWay.sendBatch(
> SimplisticHttpGetGateWay.java:85)
> at org.hisp.dhis.sms.config.SmsMessageSender.sendMessageBatch(
> SmsMessageSender.java:153)
> at org.hisp.dhis.outboundmessage.DefaultOutboundMessageBatchSer
> vice.send(DefaultOutboundMessageBatchService.java:116)
> at java.util.stream.ReferencePipeline$3$1.accept(
> ReferencePipeline.java:193)
> at java.util.ArrayList$ArrayListSpliterator.
> forEachRemaining(ArrayList.java:1374)
> at java.util.stream.AbstractPipeline.copyInto(
> AbstractPipeline.java:481)
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(
> AbstractPipeline.java:471)
> at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(
> ForEachOps.java:151)
> at java.util.stream.ForEachOps$ForEachOp$OfRef.
> evaluateSequential(ForEachOps.java:174)
> at java.util.stream.AbstractPipeline.evaluate(
> AbstractPipeline.java:234)
> at java.util.stream.ReferencePipeline.forEach(
> ReferencePipeline.java:418)
> at java.util.stream.ReferencePipeline$7$1.accept(
> ReferencePipeline.java:270)
> at java.util.HashMap$EntrySpliterator.
> forEachRemaining(HashMap.java:1683)
> at java.util.stream.AbstractPipeline.copyInto(
> AbstractPipeline.java:481)
> at java.util.stream.AbstractPipeline.wrapAndCopyInto(
> AbstractPipeline.java:471)
> at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(
> ReduceOps.java:708)
> at java.util.stream.AbstractPipeline.evaluate(
> AbstractPipeline.java:234)
> at java.util.stream.ReferencePipeline.collect(
> ReferencePipeline.java:499)
> at org.hisp.dhis.outboundmessage.DefaultOutboundMessageBatchSer
> vice.sendBatches(DefaultOutboundMessageBatchService.java:79)
> at org.hisp.dhis.program.message.DefaultProgramMessageService.
> sendMessages(DefaultProgramMessageService.java:209)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.springframework.aop.support.AopUtils.
> invokeJoinpointUsingReflection(AopUtils.java:333)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:157)
> at org.springframework.transaction.interceptor.
> TransactionInterceptor$1.proceedWithInvocation(
> TransactionInterceptor.java:99)
> at org.springframework.transaction.interceptor.
> TransactionAspectSupport.invokeWithinTransaction(
> TransactionAspectSupport.java:282)
> at org.springframework.transaction.interceptor.
> TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:179)
> at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:213)
> at com.sun.proxy.$Proxy101.sendMessages(Unknown Source)
> at org.hisp.dhis.webapi.controller.event.ProgramMessageController.
> saveMessages(ProgramMessageController.java:122)
> at org.hisp.dhis.webapi.controller.event.
> ProgramMessageController$$FastClassBySpringCGLIB$$
> 8aca4477.invoke(<generated>)
> at org.springframework.cglib.proxy.MethodProxy.invoke(
> MethodProxy.java:204)
> at org.springframework.aop.framework.CglibAopProxy$
> CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:157)
> at org.springframework.security.access.intercept.aopalliance.
> MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:179)
> at org.springframework.aop.framework.CglibAopProxy$
> DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
> at org.hisp.dhis.webapi.controller.event.
> ProgramMessageController$$EnhancerBySpringCGLIB$$bf6e0777.saveMessages(<
> generated>)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.springframework.web.method.support.InvocableHandlerMethod.
> doInvoke(InvocableHandlerMethod.java:205)
> at org.springframework.web.method.support.InvocableHandlerMethod.
> invokeForRequest(InvocableHandlerMethod.java:133)
> at org.springframework.web.servlet.mvc.method.annotation.
> ServletInvocableHandlerMethod.invokeAndHandle(
> ServletInvocableHandlerMethod.java:97)
> at org.springframework.web.servlet.mvc.method.annotation.
> RequestMappingHandlerAdapter.invokeHandlerMethod(
> RequestMappingHandlerAdapter.java:827)
> at org.springframework.web.servlet.mvc.method.annotation.
> RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.
> java:738)
> at org.springframework.web.servlet.mvc.method.
> AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
> at org.springframework.web.servlet.DispatcherServlet.
> doDispatch(DispatcherServlet.java:967)
> at org.springframework.web.servlet.DispatcherServlet.
> doService(DispatcherServlet.java:901)
> at org.springframework.web.servlet.FrameworkServlet.
> processRequest(FrameworkServlet.java:970)
> at org.springframework.web.servlet.FrameworkServlet.
> doPost(FrameworkServlet.java:872)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
> at org.springframework.web.servlet.FrameworkServlet.
> service(FrameworkServlet.java:846)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:231)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(
> WsFilter.java:52)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:317)
> at org.springframework.security.web.access.intercept.
> FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
> at org.springframework.security.web.access.intercept.
> FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.access.
> ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.session.
> SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.authentication.
> AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.
> java:111)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.servletapi.
> SecurityContextHolderAwareRequestFilter.doFilter(
> SecurityContextHolderAwareRequestFilter.java:170)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.savedrequest.
> RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.authentication.www.
> BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.
> java:158)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.hisp.dhis.security.filter.CorsFilter.doFilter(
> CorsFilter.java:126)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.authentication.
> AbstractAuthenticationProcessingFilter.doFilter(
> AbstractAuthenticationProcessingFilter.java:200)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.authentication.
> AbstractAuthenticationProcessingFilter.doFilter(
> AbstractAuthenticationProcessingFilter.java:200)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.hisp.dhis.security.filter.CustomAuthenticationFilter.
> doFilter(CustomAuthenticationFilter.java:64)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.oauth2.provider.authentication.
> OAuth2AuthenticationProcessingFilter.doFilter(
> OAuth2AuthenticationProcessingFilter.java:176)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.authentication.logout.
> LogoutFilter.doFilter(LogoutFilter.java:116)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(
> AutomaticAccessFilter.java:115)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.header.HeaderWriterFilter.
> doFilterInternal(HeaderWriterFilter.java:64)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.context.request.async.
> WebAsyncManagerIntegrationFilter.doFilterInternal(
> WebAsyncManagerIntegrationFilter.java:56)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.context.
> SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilt
> er.java:105)
> at org.springframework.security.web.FilterChainProxy$
> VirtualFilterChain.doFilter(FilterChainProxy.java:331)
> at org.springframework.security.web.FilterChainProxy.
> doFilterInternal(FilterChainProxy.java:214)
> at org.springframework.security.web.FilterChainProxy.doFilter(
> FilterChainProxy.java:177)
> at org.springframework.web.filter.DelegatingFilterProxy.
> invokeDelegate(DelegatingFilterProxy.java:346)
> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(
> DelegatingFilterProxy.java:262)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.hisp.dhis.servlet.filter.HttpUrlPatternFilter.doFilter(
> HttpUrlPatternFilter.java:120)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.springframework.web.filter.ShallowEtagHeaderFilter.
> doFilterInternal(ShallowEtagHeaderFilter.java:110)
> at org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFil
> ter.doFilterInternal(ExcludableShallowEtagHeaderFilter.java:112)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.springframework.orm.hibernate5.support.
> OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.springframework.web.filter.CharacterEncodingFilter.
> doFilterInternal(CharacterEncodingFilter.java:197)
> at org.springframework.web.filter.OncePerRequestFilter.
> doFilter(OncePerRequestFilter.java:107)
> at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:193)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:166)
> at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:198)
> at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:96)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> AuthenticatorBase.java:478)
> at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:140)
> at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:80)
> at org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:624)
> at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:87)
> at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:342)
> at org.apache.coyote.http11.Http11Processor.service(
> Http11Processor.java:799)
> at org.apache.coyote.AbstractProcessorLight.process(
> AbstractProcessorLight.java:66)
> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
> AbstractProtocol.java:861)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1455)
> at org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(
> TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> * INFO 2017-10-21 21:28:51,696 Response status code: 403 (SmsGateway.java
> [http-nio-8080-exec-4])
> * ERROR 2017-10-21 21:28:51,697 failed (SmsMessageSender.java
> [http-nio-8080-exec-4])
>
>
> Have tried with 2 different gateways.
> Build revision: 4045811
> Version : 2.27
>
> Thanks & Regards,
> Sourabh Bhardwaj
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References