Author Topic: CommException: readline() Exception: java.net.SocketException: Connection reset  (Read 13065 times)

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
ExcelLink was running on two different computers.  Both computers were recording data into an Excel spreadsheet from one PLC.  After running for over 23 hours, the following error message was received:

CommException: readline() Exception: java.net.SocketException: Connection reset

Computer 1 stopped recording at 55:08 min:sec (Office)
Computer 2 stopped recording at 46:27 min:sec (Lab)
(The 1st entry in each ExcelLink are selected to include TimeStamp)
Both computer clocks are within 1 minute of the same time.
ExcelLink record time is set for 50 (5.0 seconds)

ExcelLink error messages for each computer are listed at the bottom of this post.

I find this error message on the forum, but in relation to emails.  No email calls are used in this application.  The application contains 3 circuits with 2 outputs (one per circuit) and two dCusF calls on the third circuit.  The 2 dCusF are no more than 8 lines long performing range check and 1 setDAC command in each.

Is this error message related to a PLC event or issue?

Computer 1 ExcelLink error messages (Only S3 is Active)
Execute Active Actions from Active Sites
CommException: readline() Exception: java.net.SocketException: Connection reset in S3
Access to S3suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
(ArrayIndexOutOfBounts) error repeats from this point forward

Computer 2 ExcelLink error messages (S3 and S4 are Active)
S4 contains 2 reads and 2 writes.

CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
CommException: readline() Exception: java.net.SocketException: Connection reset in S4
Access to S4suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S3
Access to S3suspended for 1 minute
java.lang.ArrayIndexOutOfBoundsException: 16 in S4
Access to S4suspended for 1 minute
(ArrayIndexOutOfBounts errors repeat from this point forward)

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
If you have only 1 PLC (I assume defined in site S3?) connected to the network, then what is running at S4? It seems like you are accessing two sites simultaneously (S3 and S4) from computer 2? If so was the connection reset happen to S3 and S4 at about the same time?

Connection reset usually happens when the network is having some trouble continuing the connection, so one side of the connection decided to close the connection and the other side will receive a connection reset. In this case, XServer was the one that requested for the connection to be closed and hence the ExcelLink could no longer access XServer since the connection has been closed.

Were you able to recover the communication by stopping ExcelLink and clicking RUN button again? If so, then you may be able to restart the connection automatically by writing a macro in Excel to command the ExcelLink software to make connection.



Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mjfergus

  • Newbie
  • Posts: 12
  • I'm a llama!
    • View Profile
S3 and S4 both pointed to the same PLC.  Both computers were running the same ExcelLink configuration (same CFG file used on each of the two Windows computers).

An Excel macro has been written to monitor for loss of data writes from ExcelLink.  As part of the process, ExcelLink is sent the "Stop" comment, the current Excel data is saved to a new sheet and ExcelLink is then sent the "Run" command.

I have given up using ExcelLink directly (by using the ExcelLink Run/Stop buttons) and now rely on Excel macros to start and stop the ExcelLink data actions (by using the DDE Stop and Run commands).