SMPPCLIENT_NOCONN / dropped connection.

.NET library for SMPP protocol
Post Reply
SupportsysE
Posts: 1
Joined: Fri Sep 01, 2017 2:14 pm

SMPPCLIENT_NOCONN / dropped connection.

Post by SupportsysE » Fri Sep 01, 2017 3:39 pm

Hi everyone,

Server : Windows Server 2008 R2 Standard SP1
Use : Inetlab.SMPP Client Demo that I have rebuild to make a TLS connexion enable(SslProtocols(Tls)) :
Image

I am trying to get a connexion with my Japanese provider and I get the following message :

23:36:30: INFO : 1: (SmppClient) Inetlab.SMPP v.1.2.5.0. (8/13/2017) EVALUATION VERSION. Expires on 29.10.2017, in 58 days.
23:37:21: DEBUG: 11: (SmppSocket) Socket #31914638: Connection established. 192.168.110.160:49919 => smpp01.acrt.jp:3550
23:37:21: INFO : 11: (SmppClientDemo) SmppClient connected
23:37:21: INFO : 11: (SmppClientDemo) Binding SmppClient for SystemId: xxxxxx
23:37:21: DEBUG: 17: (SmppClient) Sending PDU: BindTransceiver, Length: 16, Status: ESME_ROK, Sequence: 1
23:37:21: TRACE: 17: (SmppSocket) Socket #31914638: Sending data: 0000002d0000000900000000000000016672303532333639004756374d66486833004f44595356430034000000
23:37:31: DEBUG: 12: (SmppSocket) Socket #31914638: Remote side smpp01.acrt.jp:3550 has dropped connection.
23:37:31: INFO : 12: (SmppClientDemo) Bad status returned during Bind : BindTransceiverResp with status SMPPCLIENT_NOCONN

23:37:31: DEBUG: 12: (SmppSocket) Socket #31914638: Connection closed. 192.168.110.160:49919 => smpp01.acrt.jp:3550
23:37:31: INFO : 12: (SmppClientDemo) SmppClient disconnected

So I cannot stay connected over 10 seconds. I asked my provider why I got a "Bad status returned" and he answered,
We recommend to use stunnel to create the SSL connection. And use regular connection in our system.

With a stunnel.conf file such as

stunnel.conf
----
sslVersion = TLSv1
ciphers = AES256-SHA

[accrete1]
client = yes
accept = 13551
connect = smpp01.acrt.jp:3550

[accrete2]
client = yes
accept = 13552
connect = smpp02.acrt.jp:3550
"

And...he is right, if I use stunnel I don't have any problem. Still, I cannot figure out what is wrong my first connexion, and for some reasons I cannot afford to use stunnel.

Any idea ? Thank you

Regards.
Attachments
2017-09-01_172701.png
2017-09-01_172701.png (20.58 KiB) Viewed 1736 times
NickAskew
Posts: 60
Joined: Tue Oct 07, 2008 1:35 pm

Re: SMPPCLIENT_NOCONN / dropped connection.

Post by NickAskew » Fri Sep 15, 2017 11:16 am

Hi SupportSysE,

There are several versions of TLS that your provider(s) may be using, do you know whether it is TLS 1, 1.1 or 1.2? When you connect you have to match the TLS version exactly otherwise you get the response you can see below. In the absence of that info from your provider it would be trivial to modify the demo to try all three types.
Also, in case you haven't got the certificate on your side to validate the connection, handle the event evServerCertificateValidation on your SmppClient, and within that even set

Code: Select all

e.Accepted = True
Example:

Code: Select all

        Private Sub _SmppClient_evServerCertificateValidation(sender As Object, e As CertificateValidationEventArgs) Handles _client.evServerCertificateValidation
            e.Accepted = True
            If (e.SslPolicyErrors <> 0) Then
                Trace.TraceInformation("Accepted={0}, SslPolicyErrors={1}", e.Accepted, e.SslPolicyErrors)
            End If
        End Sub
Regards
Nick
ProcessFlows UK Ltd
http://www.processflows.co.uk/
Post Reply