• 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

      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
      • Wayne WorkmanW
        Wayne Workman
        last edited by

        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 Reply Quote 0
        • D
          dvchuyen @Wayne Workman
          last edited by

          @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)```
          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @dvchuyen
            last edited by

            @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 Reply Quote 0
            • D
              dvchuyen @Wayne Workman
              last edited by

              @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

              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @dvchuyen
                last edited by Wayne Workman

                @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 Tom ElliottT 2 Replies Last reply Reply Quote 0
                • D
                  dvchuyen @Wayne Workman
                  last edited by

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

                  1 Reply Last reply Reply Quote 1
                  • Tom ElliottT
                    Tom Elliott @Wayne Workman
                    last edited by

                    @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
                    • First post
                      Last post

                    220

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project