• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

[git5040] snapinJobs with HostID 0 appear

Scheduled Pinned Locked Moved Solved
Bug Reports
2
11
3.3k
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.
  • T
    tian
    last edited by Oct 22, 2015, 10:23 AM

    In the table snapinJobs entries with (sj)HostID appear when a host computer (with client 0.95) is turned on:

    +------+----------+-----------+---------------------+
    | sjID | sjHostID | sjStateID | sjCreateTime        |
    +------+----------+-----------+---------------------+
    |    1 |        0 |         5 | 2015-10-22 11:32:44 |
    |    2 |        0 |         5 | 2015-10-22 11:37:01 |
    |    3 |        0 |         5 | 2015-10-22 11:38:04 |
    |    4 |        0 |         5 | 2015-10-22 11:39:06 |
    +------+----------+-----------+---------------------+
    

    Between 11:32 and 11:37 the computer was restarted. Before the restart I truncated the table snapinJobs.

    • It isn’t triggered only by a special host computer turned on. I tested it with more computers
    • The table “hosts” begins with hostID 1.
    • On the web interface there are no open/waiting snapin tasks.
    • The table “snapinTasks” contains some already finished tasks with “stState” -> “4”.
    • The table “snapinAssoc” contains just entries with saHostID beginning from “1”.

    Is there any more information needed to solve this?

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Oct 22, 2015, 4:34 PM

      I think we need more information.

      The fact that they’re showing up with a stateID of 0, leads me to believe there were snapinJobs associated to the host, and it was then updated to be in a cancelled state because of how the code runs. If there’s a job that hasn’t been closed out properly, to ensure a new tasking occurs properly, it cancels all of that hosts jobs (and snapin task associations). that’s what the stateID 5 is.

      I’ve modified to make a bit better handling too now. Maybe it will be much faster, and less numerically dependent.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by Oct 22, 2015, 6:14 PM

        I’ve modified the cleanup code for the cancellation of older snapin tasks/jobs. It will now appropriately setup the return code and details for those tasks that did need to get cancelled so our logging (Snapin History) should represent properly. It doesn’t have to loop any data to do the same thing anymore.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        T 1 Reply Last reply Oct 26, 2015, 10:08 AM Reply Quote 0
        • T
          tian @Tom Elliott
          last edited by Oct 26, 2015, 10:08 AM

          I just tested with git5074 and the entries with sjHostID 0 still are created, when a host computer is turned on.

          On the host computer the client checks for snapins every minute without any error:

          ------------------------------------------------------------------------------
          ---------------------------------SnapinClient---------------------------------
          ------------------------------------------------------------------------------
           26.10.2015 10:22 Client-Info Version: 0.9.5
           26.10.2015 10:22 SnapinClient Running...
           26.10.2015 10:22 Middleware::Communication URL: http://SERVER-IP/fog/service/servicemodule-active.php?moduleid=snapinclient&mac=ONBOARD-MAC|VM-MAC|&newService=1
           26.10.2015 10:22 Middleware::Communication Response: Success
           26.10.2015 10:22 Middleware::Communication URL: http://SERVER-IP/fog/service/snapins.checkin.php?mac=ONBOARD-MAC|VM-MAC|&newService=1
           26.10.2015 10:22 Middleware::Communication Response: No snapins
          ------------------------------------------------------------------------------
          

          More things I tested:

          • truncated the Table snapinTasks -> “sjHostID 0” entries still created
            – (I still think about why there is/was status code “4” - I just remember 1 for running and 2 for finished)
          • disabled the Snapins service in the Service Configuration of one host -> for this host no “sjHostID 0” entries are created anymore
            – enabling the Snapin service for this hosts again -> “sjHostID 0” entries are created every minute again for this host

          Which table content/error log i can provide to help to find out why that is caused?

          1 Reply Last reply Reply Quote 0
          • T
            tian
            last edited by Oct 29, 2015, 9:29 AM

            I did a quick test with git5122 - (two computers turned on, Snapin service activated, no snapin task) - and it seems to be fixed:

            • no new “sjHostID 0” entries in snapinJobs are created anymore - also not after truncate snapinJobs

            I try to test some more with snapins and report if anything doesn’t work.

            T 1 Reply Last reply Oct 29, 2015, 9:41 AM Reply Quote 0
            • T
              Tom Elliott @tian
              last edited by Oct 29, 2015, 9:41 AM

              @tian just let me know if I can solve the thread and thanks for reporting back.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              T 1 Reply Last reply Oct 29, 2015, 12:16 PM Reply Quote 0
              • T
                tian @Tom Elliott
                last edited by Oct 29, 2015, 12:16 PM

                @Tom-Elliott

                • on the web interface (Taskmanagement -> OK😞
                  – the active snapin task was there
                  – after running the snapin the task vaished

                • on the web interface (snapin log -> not OK😞
                  – i can select the date range of today
                  – no log of the just run snapin was found (“no results found”)
                  – the csv export is empty (just the headers)

                • on the client (OK😞
                  – the client icon messages that the snapin(s) is/are running or finish appear when a user is logged in
                  – the client is able to see the snapin and runs it - return code of the batch file is 0 (information from the fog.log on the client)

                • in the database ((not) OK??😞
                  – snapinJobs:

                +------+----------+-----------+---------------------+
                | sjID | sjHostID | sjStateID | sjCreateTime        |
                +------+----------+-----------+---------------------+
                |    1 |       21 |         4 | 2015-10-29 12:40:15 |
                |    2 |       21 |         4 | 2015-10-29 12:59:37 |
                +------+----------+-----------+---------------------+
                
                

                – snapinTasks:

                +------+---------+---------+---------------------+---------------------+------------+--------------+-----------------+
                | stID | stJobID | stState | stCheckinDate       | stCompleteDate      | stSnapinID | stReturnCode | stReturnDetails |
                +------+---------+---------+---------------------+---------------------+------------+--------------+-----------------+
                |    1 |       1 |       4 | 2015-10-29 12:40:30 | 2015-10-29 12:40:31 |          1 |            0 |                 |
                |    2 |       2 |       4 | 2015-10-29 13:00:00 | 2015-10-29 13:00:01 |          1 |            0 |                 |
                |    3 |       2 |       4 | 2015-10-29 13:00:01 | 2015-10-29 13:01:36 |         11 |            0 |                 |
                +------+---------+---------+---------------------+---------------------+------------+--------------+-----------------+
                
                

                I started the “All Snapins” at advanced actions two times for this host. the first time with one snapin, the second time with 2 snapins on the host.
                Running a single snapin with the single snapin advanced action behaves the same like above.

                T 1 Reply Last reply Oct 29, 2015, 4:04 PM Reply Quote 0
                • T
                  Tom Elliott @tian
                  last edited by Oct 29, 2015, 4:04 PM

                  @tian was the snapin completed today?

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  T 1 Reply Last reply Oct 30, 2015, 9:22 AM Reply Quote 0
                  • T
                    tian @Tom Elliott
                    last edited by Oct 30, 2015, 9:22 AM

                    @Tom-Elliott said:

                    @tian was the snapin completed today?

                    Yes - the snapins have been completed on the host. I could verify the changes have been made there.
                    The snapins with the ID 1 and 11 are simple batch files with some simple commands - the snapin with ID11 additionally contains wait commands for 90 seconds in total.

                    T 1 Reply Last reply Oct 30, 2015, 9:25 AM Reply Quote 0
                    • T
                      Tom Elliott @tian
                      last edited by Oct 30, 2015, 9:25 AM

                      @tian can you update? I fixed a few problems last night and snapin logs were one of them.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      T 1 Reply Last reply Oct 30, 2015, 10:23 AM Reply Quote 0
                      • T
                        tian @Tom Elliott
                        last edited by Oct 30, 2015, 10:23 AM

                        @Tom-Elliott Thanks - git5135 fixed the snapin log:

                        • “active snapins” are added/removed correctly -> OK
                        • snapins are running ok on the client -> OK
                        • the snapin log displays the database content correctly again (it added the new snapin tasks additionally to the ones from yesterday)** -> OK**
                        • the snapin status still is reported as “4” in snapinJobs and snapinTasks -> OK?
                        • no “sjHostID 0” entries in snapinJobs are created from hosts only started up/running -> OK
                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        1 / 1
                        • First post
                          3/11
                          Last post

                        208

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project