xsocket-develop Mailing List for xsocket (Page 8)
Status: Inactive
Brought to you by:
grro
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
(9) |
Nov
(11) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(8) |
Feb
(9) |
Mar
(9) |
Apr
(22) |
May
(28) |
Jun
(17) |
Jul
(10) |
Aug
(19) |
Sep
(4) |
Oct
(14) |
Nov
(26) |
Dec
(25) |
| 2009 |
Jan
(13) |
Feb
(17) |
Mar
(12) |
Apr
(4) |
May
(16) |
Jun
(6) |
Jul
(10) |
Aug
(24) |
Sep
(6) |
Oct
(5) |
Nov
(13) |
Dec
(10) |
| 2010 |
Jan
(17) |
Feb
(21) |
Mar
(10) |
Apr
(8) |
May
(2) |
Jun
(14) |
Jul
(7) |
Aug
(10) |
Sep
(7) |
Oct
(3) |
Nov
|
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(5) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: Gregor R. <gre...@gm...> - 2009-08-10 17:20:37
|
|
From: Lo <lo...@ko...> - 2009-08-10 07:12:47
|
Hi,
Thanks. This is some parts of code. I tried to set a "delimiter"
variable changing with the encoding.
* The delimiter variable is used in the onData method like that :
String data = nbConnection.readStringByDelimiter(delimiter);
* The client has an option to change encoding. This one set the encoding
for the client's non blocking connection (nbConnection). :
public void setEncoding(boolean utf8) {
if(utf8) {
nbConnection.setEncoding("UTF-8");
delimiter = "\r\n";
}
else {
nbConnection.setEncoding("ISO-8859-1");
delimiter = "\n";
}
}
* By default on the connection the encoding is ISO-8859-1.
public boolean onConnect(INonBlockingConnection nbc) throws IOException {
nbc.setFlushmode(FlushMode.ASYNC);
nbc.write("Welcome");
nbc.write("\r\n");
nbc.setEncoding("ISO-8859-1");
}
--
Laurent
|
|
From: Gregor R. <gre...@gm...> - 2009-08-10 06:22:36
|
|
From: Lo <lo...@ko...> - 2009-08-09 12:48:21
|
Hi, I'm coding a mudserver with xsocket but I got some problems with delimiters. With UTF-8 encoding and "\r\n" or "\n" delimiter, server doesn't react to a single letter sent by the user. I have no problem with iso-8859. Is there a free implementation of the Telnet protocol with xsocket handing ISO and UTF ? Thanks Laurent |
|
From: Gregor R. <gre...@gm...> - 2009-08-09 08:47:58
|
|
From: Laurent <la...@ko...> - 2009-08-09 08:34:40
|
Hi, I'm coding a mudserver with xsocket but I got some problems with delimiters. With UTF-8 encoding and "\r\n" or "\n" delimiter, server doesn't react to a single letter sent by the user. I have no problem with iso-8859. Is there a free implementation of the Telnet protocol with xsocket handing ISO and UTF ? Thanks -- Laurent |
|
From: Steven Ma <ste...@em...> - 2009-08-05 09:37:07
|
Gregor,
We use jconsole to capture the status, there are no deadlock and the port is still listening for request. We are using JDK 1.6 update 14 to test and we have the following information:
State: BLOCKED on java.lang.Object@301d1507<mailto:java.lang.Object@301d1507> owned by: xDispatcherSrv15000#4
Total blocked: 2,924,997 Total waited: 0
Stack trace:
sun.nio.ch.WindowsSelectorImpl.wakeup(WindowsSelectorImpl.java:75)
org.xsocket.connection.IoSocketDispatcher.wakeUp(IoSocketDispatcher.java:309)
org.xsocket.connection.IoSocketDispatcher.register(IoSocketDispatcher.java:347)
org.xsocket.connection.IoSocketHandler.init(IoSocketHandler.java:149)
org.xsocket.connection.NonBlockingConnection.init(NonBlockingConnection.java:1011)
org.xsocket.connection.NonBlockingConnection.init(NonBlockingConnection.java:1005)
org.xsocket.connection.Server$LifeCycleHandler.onConnectionAccepted(Server.java:1067)
org.xsocket.connection.IoAcceptor.accept(IoAcceptor.java:221)
org.xsocket.connection.IoAcceptor.listen(IoAcceptor.java:200)
org.xsocket.connection.Server.run(Server.java:501)
java.lang.Thread.run(Thread.java:619)
Regards,
Steven Ma
From: Gregor Roth [mailto:gre...@gm...]
Sent: Wednesday, August 05, 2009 5:24 PM
To: Steven Ma
Cc: xso...@li...
Subject: Re: [xSocket-develop] XSocket non-blocking can't be established
Hi Steven,
what do you mean by "stopped". Does the thread block without returning? Or does it mean noting happens after the thread returns from the method. Do you have analyzed the log?
Gregor
----- Original Message -----
From: Steven Ma
Sent: 08/05/09 08:31 am
To: xso...@li...
Subject: [xSocket-develop] XSocket non-blocking can't be established
Dear sir,
We found that after a number of connections are established and then disconnected for a certain period of time, a new non-blocking connection can’t be established anymore. However, we are not sure about the timing of this period. It should be around 7 to 23 hours. According to xsocket source code, we go through the detail and we found that:
The program always stopped when calling connection.init(ioHandler) in Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
Below is the "Call Hierarchy" that we chase into:
IoAcceptor.accept()
-> Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler, IIoHandlerCallback)
-> IoSocketHandler.init(IIoHandlerCallback)
-> IoChainableHandler.setPreviousCallback(IIoHandlerCallback)
-> IoSocketDispatcher.register(IoSocketHandler, int)
-> ... (we guess the program may be stopped in this method somewhere)
xsocket.connection.Server.java
public void onConnectionAccepted(IoChainableHandler ioHandler) throws IOException {
// create a new connection
NonBlockingConnection connection = new NonBlockingConnection(connectionManager, handlerAdapter.getConnectionInstance());
// set default flush properties
………
// initialize the connection
connection.init(ioHandler);
// set timeouts (requires that connection is already initialized)
……..
// set transfer rates
………
}
We are testing it under xsocket v2.5.4. I’d like to know how to solve or work around this problem. Thanks.
Regards,
Steven Ma
________________________________
EMPEROR GROUP
>>From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk<http://www.gmx.com/fm07/cgi/derefer?TYPE=2&DEST=http%3A%2F%2Fwww.emperor.com.hk>
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
________________________________
EMPEROR GROUP
From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
|
|
From: Gregor R. <gre...@gm...> - 2009-08-05 09:27:44
|
|
From: Steven Ma <ste...@em...> - 2009-08-05 07:34:39
|
Dear sir,
We found that after a number of connections are established and then disconnected for a certain period of time, a new non-blocking connection can’t be established anymore. However, we are not sure about the timing of this period. It should be around 7 to 23 hours. According to xsocket source code, we go through the detail and we found that:
The program always stopped when calling connection.init(ioHandler) in Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
Below is the "Call Hierarchy" that we chase into:
IoAcceptor.accept()
-> Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler, IIoHandlerCallback)
-> IoSocketHandler.init(IIoHandlerCallback)
-> IoChainableHandler.setPreviousCallback(IIoHandlerCallback)
-> IoSocketDispatcher.register(IoSocketHandler, int)
-> ... (we guess the program may be stopped in this method somewhere)
xsocket.connection.Server.java
public void onConnectionAccepted(IoChainableHandler ioHandler) throws IOException {
// create a new connection
NonBlockingConnection connection = new NonBlockingConnection(connectionManager, handlerAdapter.getConnectionInstance());
// set default flush properties
………
// initialize the connection
connection.init(ioHandler);
// set timeouts (requires that connection is already initialized)
……..
// set transfer rates
………
}
We are testing it under xsocket v2.5.4. I’d like to know how to solve or work around this problem. Thanks.
Regards,
Steven Ma
________________________________
EMPEROR GROUP
>From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
|
|
From: Gregor R. <gre...@gm...> - 2009-07-22 15:33:28
|
|
From: Mihail K. <mis...@gm...> - 2009-07-22 10:59:46
|
Hello, I'm using xSocket 2.54 to create a non-blocking connection to a server. When the server closes the connection, the onDisconnect handler gets called but even after that the connection's isOpen() method still returns true. Is this a bug, or is there some other way to tell if the connection has been closed? Thanks! Mihail |
|
From: Chirag S. <chi...@gm...> - 2009-07-16 07:07:34
|
Hey Gregor,
Figured it out earlier today. The following http client settings set:
http.setPooledMaxIdleTimeMillis(150000);
http.setPooledMaxLifeTimeMillis(600000);
Turns out, when it hit 150000ms, we weren't able to create new
connections (no idea why). Anyways, I removed those two lines and
things are working like a charm once again!
We recently upgraded to the following packages:
org.xsocket -- 2.5.2
org.xlightweb -- 2.6.3
Thanks
Chirag Shah
On Wed, Jul 15, 2009 at 10:58 PM, Gregor Roth<gre...@gm...> wrote:
> Hi Chirag,
>
> which timeouts did you set? Does this include the creationMaxWaitMillis
> parameter (pool.setCreationMaxWaitMillis(<millis>)? It seems that a plenty
> of connections are in connect state. Did you modify the maxActive parameter?
> May be it will help, if you active debug (FINE) level log.
>
> Gregor
>
>
> ----- Original Message -----
>
> From: Chirag Shah
>
> Sent: 07/15/09 07:01 am
>
> To: xso...@li...
>
> Subject: [xSocket-develop] Several threads in 'waiting on
> NonBlockingConnection'
>
>
>
> Hey xsocket,
>
> I'm running into an issue where our application is unable to make new
> non-blocking connections after some time. It works fine for a long
> time until it it reaches a state where it's unable to create new
> connections. Has anybody else run into this issue. I'm a bit sparse
> on details right now, but here's a snippet of the thread dump.
>
> We have set our timeouts to 3 minutes, and it doesn't look like we're
> running out of sockets.
>
> Thanks!
> Chirag Shah
>
> //Most of the threads are in this state
> java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0xb610fcf0> (a
> org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback)
> at
> org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback.connect(NonBlockingConnection.java:737)
> - locked <0xb610fcf0> (a
> org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback)
> at
> org.xsocket.connection.NonBlockingConnection.(NonBlockingConnection.java:700)
> at
> org.xsocket.connection.NonBlockingConnection.(NonBlockingConnection.java:677)
> at
> org.xsocket.connection.NonBlockingConnectionPool.newNativeConnection(NonBlockingConnectionPool.java:582)
> at
> org.xsocket.connection.NonBlockingConnectionPool.getConnection(NonBlockingConnectionPool.java:514)
> at
> org.xsocket.connection.NonBlockingConnectionPool.getConnection(NonBlockingConnectionPool.java:505)
> at
> org.xsocket.connection.NonBlockingConnectionPool.getNonBlockingConnection(NonBlockingConnectionPool.java:217)
> at
> org.xlightweb.client.HttpClientConnectionPool.getHttpClientConnection(HttpClientConnectionPool.java:116)
> at
> org.xlightweb.client.HttpClientConnection$ClientExchange.forward(HttpClientConnection.java:1213)
> at
> org.xlightweb.RequestHandlerChain$ChainExchange.handle(RequestHandlerChain.java:402)
> at
> org.xlightweb.RequestHandlerChain$ChainExchange.forward(RequestHandlerChain.java:472)
> at
> org.xlightweb.client.AutoRedirectHandler.onRequest(AutoRedirectHandler.java:80)
> at
> org.xlightweb.AbstractHttpConnection$RequestHandlerAdapter.performRequestHandler(AbstractHttpConnection.java:1898)
> at
> org.xlightweb.AbstractHttpConnection$RequestHandlerAdapter.onRequest(AbstractHttpConnection.java:1892)
> at
> org.xlightweb.RequestHandlerChain$ChainExchange.handle(RequestHandlerChain.java:393)
> at org.xlightweb.RequestHandlerChain.onRequest(RequestHandlerChain.java:257)
> at org.xlightweb.client.HttpClient.send(HttpClient.java:923)
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> xSocket-develop mailing list
> xSo...@li...
> https://lists.sourceforge.net/lists/listinfo/xsocket-develop
>
>
>
|
|
From: Gregor R. <gre...@gm...> - 2009-07-16 05:59:22
|
|
From: Gregor R. <gre...@gm...> - 2009-07-16 05:58:41
|
|
From: Johnny Lo <joh...@gm...> - 2009-07-15 10:39:10
|
Hi Gregor, I am trying out xSocket (v2.5.3) and came across a problem. I have implemented a simple server to handle reading multipart data and responding with a "ACK". The example is based from the tutorial under item 17. For the client, I just implement with ordinary sockets (no xsocket or nio) that writes the multipart data and reads a "ACK" string from the server over data streams. The server is able to receive data but the client is not receiving the "ACK". Sometimes, it comes in a burst. It seems the client is not blocking at the read() when there is no data. How would I block a non-xSocket and non-nio client at the read() when there is no data to read yet? Thanks for your help. Johnny |
|
From: Chirag S. <chi...@gm...> - 2009-07-15 05:01:37
|
Hey xsocket,
I'm running into an issue where our application is unable to make new
non-blocking connections after some time. It works fine for a long
time until it it reaches a state where it's unable to create new
connections. Has anybody else run into this issue. I'm a bit sparse
on details right now, but here's a snippet of the thread dump.
We have set our timeouts to 3 minutes, and it doesn't look like we're
running out of sockets.
Thanks!
Chirag Shah
//Most of the threads are in this state
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xb610fcf0> (a
org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback)
at org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback.connect(NonBlockingConnection.java:737)
- locked <0xb610fcf0> (a
org.xsocket.connection.NonBlockingConnection$SyncIoConnectorCallback)
at org.xsocket.connection.NonBlockingConnection.<init>(NonBlockingConnection.java:700)
at org.xsocket.connection.NonBlockingConnection.<init>(NonBlockingConnection.java:677)
at org.xsocket.connection.NonBlockingConnectionPool.newNativeConnection(NonBlockingConnectionPool.java:582)
at org.xsocket.connection.NonBlockingConnectionPool.getConnection(NonBlockingConnectionPool.java:514)
at org.xsocket.connection.NonBlockingConnectionPool.getConnection(NonBlockingConnectionPool.java:505)
at org.xsocket.connection.NonBlockingConnectionPool.getNonBlockingConnection(NonBlockingConnectionPool.java:217)
at org.xlightweb.client.HttpClientConnectionPool.getHttpClientConnection(HttpClientConnectionPool.java:116)
at org.xlightweb.client.HttpClientConnection$ClientExchange.forward(HttpClientConnection.java:1213)
at org.xlightweb.RequestHandlerChain$ChainExchange.handle(RequestHandlerChain.java:402)
at org.xlightweb.RequestHandlerChain$ChainExchange.forward(RequestHandlerChain.java:472)
at org.xlightweb.client.AutoRedirectHandler.onRequest(AutoRedirectHandler.java:80)
at org.xlightweb.AbstractHttpConnection$RequestHandlerAdapter.performRequestHandler(AbstractHttpConnection.java:1898)
at org.xlightweb.AbstractHttpConnection$RequestHandlerAdapter.onRequest(AbstractHttpConnection.java:1892)
at org.xlightweb.RequestHandlerChain$ChainExchange.handle(RequestHandlerChain.java:393)
at org.xlightweb.RequestHandlerChain.onRequest(RequestHandlerChain.java:257)
at org.xlightweb.client.HttpClient.send(HttpClient.java:923)
|
|
From: Phil J. <li...@ph...> - 2009-07-10 16:11:28
|
Hi Gregor, Sorry, I'm away from my office, hence the delay. > could you please send me a debug log. I'm gonig to cross-check this. I assume you're referring to the mechanism at: http://xsocket.sourceforge.net/core/tutorial/V2/TutorialCore.htm#tocTutorial37 I've created a file logging.properties as per http://exampledepot.com/egs/java.util.logging/Props.html at the base of my classpath and started the VM with -Djava.util.logging.config.file=logging.properties but I don't see any extra debug output being generated. Any ideas? Apologies if I'm being thick, I've never used the j.u.logging mechanism before. Interestingly, since I'm out of the office, I was running the server on my Macbook with OSX, and a lost connection seems to be detected much faster than on the Linux machines that I normally use, including the one running the live server. I'll have to verify this when I get back, but it may well mean that this isn't an xSocket problem directly, but something lower level than that. Thanks, phil |
|
From: Gregor R. <gre...@gm...> - 2009-07-02 17:05:01
|
|
From: Phil J. <li...@ph...> - 2009-07-02 13:19:27
|
Hi, I've recently developed a back-end server for a customer's Flash game, and have been using xSocket with great success. You guys are doing a brilliant job, thank you! One thing I'm not entirely clear about is how to deal with dropped connections. If the connection is explicitly closed, there is no issue, the onDisconnect() handler function is called and I can clean up. I'm aware that there's no way to tell whether a TCP connection is live other than by writing data to it, so that's exactly what I do. I've set up an IdleTimeout handler to kick in after 1 minute of inactivity, which sends a 'ping' and resets the idle timeout. I've also discovered the org.xsocket.connection.sendFlushTimeoutMillis property, which I am currently not setting, and therefore using the 1-minute default. I was under the impression that with such a setup, my connection should be disconnected after a maximum of 2 minutes if I, for example, unplug the network cable of the client. (1 minute idle -> ping -> give up trying to send after 1 minute) That doesn't seem to be happening, however, it's taking somewhat longer. I've been looking at the traffic using Wireshark, and it seems that it doesn't even bother to retry pinging, probably because disconnecting the cable typically yields a "Destination Host Unreachable" from somewhere in the network stack, which is not an error that usually warrants a retry. Yet I don't seem to get any sort of event from xSocket for this for a long time. When I plug the cable back in, onDisconnect() fires very quickly, or the backlog of data gets through if the client hasn't given up; it seems that the send timeout isn't kicking in. Is there something I've missed? Do I need to use write completion handlers? I've avoided them so far due to the extra complexity. My setup uses xSocket 2.5.2 (2.5 until recently; same problem) in a near-default setup: autoflush is on, flush mode is sync. I'm quite sure I'm not getting any events that I'm not handling or that I'm handling incorrectly. Thanks and best regards, phil |
|
From: Gregor R. <gre...@gm...> - 2009-06-24 09:02:18
|
|
From: Gregor R. <gre...@gm...> - 2009-06-24 07:25:06
|
|
From: John M. <joh...@gm...> - 2009-06-24 07:22:01
|
I am running a chat server with about 40 continuous users. After about 20 minutes, the cpu shoots to 100% (from about 5%) and I have tracked the problem down to what appears to be an infinite loop using JProfiler. The call stack is: java.nio.ByteBuffer.remaining IoQueue.getSize IoQueue.isEmpty IoSocketHandler.hasMoreDataToWrite IoSocketHandler.close IoSocketHandler.closeSilence IoSocketDispatcher.onReadableEvent IoSocketDispatcher.handleReadWriteKeys IoSocketDispatcher.run Eventually it stops, and then starts again some minutes later. I'm not sure what is causing this. John |
|
From: Gregor R. <gre...@gm...> - 2009-06-11 09:01:32
|
|
From: Laura S. <mar...@al...> - 2009-06-11 06:34:43
|
Hello, I've implemented a server application based on xsocket library that accepts a limited number of connections in a non-blocking manner. Connections are kept in a list of active connections. Each one has a callback handler to manage asynchronous communication which implements IDataHandler, IConnectHandler, IDisconnectHandler, IIdleTimeoutHandler, IConnectionTimeoutHandler. This server should communicate with a simple socket based client that opens a number of socket connections, these are kept "persistent" in a list and used when a XML request should be sent to the server. socket1[i] = new Socket(); socket1[i].setSoLinger(true, 1); socket1[i].bind(null); socket1[i].connect(new InetSocketAddress(ipCms1, port1), timeout); // timeout established at 30 * 60 *1000 This client could send XML requests and keep alive messages. Server responds only to XML requests, keep alive messages are received and recorded. In case communication errors appear, the persistent connections are recreated by a distinct thread. The problem is that after a number of keep-alive messages are sent, something happens and the connections are closed...On server side this is recorded. 13:25:45,086 [xServerPool-1-thread-6] ERROR [PRBT TQS -- DataHandler] Exception occured. Check the stack trace... 13:25:45,086 [xServerPool-1-thread-6] DEBUG Stack Trace:: org.xsocket.connection.ExtendedClosedChannelException: channel is closed (read buffer size=0) at org.xsocket.connection.AbstractNonBlockingStream.readByteBufferByDelimiter(A bstractNonBlockingStream.java:546) I need advice to debug this...to diagnose who or what could close the connections. They are not explicitly closed on client or on server side, and it's not a timeout value reached because no SocketTimeoutExceptions on client side are caught. If this situation happens, the connections seem to be closed regularly at 50000 or 60000 ms. Any idea is highly appreciated ! Thanks a lot by advance, Laura Laura Sebu Alcatel-Lucent IT S&D Department Str. Gh. Lazar, nr. 9, Timisoara 300081, Romania Email: Mar...@al... Phone: +40 256 303100/6266 Fax: +40 256 303413 |
|
From: Thomas S. <ts...@ib...> - 2009-05-26 11:51:08
|
Accidently replied to Gregor's email address only ... ;-) Thus forwarding my reply to the list. |