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

    Hostname Already Exists

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    7
    1.7k
    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.
    • V
      Vanlue IT Guy
      last edited by

      Hello all,

      When searching I found a similar issue from a year or so ago with no clear answer.

      Here is my problem:

      I am trying to add a host to my fog but it keeps saying the host name already exists. When I search my host list, it’s not there. I think I have some kind of corruption or database issue.

      Can anyone help me through this step-by-step as I’m not really a Linux or a MySQL person?

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by Tom Elliott

        Find the hostname in the database directly using mysql command line.
        if No mysql password.
        mysql -u root fog
        If mysql password
        mysql -u root -p fog

        Run:

        select hostID from hosts where hostname='HOSTNAMEOFEXISTINGHOST';

        Because it doesn’t, most likely, have the mac address associated you won’t see it in the GUI.

        Once found you can simply delete the conflicting entry using:

        delete from hosts where hostID=HOSTIDRETURNEDFROMSELECTSTATEMENT;

        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

        V 2 Replies Last reply Reply Quote 1
        • V
          Vanlue IT Guy
          last edited by

          Tom, I’m running 14.04.4 LTS Command Line only. I’m sorry, but how do I get to the MySQL part?

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @Vanlue IT Guy
            last edited by

            @Vanlue-IT-Guy https://forums.fogproject.org/topic/7333/hostname-already-exists/2#

            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
            • V
              Vanlue IT Guy @Tom Elliott
              last edited by

              @Tom-Elliott said in Hostname Already Exists:

              select hostID from hosts where hostname=‘HOSTNAMEOFEXISTINGHOST’;

              I copy / pasted that and I get Empty set as the result.

              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @Vanlue IT Guy
                last edited by

                @Vanlue-IT-Guy Copy pasted what?

                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
                • V
                  Vanlue IT Guy @Tom Elliott
                  last edited by

                  @Tom-Elliott Nevermind, I’m an idiot. I think I found it. I got it. I forgot to change your place holders. Please consider this issue resolved.

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

                  193

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project