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

Hostname Already Exists

Scheduled Pinned Locked Moved Solved
FOG Problems
2
7
1.8k
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 May 5, 2016, 4:46 PM

    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
    • T
      Tom Elliott
      last edited by Tom Elliott May 5, 2016, 10:57 AM May 5, 2016, 4:51 PM

      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 May 5, 2016, 4:59 PM Reply Quote 1
      • V
        Vanlue IT Guy
        last edited by May 5, 2016, 4:54 PM

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

        T 1 Reply Last reply May 5, 2016, 4:57 PM Reply Quote 0
        • T
          Tom Elliott @Vanlue IT Guy
          last edited by May 5, 2016, 4:57 PM

          @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 May 5, 2016, 4:59 PM

            @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.

            T 1 Reply Last reply May 5, 2016, 5:02 PM Reply Quote 0
            • T
              Tom Elliott @Vanlue IT Guy
              last edited by May 5, 2016, 5:02 PM

              @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 May 5, 2016, 5:03 PM

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

                213

                Online

                12.1k

                Users

                17.3k

                Topics

                155.4k

                Posts
                Copyright © 2012-2024 FOG Project