MangoAutomation / modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.
GNU General Public License v3.0
897 stars 370 forks source link

Multiple read data errors #74

Open jdzhang1221 opened 1 month ago

jdzhang1221 commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

com.serotonin.modbus4j.exception.ModbusTransportException: java.net.SocketException: Connection reset by peer: socket write error at com.serotonin.modbus4j.ip.tcp.TcpMaster.sendImpl(TcpMaster.java:172) at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:105) at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.java:362) at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:305) at com.sanzhisoft.mybatis.monitor.utils.Modbus4jUtils.batchRead(Modbus4jUtils.java:190) at com.sanzhisoft.mybatis.monitor.utils.Modbus4jUtils.main(Modbus4jUtils.java:203) Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at java.net.SocketOutputStream.write(SocketOutputStream.java:143) at com.serotonin.modbus4j.sero.messaging.StreamTransport.write(StreamTransport.java:53) at com.serotonin.modbus4j.sero.messaging.MessageControl.write(MessageControl.java:213) at com.serotonin.modbus4j.sero.messaging.MessageControl.send(MessageControl.java:124) at com.serotonin.modbus4j.sero.messaging.MessageControl.send(MessageControl.java:105) at com.serotonin.modbus4j.ip.tcp.TcpMaster.sendImpl(TcpMaster.java:133) ... 5 more

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Mango Version (please complete the following information):

Browser (please complete the following information):

Additional context Add any other context about the problem here.

ma.log Snippet

Browser console errors

Minimal code example to reproduce