# RTDE connection reset by peer error 104

**URL:** <https://forum.universal-robots.com/t/rtde-connection-reset-by-peer-error-104/24798>\
**Category:** Robot Communication\
**Created:** [November 3, 2022, 1:23pm UTC](https://forum.universal-robots.com/t/rtde-connection-reset-by-peer-error-104/24798 "2022-11-03T13:23:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickbakker01](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nickbakker01](https://forum.universal-robots.com/u/nickbakker01)\
**Post date:** [November 3, 2022, 1:23pm UTC](https://forum.universal-robots.com/t/rtde-connection-reset-by-peer-error-104/24798/1 "2022-11-03T13:23:57Z")

</div>

Hello,

I’am trying to constantly update data on the robot with the RTDE protocol (while true loop). Now I am having a problem. I get the error **unable to negotiate protocol version**. What you see in my code is that I open the connection send the data and close the connection. If I don’t open and close my connection I get another error namely: **connection reset by peer**. How can I fix these problems? Anyone a suggestion?

Piece of code:  
counter = 0  
while True:  
robot = robot\_class.robot\_ur5e(robot\_ip,30004,“…/Smart\_cobot/control\_loop\_configuration.xml”)  
counter += 1  
print(counter)  
list\_setp = [0.0,0.0,0.0,0.0,0.0,0.0]  
robot.send\_setpoint(list\_setp)  
robot.stop\_communication()

---

<div class="post-metadata">

**Author:** ![rkeulemans](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rkeulemans](https://forum.universal-robots.com/u/rkeulemans)\
**Post date:** [April 9, 2025, 10:16am UTC](https://forum.universal-robots.com/t/rtde-connection-reset-by-peer-error-104/24798/2 "2025-04-09T10:16:08Z")

</div>

Hi Nick, we are having exactly the same problem with a UR20, `connection reset by peer` at unexpected moments. Did you manage to solve it after all?
