TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Trigeercmdagent start, but it does not work

    Instructions
    2
    5
    307
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wesley Galdino de FariasW
      Wesley Galdino de Farias
      last edited by

      Hi,

      I've installed triggercmdagent, it is start without any erros, but it is not working.

      Bellow, the 'systemctl status triggercmdagent'

      ● triggercmdagent.service - TRIGGERcmd Agent
      Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vendor preset: enabled)
      Active: active (running) since Fri 2021-10-15 09:59:56 -03; 7s ago
      Main PID: 1996 (node)
      Tasks: 11 (limit: 4435)
      CGroup: /system.slice/triggercmdagent.service
      └─1996 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData

      Oct 15 09:59:58 ubuntu env[1996]: Logging in with saved token to run background tasks.
      Oct 15 09:59:58 ubuntu env[1996]: Write backup completed.
      Oct 15 09:59:59 ubuntu env[1996]: |> Now connected to https://www.triggercmd.com.
      Oct 15 09:59:59 ubuntu env[1996]: ___/ For help, see: http://bit.ly/2q0QDpf
      Oct 15 09:59:59 ubuntu env[1996]: (using sails.io.js node SDK @v1.1.13)
      Oct 15 09:59:59 ubuntu env[1996]: Connected at: Fri Oct 15 2021 09:59:59 GMT-0300 (Brasilia Standard Time)
      Oct 15 09:59:59 ubuntu env[1996]: Initiated command removals
      Oct 15 09:59:59 ubuntu env[1996]: Initiated command adds
      Oct 15 09:59:59 ubuntu env[1996]: { message: 'Subscribed to 61697726d340a9001b5131be!' }
      Oct 15 09:59:59 ubuntu env[1996]: { message: 'Subscribed to 61697726d340a9001b5131be!' }

      I've noticed that, when I create a new command, in commands.json file and restart the service, it does not sync with the triggercmd site, but when I start the triggercmd with the --console option, just like that:

      node /usr/share/triggercmdagent/app/src/agent.js --console

      Everything works properly and the new command syncs with the site.

      What I must do to fix this?

      Tks.

      1 Reply Last reply Reply Quote 0
      • Wesley Galdino de FariasW
        Wesley Galdino de Farias
        last edited by

        I've fixed the problem, but not in elegant way.
        I've changed triggercmdagent service systemd file located in: /etc/systemd/system/triggercmdagent.service

        From this:
        ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData

        To this:
        ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/agent.js --console >/dev/null 2>/dev/null &

        From now on, it is working good.

        If someone has the reight solution for this problem, I'd like to know. Tks

        RussR 1 Reply Last reply Reply Quote 0
        • RussR
          Russ @Wesley Galdino de Farias
          last edited by

          @Wesley-Galdino-de-Farias, I think I know what the problem was. I think your commands had "ground": "foreground" but you were running the background service which only cares about commands with "ground": "background".

          When you updated your /etc/systemd/system/triggercmdagent.service file you changed it to run in foreground mode.

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • Wesley Galdino de FariasW
            Wesley Galdino de Farias
            last edited by

            Thanks for your reply, and I'm sorry for the huge delay to reply you.
            You are totally right I was made this 'ground' mistake.

            Thanks

            RussR 1 Reply Last reply Reply Quote 0
            • RussR
              Russ @Wesley Galdino de Farias
              last edited by

              @Wesley-Galdino-de-Farias, good. That's a common problem. I'm glad you figured it out.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • First post
                Last post