[Bug 269779] sysutils/datadog-agent: datadog agent error

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 23 Feb 2023 13:30:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269779

            Bug ID: 269779
           Summary: sysutils/datadog-agent: datadog agent error
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: alexis.cimpu@dmatrixsoft.com
                CC: uros@gruber.si
                CC: uros@gruber.si
             Flags: maintainer-feedback?(uros@gruber.si)

Datadog agent fails to restart on freebsd with the error below if the agent is
already stopped:

# service datadog-agent restart
Error: Error stopping the agent: Post "https://localhost:5001/agent/stop": dial
tcp [::1]:5001: connect: operation timed out

Current workaround that seems to fix the problem is adding a check and a sleep
in the stop or restart in rc.d of datadogagent 
Below is a snip of current datadogagent rc.d
datadog_agent_restart()
{
        datadog_agent_stop &&  sleep 3 && datadog_agent_start
        return $?
}


datadog_agent_stop() {
        rc_pid=`check_pidfile ${pidfile} ${command}`
        if [ -n "${rc_pid}" ]; then
                ${command} ${command_args} stop
        fi
        return $?
}

-- 
You are receiving this mail because:
You are the assignee for the bug.