Professional Web Applications Themes

problem due to hostname change - FreeBSD

Hi list, my computer is not part of a domain, and so I had set my hostname to <old_hostname>. Now I changed it in rc.conf to <new_hostname>: ~> cat /etc/rc.conf | grep hostname hostname="<new_hostname>" ~> I rebooted, but my pc is still somewhere configured to be called <old_hostname>. First of all, when the pc boots, I see this in dmesg: FreeBSD 5.4-PRERELEASE #10: Wed Mar 9 15:40:46 UTC 2005 <my_name><old_hostname>:/usr/obj/usr/src/sys/GAHR Then, when I try to start apache, I see this in my /var/log/httpd-error.log, and apache won't start: [Thu Mar 17 13:29:11 2005] [alert] mod_unique_id: unable to gethostbyname("<old_hostname>") My question is: ...

  1. #1

    Default problem due to hostname change

    Hi list,
    my computer is not part of a domain, and so I had set my hostname to
    <old_hostname>.
    Now I changed it in rc.conf to <new_hostname>:

    ~> cat /etc/rc.conf | grep hostname
    hostname="<new_hostname>"
    ~>

    I rebooted, but my pc is still somewhere configured to be called <old_hostname>.
    First of all, when the pc boots, I see this in dmesg:

    FreeBSD 5.4-PRERELEASE #10: Wed Mar 9 15:40:46 UTC 2005
    <my_name><old_hostname>:/usr/obj/usr/src/sys/GAHR

    Then, when I try to start apache, I see this in my
    /var/log/httpd-error.log, and apache won't start:

    [Thu Mar 17 13:29:11 2005] [alert] mod_unique_id: unable to
    gethostbyname("<old_hostname>")


    My question is: how can I change my hostname to <new_hostname> safely,
    in a way that the <old_hostname> is not used anymore in any part of
    the OS?

    Thank you!



    --
    Pietro Cerutti
    <com>
    <http://www.gahr.ch/pgp-key>

    Beansidhe - SwiSS Death / Thrash Metal
    <www.beansidhe.ch>

    Windows: "Where do you want to go today?"
    Linux: "Where do you want to go tomorrow?"
    FreeBSD: "Are you guys coming or what?"
    Pietro Guest

  2. #2

    Default Re: problem due to hostname change

    On 17 Mar 2005 09:57:26 -0500, Lowell Gilbert
    <ilk.org> wrote: 
    >
    > That's not a problem; all it means is that's who built the kernel. It
    > doesn't get used for *anything* other than printing that message.

    >
    > You must have put the old hostname into Apache's configuration
    > explicitly. You will need to change it by hand. The configuration
    > file is (by default, as installed from the port)
    > /usr/local/etc/apache/httpd.conf.[/ref]

    No, this is not the problem. I searched in httpd.conf but I didn't
    find anything concerning my <old_hostname>.

    I even deinstalled & deleted the configuration files & reinstalled apache.

    Don't forget this:
    FreeBSD 5.4-PRERELEASE #10: Wed Mar 9 15:40:46 UTC 2005
    <my_name><old_hostname>:/usr/obj/usr/src/sys/GAHR

    Here I have my <old_hostname> too.
     
    >
    > Changing rc.conf is enough for anything that was configured
    > automatically.[/ref]

    It should be so, but it actually isn't.

    If you changed some other configuration by hand, you 

    I'm sure I didn't set my <old_hostname> anywhere else than in rc.conf
     

    However, thank you for your advice, but it didn't solve my problem...


    --
    Pietro Cerutti
    <com>
    <http://www.gahr.ch/pgp-key>

    Beansidhe - SwiSS Death / Thrash Metal
    <www.beansidhe.ch>

    Windows: "Where do you want to go today?"
    Linux: "Where do you want to go tomorrow?"
    FreeBSD: "Are you guys coming or what?"
    Pietro Guest

  3. #3

    Default RE: problem due to hostname change


     

    When apache starts up if it don't have your hostname set in it's
    config file then it issues a system call asking what
    the hostname for the IP address is that is on your host.

    whatever it gets back it then uses to setup a default website. If you
    change the name of your host in /etc.rc.conf then it better also
    have been changed in any DNS servers that your system is using.
     

    Did you check /etc/hosts


    Ted

    Ted Guest

  4. #4

    Default Re: problem due to hostname change

    On Thu, 17 Mar 2005 07:38:49 -0800, Ted Mittelstaedt
    <placo.com> wrote: 
    >
    > When apache starts up if it don't have your hostname set in it's
    > config file then it issues a system call asking what
    > the hostname for the IP address is that is on your host.
    >
    > whatever it gets back it then uses to setup a default website. If you
    > change the name of your host in /etc.rc.conf then it better also
    > have been changed in any DNS servers that your system is using.

    >
    > Did you check /etc/hosts
    >
    >
    > Ted
    >
    >[/ref]


    Thanks Ted, Neo-Vortex and Eric.

    nothing found with grep on /etc/* , /usr/local/etc* , /var/named/*
    but I found this:

    # grep <old_hostname> /var/*
    Binary file /var/db matches
    Binary file /var/mysql matches
    Binary file /var/restoresymtable matches
    #

    Well I double check once more on my system!

    Thank you!

    --
    Pietro Cerutti
    <com>
    <http://www.gahr.ch/pgp-key>

    Beansidhe - SwiSS Death / Thrash Metal
    <www.beansidhe.ch>

    Windows: "Where do you want to go today?"
    Linux: "Where do you want to go tomorrow?"
    FreeBSD: "Are you guys coming or what?"
    Pietro Guest

  5. #5

    Default RE: problem due to hostname change


     

    Unless your system is the dns server you need to do as I suggested and
    fix the DNS!!

    Ted

    Ted Guest

  6. #6

    Default Re: problem due to hostname change

    Pietro Cerutti wrote:
     
    This is the name of name and hostname who compiles FreeBSD
    5.4-PRERELEASE #10 Kernel

    Don't Worry about this.
     
    /usr/local/etc/apache2/httpd.conf : modify Servername clause to your
    hostname to fix this error
     
    /etc/rc.conf : add line : hostname="your_hostname"

    Simply

    --
    Jose Nicolas Castellano
    Presidente - Asociación No cON Name
    Tel: +34 616 727 675
    E-Mail : org
    WWW: www.noconname.org



    José Guest

Similar Threads

  1. hostname change & Oracle
    By I.A. in forum Oracle Server
    Replies: 12
    Last Post: October 17th, 01:20 PM
  2. hostname change
    By Syn in forum Sun Solaris
    Replies: 6
    Last Post: July 30th, 08:29 AM
  3. change hostname and ip
    By acis in forum SCO
    Replies: 3
    Last Post: July 8th, 06:19 AM
  4. Replies: 0
    Last Post: July 7th, 07:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139