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

Cannot import hosts

Scheduled Pinned Locked Moved Solved
FOG Problems
3
8
2.4k
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.
  • D
    dvchuyen
    last edited by dvchuyen Jul 6, 2016, 5:45 AM Jul 6, 2016, 11:45 AM

    I’m using trunk ver 8424
    Whenever I import hosts.csv, I get the message:
    Errors Row #1: Host already exists with this name: T-2443
    Row #2: Host already exists with this name: T-2444
    Row #3: Host already exists with this name: T-2445

    This is the csv file:

    FC:08:4A:5F:E0:51,T-2443
    FC:08:4A:5F:E3:C0,T-2444
    FC:08:4A:5F:E2:DA,T-2445
    

    There is no host T-2443, 2444 or 2445 on both host list on web GUI or on hosts table on mysql.

    I also tried a different hostname, and got the same problem.

    Thanks,

    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Jul 6, 2016, 12:11 PM

      can you run these and give the output?
      SELECT hostID, hostName FROM hosts WHERE hostID=0;
      SELECT hmID,hmHostID,hmMAC FROM hostMAC WHERE hmID=0 OR hmHostID=0;
      select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0;

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      D 1 Reply Last reply Jul 7, 2016, 1:33 AM Reply Quote 0
      • D
        dvchuyen @Wayne Workman
        last edited by Jul 7, 2016, 1:33 AM

        @Wayne-Workman said in Cannot import hosts:

        select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0;

        Thanks!

        MariaDB [(none)]> use fog
        Reading table information for completion of table and column names
        You can turn off this feature to get a quicker startup with -A
        
        Database changed
        MariaDB [fog]> SELECT hostID, hostName FROM hosts WHERE hostID=0;
        Empty set (0.00 sec)
        
        MariaDB [fog]> SELECT hmID,hmHostID,hmMAC FROM hostMAC WHERE hmID=0 OR hmHostID=0;
        Empty set (0.07 sec)
        
        MariaDB [fog]> select gmID,gmHostID,gmGroupID FROM groupMembers WHERE gmHostID=0 OR gmHostID=0 OR gmGroupID=0;
        Empty set (0.02 sec)```
        W 1 Reply Last reply Jul 7, 2016, 1:40 AM Reply Quote 0
        • W
          Wayne Workman @dvchuyen
          last edited by Jul 7, 2016, 1:40 AM

          @dvchuyen Interesting. Thanks. Now these please?

          SELECT hostName,hostID FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445';

          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!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          D 1 Reply Last reply Jul 7, 2016, 1:46 AM Reply Quote 0
          • D
            dvchuyen @Wayne Workman
            last edited by Jul 7, 2016, 1:46 AM

            @Wayne-Workman said in Cannot import hosts:

            SELECT hostName,hostID FROM hosts WHERE hostName = ‘T-2443’ OR hostName = ‘T-2444’ OR hostName = ‘T-2445’;

            Oh, look like they exist on DB,

            MariaDB [fog]> SELECT hostName,hostID FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445';
            +----------+--------+
            | hostName | hostID |
            +----------+--------+
            | T-2443   |   2829 |
            | T-2444   |   2830 |
            | T-2445   |   2831 |
            +----------+--------+
            3 rows in set (0.00 sec)
            

            But I still unable to find them on Web
            alt text

            W 1 Reply Last reply Jul 7, 2016, 1:48 AM Reply Quote 0
            • W
              Wayne Workman @dvchuyen
              last edited by Wayne Workman Jul 6, 2016, 7:50 PM Jul 7, 2016, 1:48 AM

              @dvchuyen lol. ok. I’m going to give you a pass on that one. 🙂

              Delete them with:
              DELETE FROM hosts WHERE hostName = 'T-2443' OR hostName = 'T-2444' OR hostName = 'T-2445';
              And then just re-register or let the new client auto-register them or however you wanna do it.

              EDIT

              You know, I just thought of something…
              @Tom-Elliott this could be a similar issue to parsing like I had here?
              https://forums.fogproject.org/topic/7838/host-import-from-production-fog-system-into-another-production-fog-system

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              D T 2 Replies Last reply Jul 7, 2016, 2:00 AM Reply Quote 0
              • D
                dvchuyen @Wayne Workman
                last edited by Jul 7, 2016, 2:00 AM

                @Wayne-Workman Working like a charm :). Thanks

                1 Reply Last reply Reply Quote 1
                • T
                  Tom Elliott @Wayne Workman
                  last edited by Jul 7, 2016, 2:20 AM

                  @Wayne-Workman nope not a parsing issue more likely it was an importing issue that failed to set up the macs for the host. It has been , as far as I’m aware, been fixed for at least 5 days though.

                  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
                  • 1 / 1
                  1 / 1
                  • First post
                    1/8
                    Last post

                  164

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project