Server Socket Connection problem

403 views
Skip to first unread message

Adeel Aslam

unread,
Jan 11, 2012, 6:14:14 AM1/11/12
to jPOS Users
Dear JPOS users

I have developed a server using JPOS library which accepts incoming
messages and response back to the client successfully. If the client
request exceed more than one then the server accepts the incoming all
messages but can't reply to all client according to its request and
only one request is response back to the client.

I got the exception on the server log

<exception name="Connection reset by peer: socket write error">
java.net.SocketException: Connection reset by peer: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.DataOutputStream.flush(Unknown Source)
at org.jpos.iso.BaseChannel.send(BaseChannel.java:533)
at TestServer.process(TestServer.java:833)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
</exception>
</send>
</log>
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.DataOutputStream.flush(Unknown Source)
at org.jpos.iso.BaseChannel.send(BaseChannel.java:533)
at TestServer.process(TestServer.java:833)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:134)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:71)
<log realm="channel/192.168.173.26:2845" at="Wed Jan 11 15:50:54 GMT
+05:00 2012.562" lifespan="31ms">
<receive>
<peer-disconnect>Connection reset</peer-disconnect>
</receive>
</log>
<log realm="server.session/192.168.173.26" at="Wed Jan 11 15:50:54 GMT
+05:00 2012.562">
<session-end/>
</log>

Kindly help me out by giving examples how to achieve this task. I am
new to JPOS and don't know about it.
My task is to receive each request from client and send back the
response to them separately and in asynchronous way.

Regards
Adeel Aslam

Alejandro Revilla

unread,
Jan 11, 2012, 11:27:58 AM1/11/12
to jpos-...@googlegroups.com
Looks l like the client is closing the socket in the server's face.

--
@apr


Mark Salter

unread,
Jan 11, 2012, 1:40:44 PM1/11/12
to jPOS Users
On Jan 11, 4:27 pm, Alejandro Revilla <a...@jpos.org> wrote:
> Looks l like the client is closing the socket in the server's face.
Agreed, do your Channels and your Packagers match at both ends Adeel ?

--
Mark
Reply all
Reply to author
Forward
0 new messages