Ask Your Question

Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details

asked 2019-07-20 15:30:35 -0600

pitosalas gravatar image

I've not been able to locate an answer to this although it's been asked often. In a very simple case (directly from a tutorial) I am getting the above error message. I kind of understand what the error is trying to say: the action client is exiting and the action server is complaining about it disappearing. But I don't understand why. Is there further tear down needed in the action client so the server doesn't complain?

I am running melodic on ubuntu 18.04. Here's the source code:

#! /usr/bin/env python

import rospy
import actionlib
from prrexamples.msg import TimerAction, TimerGoal, TimerResult

# Declare the node

# Get the method to talk to the action
client = actionlib.SimpleActionClient('timer', TimerAction)

# Now just wait for it  to come up.
rospy.loginfo("Action server detected")

# Create the TimerGoal objet
goal = TimerGoal()

# Set it up
goal.time_to_wait = rospy.Duration.from_sec(5.0)

# And now tell the action to begin working on the goal

# Block until the action says the job is done

# Print the result.
rospy.loginfo('Time elapsed: %f'%(client.get_result().time_elapsed.to_sec()))


#! /usr/bin/env python
import rospy
import time
import actionlib
from prrexamples.msg import TimerAction, TimerGoal, TimerResult

# Action Request Comes in
def do_timer(goal):
    start_time = time.time()
    result = TimerResult()
    result.time_elapsed = rospy.Duration.from_sec(time.time() - start_time)
    result.updates_sent = 0

# Declare that we are a node

# Declare that this node will handle actions
# When action requests come in, call do_timer method
server = actionlib.SimpleActionServer('timer', TimerAction, do_timer, False)

# Start it up

# Wait until ^c
edit retag flag offensive close merge delete


I'm running into this too. I think the teardown is correct, could be a bug in actionlib. Consider creating an issue on their github. I'm also noticing that this warning only pops up occasionally.

achille gravatar image achille  ( 2019-10-28 19:19:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-12 03:55:02 -0600

hanback114 gravatar image

I think you can use "del" inner function temporory.

It make client to be disconnected normally.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-07-20 15:30:35 -0600

Seen: 539 times

Last updated: Jul 20 '19