unit test server return ERROR Connection reset by peer: read

22 views
Skip to first unread message

Sangeetha Elumalai

unread,
Oct 22, 2022, 2:17:45 AM10/22/22
to libmodbus
Hello all,

While running the unit test server I'm getting the following error log.

Error log:
Bytes ERROR Connection reset by peer: read
flushed (4)
[00][00][00][00][00][03][FF][C2][01]
Waiting for an indication...
Quit the loop: Connection reset by peer

kindly give me the suggestion about this error message.

Thank you,
-Sangeetha

ZipperSnake

unread,
Oct 22, 2022, 9:42:48 AM10/22/22
to libm...@googlegroups.com
Hi,

From the internet:
"Connection Reset by peer means the remote side is terminating the session. This error is generated when the OS receives notification of TCP Reset (RST) from the remote server."

So from this I conclude that you are running modbus tcp, right? 
Where is the error, on server or client? And where is your sw running? 
Are you continuously transcieving data, and over one connection only (not open+close socket, or forgetting to close - so you exhaust the availible number of file descriptors)? 

I haven't used the lib for a while, but it seems like a message from os/tcp stack at least, and initiated from the other end.

I suggest adding a lot of debugs/traces or whatever is availible to you in your code so you can follow and know is going on. If possible recompile it for ubuntu and run on a PC (if that isn't what you already do). I think that is very possible and should be easy to do especially since you don't seem to be needing a serial port, just eth.

Good luck,
   Hans 

kindly give me the suggestion about this error message. I have attached the log for your reference.

Thank you,
-Sangeetha

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/libmodbus/aca11463-cdbe-4cda-9e1c-9a26fb7dd107n%40googlegroups.com.

Sangeetha Elumalai

unread,
Oct 22, 2022, 9:50:43 AM10/22/22
to libm...@googlegroups.com
Hi,

I ran the built-in tests available in the packages. The error is on the server side.
I'm running the software on a beaglebone black board. Here I've attached the error log for reference.


# cd /home/libmodbus-3.1.8/tests/
# ./unit-tests.sh
Starting server
Starting client
killall: unit-test-server: no process killed
#

Thank you,
-Sangeetha

unit-test-client.log
unit-test-server.log

ZipperSnake

unread,
Oct 25, 2022, 11:03:41 AM10/25/22
to libm...@googlegroups.com
Hi,
It seems to me that the test run just fine?
Or, do you know that the client has more data requests to do in the test cases?

It could be so simple that the client is done asking the server, and then closes connection?

Regards,
    Hans




Sangeetha Elumalai

unread,
Oct 25, 2022, 11:13:29 AM10/25/22
to libm...@googlegroups.com
Hi Hans,

There is no failure in the test cases??
Is this expected log??

Kindly clarify my doubts.

Thank you,
-Sangeetha

Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "libmodbus".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/libmodbus/mNJnM7TN_jU/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse libmodbus+...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/libmodbus/CAGS5T5EvYXc1Q8c1GeiRD%2B7%2BkWQDcNrrkiGcD80wtoTc3MKb-A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages