← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] SMS Service Configuration Not Working on 2.27 & 2.28

 

Souravh,

It has been fixed. Test it again.


Br,
Zubair

On Sun, Oct 22, 2017 at 6:25 AM, Sourabh Bhardwaj <bsourabh191@xxxxxxxxx>
wrote:

> Hi Zubair,
>
> Its a HTTP Gateway , it works if we call following API directly in the
> browser:
>
> http://api.sparrowsms.com/v2/sms/?token=###&from=###&to=###&text=test
>
> Following is the screenshot of Gateway configuration :
>
> [image: Inline image 2]
> Regards,
>
> On Sun, Oct 22, 2017 at 4:10 AM, Zubair Asghar Raja <zubair@xxxxxxxxx>
> wrote:
>
>> 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.h
>>> andleError(DefaultResponseErrorHandler.java:63)
>>>         at org.springframework.web.client.RestTemplate.handleResponse(R
>>> estTemplate.java:700)
>>>         at org.springframework.web.client.RestTemplate.doExecute(RestTe
>>> mplate.java:653)
>>>         at org.springframework.web.client.RestTemplate.execute(RestTemp
>>> late.java:613)
>>>         at org.springframework.web.client.RestTemplate.exchange(RestTem
>>> plate.java:531)
>>>         at org.hisp.dhis.sms.config.SmsGateway.send(SmsGateway.java:89)
>>>         at org.hisp.dhis.sms.config.SimplisticHttpGetGateWay.send(Simpl
>>> isticHttpGetGateWay.java:107)
>>>         at org.hisp.dhis.sms.config.SimplisticHttpGetGateWay.lambda$sen
>>> dBatch$0(SimplisticHttpGetGateWay.java:84)
>>>         at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipel
>>> ine.java:193)
>>>         at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Ar
>>> rayList.java:1374)
>>>         at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.
>>> java:481)
>>>         at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPi
>>> peline.java:471)
>>>         at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Reduc
>>> eOps.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(S
>>> msMessageSender.java:153)
>>>         at org.hisp.dhis.outboundmessage.DefaultOutboundMessageBatchSer
>>> vice.send(DefaultOutboundMessageBatchService.java:116)
>>>         at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipel
>>> ine.java:193)
>>>         at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Ar
>>> rayList.java:1374)
>>>         at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.
>>> java:481)
>>>         at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPi
>>> peline.java:471)
>>>         at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(For
>>> EachOps.java:151)
>>>         at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequenti
>>> al(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(ReferencePipel
>>> ine.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(AbstractPi
>>> peline.java:471)
>>>         at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Reduc
>>> eOps.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.s
>>> endMessages(DefaultProgramMessageService.java:209)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>> ssorImpl.java:62)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>> thodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:497)
>>>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsin
>>> gReflection(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.TransactionInter
>>> ceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>>         at org.springframework.transaction.interceptor.TransactionAspec
>>> tSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
>>>         at org.springframework.transaction.interceptor.TransactionInter
>>> ceptor.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.ProgramMessageControll
>>> er.saveMessages(ProgramMessageController.java:122)
>>>         at org.hisp.dhis.webapi.controller.event.ProgramMessageControll
>>> er$$FastClassBySpringCGLIB$$8aca4477.invoke(<generated>)
>>>         at org.springframework.cglib.proxy.MethodProxy.invoke(MethodPro
>>> xy.java:204)
>>>         at org.springframework.aop.framework.CglibAopProxy$CglibMethodI
>>> nvocation.invokeJoinpoint(CglibAopProxy.java:738)
>>>         at org.springframework.aop.framework.ReflectiveMethodInvocation
>>> .proceed(ReflectiveMethodInvocation.java:157)
>>>         at org.springframework.security.access.intercept.aopalliance.Me
>>> thodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)
>>>         at org.springframework.aop.framework.ReflectiveMethodInvocation
>>> .proceed(ReflectiveMethodInvocation.java:179)
>>>         at org.springframework.aop.framework.CglibAopProxy$DynamicAdvis
>>> edInterceptor.intercept(CglibAopProxy.java:673)
>>>         at org.hisp.dhis.webapi.controller.event.ProgramMessageControll
>>> er$$EnhancerBySpringCGLIB$$bf6e0777.saveMessages(<generated>)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>>> ssorImpl.java:62)
>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>>> thodAccessorImpl.java:43)
>>>         at java.lang.reflect.Method.invoke(Method.java:497)
>>>         at org.springframework.web.method.support.InvocableHandlerMetho
>>> d.doInvoke(InvocableHandlerMethod.java:205)
>>>         at org.springframework.web.method.support.InvocableHandlerMetho
>>> d.invokeForRequest(InvocableHandlerMethod.java:133)
>>>         at org.springframework.web.servlet.mvc.method.annotation.Servle
>>> tInvocableHandlerMethod.invokeAndHandle(ServletInvocableHand
>>> lerMethod.java:97)
>>>         at org.springframework.web.servlet.mvc.method.annotation.Reques
>>> tMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHan
>>> dlerAdapter.java:827)
>>>         at org.springframework.web.servlet.mvc.method.annotation.Reques
>>> tMappingHandlerAdapter.handleInternal(RequestMappingHandlerA
>>> dapter.java:738)
>>>         at org.springframework.web.servlet.mvc.method.AbstractHandlerMe
>>> thodAdapter.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.processRequ
>>> est(FrameworkServlet.java:970)
>>>         at org.springframework.web.servlet.FrameworkServlet.doPost(Fram
>>> eworkServlet.java:872)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
>>>         at org.springframework.web.servlet.FrameworkServlet.service(Fra
>>> meworkServlet.java:846)
>>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:231)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilte
>>> r.java:52)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:317)
>>>         at org.springframework.security.web.access.intercept.FilterSecu
>>> rityInterceptor.invoke(FilterSecurityInterceptor.java:127)
>>>         at org.springframework.security.web.access.intercept.FilterSecu
>>> rityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.access.ExceptionTranslation
>>> Filter.doFilter(ExceptionTranslationFilter.java:114)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.session.SessionManagementFi
>>> lter.doFilter(SessionManagementFilter.java:137)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.authentication.AnonymousAut
>>> henticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.servletapi.SecurityContextH
>>> olderAwareRequestFilter.doFilter(SecurityContextHolderAwareR
>>> equestFilter.java:170)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.savedrequest.RequestCacheAw
>>> areFilter.doFilter(RequestCacheAwareFilter.java:63)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.authentication.www.BasicAut
>>> henticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter
>>> .java:126)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.authentication.AbstractAuth
>>> enticationProcessingFilter.doFilter(AbstractAuthenticationPr
>>> ocessingFilter.java:200)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.authentication.AbstractAuth
>>> enticationProcessingFilter.doFilter(AbstractAuthenticationPr
>>> ocessingFilter.java:200)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.hisp.dhis.security.filter.CustomAuthenticationFilter.doF
>>> ilter(CustomAuthenticationFilter.java:64)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.oauth2.provider.authentication.
>>> OAuth2AuthenticationProcessingFilter.doFilter(OAuth2Authenti
>>> cationProcessingFilter.java:176)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.authentication.logout.Logou
>>> tFilter.doFilter(LogoutFilter.java:116)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter
>>> (AutomaticAccessFilter.java:115)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.header.HeaderWriterFilter.d
>>> oFilterInternal(HeaderWriterFilter.java:64)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.context.request.async.WebAs
>>> yncManagerIntegrationFilter.doFilterInternal(WebAsyncManager
>>> IntegrationFilter.java:56)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.context.SecurityContextPers
>>> istenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
>>>         at org.springframework.security.web.FilterChainProxy$VirtualFil
>>> terChain.doFilter(FilterChainProxy.java:331)
>>>         at org.springframework.security.web.FilterChainProxy.doFilterIn
>>> ternal(FilterChainProxy.java:214)
>>>         at org.springframework.security.web.FilterChainProxy.doFilter(F
>>> ilterChainProxy.java:177)
>>>         at org.springframework.web.filter.DelegatingFilterProxy.invokeD
>>> elegate(DelegatingFilterProxy.java:346)
>>>         at org.springframework.web.filter.DelegatingFilterProxy.doFilte
>>> r(DelegatingFilterProxy.java:262)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.hisp.dhis.servlet.filter.HttpUrlPatternFilter.doFilter(H
>>> ttpUrlPatternFilter.java:120)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.springframework.web.filter.ShallowEtagHeaderFilter.doFil
>>> terInternal(ShallowEtagHeaderFilter.java:110)
>>>         at org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilt
>>> er.doFilterInternal(ExcludableShallowEtagHeaderFilter.java:112)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.springframework.orm.hibernate5.support.OpenSessionInView
>>> Filter.doFilterInternal(OpenSessionInViewFilter.java:151)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.springframework.web.filter.CharacterEncodingFilter.doFil
>>> terInternal(CharacterEncodingFilter.java:197)
>>>         at org.springframework.web.filter.OncePerRequestFilter.doFilter
>>> (OncePerRequestFilter.java:107)
>>>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFi
>>> lter(ApplicationFilterChain.java:193)
>>>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(App
>>> licationFilterChain.java:166)
>>>         at org.apache.catalina.core.StandardWrapperValve.invoke(Standar
>>> dWrapperValve.java:198)
>>>         at org.apache.catalina.core.StandardContextValve.invoke(Standar
>>> dContextValve.java:96)
>>>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(A
>>> uthenticatorBase.java:478)
>>>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHo
>>> stValve.java:140)
>>>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo
>>> rtValve.java:80)
>>>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(Abs
>>> tractAccessLogValve.java:624)
>>>         at org.apache.catalina.core.StandardEngineValve.invoke(Standard
>>> EngineValve.java:87)
>>>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd
>>> apter.java:342)
>>>         at org.apache.coyote.http11.Http11Processor.service(Http11Proce
>>> ssor.java:799)
>>>         at org.apache.coyote.AbstractProcessorLight.process(AbstractPro
>>> cessorLight.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(SocketPro
>>> cessorBase.java:49)
>>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>> Executor.java:1142)
>>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>> lExecutor.java:617)
>>>         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.r
>>> un(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
>>>
>>>
>>
>

PNG image


Follow ups

References