[Mifos-developer] SMS Bridge not working on https protocal if the war file is deployed in tomcat

41 views
Skip to first unread message

Ippez Robert

unread,
Jan 31, 2017, 12:48:47 AM1/31/17
to Mifos software development
Hi Dev,
I have deployed the war file for sms bridge in tomcat and its running but on https protocal not http and also on port 8443 instead of 9191. So during configuration of the sms bridge when you want to create Tenant using http://host:9191/tenants/ , you can not, instead you need to use https://localhost:8443/message-gateway-0.0.1/tenants/

where http:// changes to https://  and port changes from 9191 to 8443 and you need to append the prefix message-gateway-0.0.1 before /tenants

Now every configuration for sms bridge is fine i.e the tenant is set, and i also created Infobip bridge and lastly created the SMS External Service with the following

NameValue
host_namelocalhost
port_number8443
end_point/message-gateway-0.0.1
tenant_app_key9c9e016e-6f83-4506-abda-ba2568e0cbbd
I created SMS Campagin for withdrawals and Deposit but i get the following errors when i make transactions. Where did i go wrong? Actually i want to change the http protocal to https so that connection can be wired. How do i achieved this, or this is not how to configure the sms bridge?

Is it possible to apply thousand separator for the amount values in the sms? i.e instead of sending UGX 325000 , it sends
UGX 325,000

See error log captured below:-
08:33:00.724 [http-bio-8443-exec-6] INFO  o.a.f.i.s.f.TenantAwareBasicAuthenticationFilter - {"startTime":1485840780723,"totalTime":1,"method":"OPTIONS","url":"https://localhost:8443/fineract-provider/api/v1/savingsaccounts/3/transactions","parameters":{"command":["withdrawal"]}}
08:33:01.159 [http-bio-8443-exec-6] INFO  o.a.f.i.s.s.SmsMessageScheduledJobServiceImpl - Sending triggered SMS with request - [{"internalId":21,"mobileNumber":"788725408","message":"Hello! Skyline Technologies you have made a wdl of UGX 325000 from your account 16-00003-5 on Jan:31:2017. Your balance is now 5397962. Thx - SMS Alert","providerId":1}]
Exception in thread "pool-3-thread-3" org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:8443//message-gateway-0.0.1/sms":Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:567)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:527)
        at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:502)
        at org.apache.fineract.infrastructure.sms.scheduler.SmsMessageScheduledJobServiceImpl.connectAndSendToIntermediateServer(SmsMessageScheduledJobServiceImpl.java:170)
        at org.apache.fineract.infrastructure.sms.scheduler.SmsMessageScheduledJobServiceImpl.access$000(SmsMessageScheduledJobServiceImpl.java:70)
        at org.apache.fineract.infrastructure.sms.scheduler.SmsMessageScheduledJobServiceImpl$SmsTask.run(SmsMessageScheduledJobServiceImpl.java:156)
        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.SocketException: Unexpected end of file from server
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
        at org.springframework.http.client.SimpleClientHttpResponse.getRawStatusCode(SimpleClientHttpResponse.java:48)
        at org.springframework.http.client.AbstractClientHttpResponse.getStatusCode(AbstractClientHttpResponse.java:33)08:33:01.234 [http-bio-8443-exec-6] INFO  o.a.f.i.s.f.TenantAwareBasicAuthenticationFilter - {"startTime":1485840780827,"totalTime":406,"method":"POST","url":"https://localhost:8443/fineract-provider/api/v1/savingsaccounts/3/transactions","parameters":{"command":["withdrawal"]}}

        at org.springframework.web.client.DefaultResponseErrorHandler.getHttpStatusCode(DefaultResponseErrorHandler.java:56)
        at org.springframework.web.client.DefaultResponseErrorHandler.hasError(DefaultResponseErrorHandler.java:50)
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:552)
        ... 8 more


--
Thanks
Regards

Ippez Roberts
Tel: +256788725408/789643284
Skype ID: ippez.robert1
Email: ippez...@gmail.com

Santosh Math

unread,
Jan 31, 2017, 1:05:36 AM1/31/17
to Mifos software development, Ippez Robert
Hi Ippez,
Yes, SMS bridge is configured with 'http'. please provide your server.xml. We will configure it. 

Thanks
Santosh

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Mifos-developer mailing list
mifos-developer@lists.sourceforge.net
Unsubscribe or change settings at:
https://lists.sourceforge.net/lists/listinfo/mifos-developer



--
Thanks  and Regards
Santosh 
QA Team
Conflux Technologies Pvt Ltd, Bengaluru
Skype:santoshmath99

Ippez Robert

unread,
Jan 31, 2017, 1:13:49 AM1/31/17
to Mifos Developer, mifos-d...@lists.sourceforge.net
Okay, Please check your mail.

Thanks
Regards

Santosh Math

unread,
Jan 31, 2017, 1:34:22 AM1/31/17
to Mifos software development, Mifos Developer
Hi Ippez,
Got the  file. 

Thanks
Santosh

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Mifos-developer mailing list
mifos-developer@lists.sourceforge.net
Unsubscribe or change settings at:
https://lists.sourceforge.net/lists/listinfo/mifos-developer

sif...@skyburgsystems.org

unread,
Jan 31, 2017, 5:52:52 AM1/31/17
to Mifos software development

Finally someone has realized this issue. Thanks for pointing this out Ippez.  Using https is more secure so that’s fine. You managed to create the app key without configuring your server.xml?

 

Kind regards,

Sifiso

 

webcard

image001.jpg

Ed Cable

unread,
Feb 1, 2017, 12:50:59 PM2/1/17
to Mifos software development, dev (dev@fineract.incubator.apache.org)
Hi all,

Just adding the Apache Fineract dev mailing list to this thread as well since this is where the discussion should be taking place.  Santosh, were you able to resolve Robert's problems?

Ed

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Mifos-developer mailing list
mifos-developer@lists.sourceforge.net
Unsubscribe or change settings at:
https://lists.sourceforge.net/lists/listinfo/mifos-developer



--
Ed Cable
Director of Community Programs, Mifos Initiative
edc...@mifos.org | Skype: edcable | Mobile: +1.484.477.8649

Collectively Creating a World of 3 Billion Maries | http://mifos.org  

Reply all
Reply to author
Forward
0 new messages