"Invalid source address" 使用 SMPP 服务器发送短信时出现异常

"Invalid source address" exception when sending SMS using SMPP Server

过去 8 个月一切正常,但突然出现此错误。

我们在 Oracle EM 控制台中配置了 SMPP 驱动程序属性,并使用与 Oracle SOA 服务器集成的 UMS 发送 SMS。

找到一个与此错误相关的 link,但没有帮助:

https://support.nowsms.com/discus/messages/485/1176.html

[2017-10-17T10:33:16.806+05:30] [WLS_SOA] [ERROR] [SDP-25700] [oracle.sdp.messaging.driver.smpp] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: OracleSystemUser] [ecid: 49d20b62a8084325:-5336381e:15f247fea2f:-8000-000000000001c322,0] [APP: usermessagingdriver-smpp] An unexpected exception was caught.[[ oracle.sdp.messaging.driver.DriverException: Invalid Source Address[a] at oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:1073) at oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:3268) at oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:2849) at oracle.sdpinternal.messaging.driver.smpp.SMPPDriver.send(SMPPDriver.java:2724) at oracle.sdpinternal.messaging.driver.smpp.SMPPManagedConnection.send(SMPPManagedConnection.java:95) at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41) at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296) at sun.reflect.GeneratedMethodAccessor1629.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy532.onMessage(Unknown Source) at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean_xfokw2_MDOImpl.__WL_invoke(Unknown Source) at weblogic.ejb.container.internal.MDOMethodInvoker.invoke(MDOMethodInvoker.java:35) at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean_xfokw2_MDOImpl.onMessage(Unknown Source) at oracle.sdpinternal.messaging.jmsmessagereceiver.ResourceAdapterImpl$RaMessageListener.onMessage(ResourceAdapterImpl.java:167) at oracle.sdpinternal.messaging.jms.QueueWorker.run(QueueWorker.java:73) at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184) at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)

]] [2017-10-17T10:33:16.807+05:30] [WLS_SOA] [NOTIFICATION] [SDP-26003] [oracle.sdp.messaging.driver.dispatcher] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: OracleSystemUser] [ecid: 49d20b62a8084325:-5336381e:15f247fea2f:-8000-000000000001c322,0] [APP: usermessagingdriver-smpp] Dispatcher sent message with id: eb50c4cdc0a800ab12d5fbbdbbbbd46a.

网络日志(使用 Wireshark):

我们发现并解决了这个问题。在此处发布其决议。也许它可以帮助其他人并节省他们宝贵的时间。

在 Oracle EM 控制台中配置的 SMPP 驱动程序有一个错误,即使您从驱动程序配置中传递它,源地址和默认源地址也始终为空。

It was due to multiple Source Address at SMSC and our system was passing null value in Source Address field. Due to this SMSC was not able to recognize correct source address and throw "Invalid Source Address" exception.

If single/static source address is configured at SMSC then you can pass null values and SMSC will automatically recognize source address.