Remotely starting go-based daemons

42 views
Skip to first unread message

Russ Robinson

unread,
Mar 9, 2021, 4:15:14 PM3/9/21
to rundeck-discuss
  On Linux targets using Linux-based Rundeck 3.3.7 community; I've ran into issues when trying to remotely ssh and sudo su over to Linux root on remote node to start go-based daemons (ex.: filebeat-god).  I have tty set on in the ssh settings (otherwise sudo would not work).  However from searching other forums; this appears to be an terminal-based issue with go-based daemons.  Has anyone else ran into this?  If so, did you come up with a fix?

  I've tried a variety of things (ex.: sudo su - root -m -c 'service filebeat-god start') and such.

Kobi Rosenstein

unread,
Mar 10, 2021, 12:57:10 AM3/10/21
to rundeck...@googlegroups.com
You might be able to use a script that contains your commands. Use the sudoers file to allow your non root user to run it (EG sudo /opt/launch_filebeat.sh )
Then the file would look like
service filbeat-god start
You could also farm it out to Ansible to run though for this simple command that seems like overkill.
On Mar 9 2021, at 11:15 pm, Russ Robinson <eagl...@gmail.com> wrote:



  On Linux targets using Linux-based Rundeck 3.3.7 community; I've ran into issues when trying to remotely ssh and sudo su over to Linux root on remote node to start go-based daemons (ex.: filebeat-god).  I have tty set on in the ssh settings (otherwise sudo would not work).  However from searching other forums; this appears to be an terminal-based issue with go-based daemons.  Has anyone else ran into this?  If so, did you come up with a fix?

  I've tried a variety of things (ex.: sudo su - root -m -c 'service filebeat-god start') and such.

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
Sent from Mailspring

Russ Robinson

unread,
Mar 10, 2021, 6:44:27 AM3/10/21
to rundeck...@googlegroups.com
Yes - I tried using an inline script but it had the same results.

Thanks,
Russ

On Mar 10, 2021, at 12:57 AM, Kobi Rosenstein <kobiros...@gmail.com> wrote:



Kobi Rosenstein

unread,
Mar 10, 2021, 6:53:46 AM3/10/21
to rundeck...@googlegroups.com
Can you maybe make an actual servicefile for the daemon?

On Mar 10 2021, at 1:44 pm, Russ Robinson <eagl...@gmail.com> wrote:
Yes - I tried using an inline script but it had the same results.

Thanks,
Russ

On Mar 10, 2021, at 12:57 AM, Kobi Rosenstein <kobiros...@gmail.com> wrote:


You might be able to use a script that contains your commands. Use the sudoers file to allow your non root user to run it (EG sudo /opt/launch_filebeat.sh )
Then the file would look like
service filbeat-god start
You could also farm it out to Ansible to run though for this simple command that seems like overkill.
On Mar 9 2021, at 11:15 pm, Russ Robinson <eagl...@gmail.com> wrote:



  On Linux targets using Linux-based Rundeck 3.3.7 community; I've ran into issues when trying to remotely ssh and sudo su over to Linux root on remote node to start go-based daemons (ex.: filebeat-god).  I have tty set on in the ssh settings (otherwise sudo would not work).  However from searching other forums; this appears to be an terminal-based issue with go-based daemons.  Has anyone else ran into this?  If so, did you come up with a fix?

  I've tried a variety of things (ex.: sudo su - root -m -c 'service filebeat-god start') and such.

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
Sent from Mailspring

Russ Robinson

unread,
Mar 10, 2021, 7:16:28 AM3/10/21
to rundeck...@googlegroups.com
It already exists in /etc/init.d .  This is what the service stop/start command is calling.

Thanks,
Russ

On Mar 10, 2021, at 6:53 AM, Kobi Rosenstein <kobiros...@gmail.com> wrote:



Kobi Rosenstein

unread,
Mar 10, 2021, 7:18:16 AM3/10/21
to rundeck...@googlegroups.com
Can you run the command with sudo as a non-root user on the node itself?
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
Sent from Mailspring

Russ Robinson

unread,
Mar 10, 2021, 8:04:28 AM3/10/21
to rundeck...@googlegroups.com
Yes ... that works fine since I have a terminal session.

Thanks,
Russ

On Mar 10, 2021, at 7:18 AM, Kobi Rosenstein <kobiros...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages