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

    Triggers disappearing

    General Discussion
    2
    6
    222
    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.
    • J
      jpe81
      last edited by jpe81

      Hello,

      I have a strange issue. I have 19 triggers in my commands.json file, however when I go to run a trigger it will run, but when if I try to run it again several triggers will drop off from the webgui. They will remain in commands.json, and if I vi the file and just write quit it (without and changes) they'll come back until the next time I try to run it more than 1x.

      I don't see any indication of an issue in syslog or journalctl.

      I'm running debian 10.4 on a Raspberry Pi 3 Model B Rev 1.2.

      Thanks,
      Jeff

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @jpe81
        last edited by Russ

        @jpe81, I wonder if you have two agents running with the same token and computer id.

        You might have the background agent running as root, with data in /root/.TRIGGERcmdData, and you're also running it as your own user, with data in /home/(user)/.TRIGGERcmdData

        The two agents probably have different sets of commands in commands.json, and they're both over-writing the command list on the computer in your account.

        That's my theory.

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • J
          jpe81
          last edited by

          I only see one version running.

          root@piAppServer:/# ps -ef | grep -i trigger
          nobody 343 1 0 Aug21 ? 00:00:00 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --user nobody --deviceglob /dev/input/event*
          root 2363 1 0 05:39 ? 00:00:15 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
          root 3388 3249 0 09:39 pts/0 00:00:00 grep -i trigger
          root@piAppServer:/#

          I did a find on commnads.json and it only returned the original and the .backup.

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @jpe81
            last edited by

            @jpe81, is it the same sub-set of triggers that remain every time some triggers drop off?

            Also, please confirm - the triggers remain in the web gui until you run one of your commands, correct?

            I wonder if there's another computer running with that computer id. You could try this experiment: Stop the triggercmdagent service on your Pi, and run one of the remaining triggers in the web gui. If you see Command ran in the Runs list, that would confirm there's another computer running with that computer ID, which would explain why the triggers keep changing.

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • J
              jpe81
              last edited by

              I think you are right...there was an old pi that I moved everything from that didn't realize was on. That has to be it.

              Thanks for all your help!

              While I was looking at this I was considering moving it off the pi to docker. I saw that you used ubuntu, will this work with alpine as well?

              Thanks again,
              Jeff

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @jpe81
                last edited by

                @jpe81, for Docker, these posts might be useful to you:

                https://www.triggercmd.com/forum/topic/780/how-to-reduce-size-by-removing-dubious-dependencies/4
                https://www.triggercmd.com/forum/topic/451/run-the-triggercmd-linux-agent-in-a-docker-container

                It should work fine on Alpine Linux. The agent.js script really just needs NodeJS to run.

                Russell VanderMey

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