BaseChannel Timeout Issue

85 views
Skip to first unread message

durgaprasad

unread,
Dec 8, 2015, 8:04:10 AM12/8/15
to jPOS Users
Hi ,

Could anyone please help resolving timeout issue in NACChannel.

I would like to know how to make read timeout in client socket or channel. I've using below code where i'm setting timeout for 90 seconds.

Sometimes Host response may take more than 30 seconds , in those cases we are unable to capture the response since  at our end  getting timeout for 30 seconds only .

NACChannel channel = new NACChannel("180.22.23.23",1111,new ISO87BPackager(),null);
channel.setHeader("6000020000");
channel.setTimeout(90000);

Please note , nowhere i had mentioned 30 seconds in my code.

Please suggest.


Regards,
Durga Prasad.

Alejandro Revilla

unread,
Dec 8, 2015, 2:22:52 PM12/8/15
to jPOS Users

I suggest you add a Logger to your channel in order to see why you’re disconnecting, perhaps it’s the other end that drops the connection.

You add a logger with code like this:

import org.jpos.util.*;
Logger logger = new Logger();
logger.addListener (new SimpleLogListener(System.out));
channel.setLogger(logger, "mychannel");

Of course, you could use Q2 and have the logger, the channel, and probably the multiplexer configured for you using simple XML files in your deploy directory.




--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/92ef1b83-0b4f-480c-887f-5f624a9587b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

durgaprasad

unread,
Dec 11, 2015, 3:31:42 AM12/11/15
to jPOS Users
Dear Alejandro,

Thanks for reply.

Please note we already configured logger, the channel in our client application.

Tried couple of transactions with Host however its getting disconnected if Host responds more than 30 seconds.

Please find the logs.

<log realm="Test-Channel/XXX.XX.XX.
XX:XXXX" at="Fri Dec 11 13:44:29 IST 2015.424" lifespan="34ms">
  <connect>
    XXX.XX.XX.XX:XXXX
  </connect>
</log>
<log realm="Test-Channel/XXX.XX.XX.XX:XXXX" at="Fri Dec 11 13:44:29 IST 2015.425">
  <send>
    <isomsg direction="outgoing">
       <field id="0" value="0200"/>
      <field id="3" value="000000"/>
      <field id="4" value="2000"/>
      <field id="11" value="371636"/>
      <field id="12" value="134429"/>
      <field id="13" value="1211"/>
      <field id="22" value="051"/>
      <field id="23" value="01"/>
      <field id="24" value="001"/>
      <field id="25" value="00"/>
      <field id="35" value="27FC09C30A7B0146DA415B151D553EE9AECC7BED9A50AC69DFBD9D8FB0DFFF55EA373D7DAB1BC35B" type="binary"/>
      <field id="41" value="00000009"/>
      <field id="42" value="000000000000001"/>
      <field id="55" value="5F3401019F2608DD54D72CFF89D3D09F2701809F100706010A03A098009F3704414E41279F36020038950502800080009A031512119F21031233429C01009F02060000000020005F2A02035682025C009F1A0203569F03060000000000009F3303E0F0C89F34031E03009F3501359F1E0831323334353637388407A00000000310109F0902008C9F410400000000" type="binary"/>
      <field id="62" value="261626"/>
      <field id="63" value="00000000000000000000FFFFAA12345001E00002" type="binary"/>
    </isomsg>
  </send>
</log>
<log realm="Test-Channel/XXX.XX.XX.XX:XXXX" at="Fri Dec 11 13:45:00 IST 2015.498" lifespan="31067ms">
  <receive>
    <peer-disconnect/>
  </receive>
</log>

Regards,
DP

chhil

unread,
Dec 11, 2015, 3:34:46 AM12/11/15
to jPOS Users

Peer disconnect is telling you the remote disconnected.
You should talk to them.
Take a look at the Basechannel.Java code and the location where the sags event gets logged.

They may tell you that they disconnect if a line is inactive for 30 seconds and that you need to send keep alive messages,  which could be network management messages.

-chhil


On Fri, Dec 11, 2015, 1:57 PM durgaprasad <dprasad...@gmail.com> wrote:
Dear Alejandro,

Thanks for reply.

Please note we already configured logger, the channel in our client application.

Tried couple of transactions with Host however its getting disconnected if Host responds more than 30 seconds.

Please find the logs.

<log realm="Test-Channel/XXX.XX.XX.XX:XXXX" at="Fri Dec 11 13:44:29 IST 2015.424" lifespan="34ms">
  <connect>
    121.244.27.90:14455
  </connect>
</log>
<log realm="Fpay-Channel/121.244.27.90:14455" at="Fri Dec 11 13:44:29 IST 2015.425">
  <send>
    <isomsg direction="outgoing">
      <!-- com.ds.cpgw.hosts.fpay.FpayPackager -->
Durga Prasad




On Wednesday, December 9, 2015 at 12:52:52 AM UTC+5:30, Alejandro Revilla wrote:

Durgaprasad

unread,
Dec 11, 2015, 3:49:10 AM12/11/15
to jpos-...@googlegroups.com

Thank you chhill..

You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/f3Y_evcfFC8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefD4xV%2B%3D-E8ftvCvOqOC8bdz7cie0kYZj-uSue6gyKXYwg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages