absolute emergency! Why does my hostname display howtoforge ? It's very very urgent

Discussion in 'ISPConfig 3 Priority Support' started by virk6, Dec 1, 2024.

  1. virk6

    virk6 Member HowtoForge Supporter

    absolute emergency!
    Why does my hostname or hostname display howtoforge ?
    hostname -f
    hostname: Name or service not known.

    what has hapended
    on my server Ispconfig nginx debian ?

    It's very very urgent
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably you configured something in your server and entered the word howtoforge there.

    Check the files:

    /etc/hosts
    /etc/hostname

    You must have entered the word " howtoforge " in one of these files. Correct the file by setting the desired hostname and saving it.
     
  3. virk6

    virk6 Member HowtoForge Supporter

    In these two files
    /etc/hosts
    /etc/hostname

    there is no word howtoforge.
    It's mysterious! What to do?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What's in /etc/hosts and /etc/hostname? It might alos be that you accidentally set the hostname to the word howtoforge dynamically using the hostname command without changing a config file. This would mean that the hostname command now shows the word hostname when you execute it until next system reboot, but it's not permanently stored in any config file.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Example: When you run:

    Code:
    hostname howtoforge
    on your system, then the command:

    Code:
    hostname
    will return the word howtoforge the next time you run it. So to fix that, you simply run:

    Code:
    hostname yourhostname
     
  6. virk6

    virk6 Member HowtoForge Supporter

    I typed the following command

    hostnamectl set-hostname nsxxxxxxxxxxxxxxxxxxxx.ip-xxxxxx.eu
    and after that the command
    hostname
    I have the right hostname.
    Do I have to reboot and it is not necessary?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    no.
     
  8. virk6

    virk6 Member HowtoForge Supporter

    The problem is solved !
     

Share This Page