I'm using a Debian AMI that I built from scratch. Whether I use my own Debian AMI or an existing published Debian AMI, I always notice the following errors from the system console log when the instance boots:
hostname: the specified hostname is invalid startpar: service(s) returned failure: hostname.sh ...
hostname.sh is an init.d script that Debian uses to set the hostname from /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
How can I disable or remove hostname.sh? I've tried to remove it, but then I just get errors that hostname.sh could not be found, because it's symlinked from somewhere else.
The above errors don't affect the operation of the instance, but it's just annoying to seem them on each boot.
> I'm using a Debian AMI that I built from scratch. Whether I use my own > Debian AMI or an existing published Debian AMI, I always notice the > following errors from the system console log when the instance boots:
> hostname: the specified hostname is invalid > startpar: service(s) returned failure: hostname.sh ...
> hostname.sh is an init.d script that Debian uses to set the hostname from > /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
> How can I disable or remove hostname.sh? I've tried to remove it, but > then > I just get errors that hostname.sh could not be found, because it's > symlinked from somewhere else.
> The above errors don't affect the operation of the instance, but it's > just > annoying to seem them on each boot.
I have a made a buildscript where I took care of every possible
startup error. But I gave up on hostname.sh.
There is a bug when the hostname is not set in '/etc/hostname' (or
because it has not been assigned by DHCP yet).
hostname.sh is supposed to set it to localhost. The problem with all
that is that `hostname` returns '(none)' instead of an empty string in
this case.
The script does not account for that, and tries to set it to '(none)'
instead, which is an invalid hostname.
I would suggest ignoring it, until the bug is fixed.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165086
On Mar 13, 11:21 pm, Josh Kraemer <joshkrae...@gmail.com> wrote:
> I'm using a Debian AMI that I built from scratch. Whether I use my own
> Debian AMI or an existing published Debian AMI, I always notice the
> following errors from the system console log when the instance boots:
> hostname: the specified hostname is invalid
> startpar: service(s) returned failure: hostname.sh ...
> hostname.sh is an init.d script that Debian uses to set the hostname from
> /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
> How can I disable or remove hostname.sh? I've tried to remove it, but then
> I just get errors that hostname.sh could not be found, because it's
> symlinked from somewhere else.
> The above errors don't affect the operation of the instance, but it's just
> annoying to seem them on each boot.
On Wed, 14 Mar 2012 20:52:43 +1100, andsens <ands...@gmail.com> wrote: > I have a made a buildscript where I took care of every possible > startup error. But I gave up on hostname.sh. > There is a bug when the hostname is not set in '/etc/hostname' (or > because it has not been assigned by DHCP yet). > hostname.sh is supposed to set it to localhost. The problem with all > that is that `hostname` returns '(none)' instead of an empty string in > this case. > The script does not account for that, and tries to set it to '(none)' > instead, which is an invalid hostname. > I would suggest ignoring it, until the bug is fixed. > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165086
I guess I don't run into the bug as the provider in the cookbook also sets /etc/hostname Though I have not observed this at all with the RightScale OSS AMIs.
> On Mar 13, 11:21 pm, Josh Kraemer <joshkrae...@gmail.com> wrote: >> I'm using a Debian AMI that I built from scratch. Whether I use my own >> Debian AMI or an existing published Debian AMI, I always notice the >> following errors from the system console log when the instance boots:
>> hostname: the specified hostname is invalid >> startpar: service(s) returned failure: hostname.sh ...
>> hostname.sh is an init.d script that Debian uses to set the hostname >> from >> /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
>> How can I disable or remove hostname.sh? I've tried to remove it, but >> then >> I just get errors that hostname.sh could not be found, because it's >> symlinked from somewhere else.
>> The above errors don't affect the operation of the instance, but it's >> just >> annoying to seem them on each boot.
On Wednesday, March 14, 2012 4:52:43 AM UTC-5, andsens wrote:
> I have a made a buildscript where I took care of every possible > startup error. But I gave up on hostname.sh. > There is a bug when the hostname is not set in '/etc/hostname' (or > because it has not been assigned by DHCP yet). > hostname.sh is supposed to set it to localhost. The problem with all > that is that `hostname` returns '(none)' instead of an empty string in > this case. > The script does not account for that, and tries to set it to '(none)' > instead, which is an invalid hostname. > I would suggest ignoring it, until the bug is fixed. > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165086
> On Mar 13, 11:21 pm, Josh Kraemer <joshkrae...@gmail.com> wrote: > > I'm using a Debian AMI that I built from scratch. Whether I use my own > > Debian AMI or an existing published Debian AMI, I always notice the > > following errors from the system console log when the instance boots:
> > hostname: the specified hostname is invalid > > startpar: service(s) returned failure: hostname.sh ...
> > hostname.sh is an init.d script that Debian uses to set the hostname > from > > /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
> > How can I disable or remove hostname.sh? I've tried to remove it, but > then > > I just get errors that hostname.sh could not be found, because it's > > symlinked from somewhere else.
> > The above errors don't affect the operation of the instance, but it's > just > > annoying to seem them on each boot.
Well its not really the purpose of the script to be dependent on NICs.
It's only purpose is to set the hostname in the kernel to what is
defined in /etc/hostname.
Later on DHCP clients might change that, but that change does not need
to go through hostname.sh
On Mar 15, 9:08 pm, Josh Kraemer <joshkrae...@gmail.com> wrote:
> It seems this issue is related to the fact that hostname.sh is run before
> the network interfaces are configured.
> On Wednesday, March 14, 2012 4:52:43 AM UTC-5, andsens wrote:
> > I have a made a buildscript where I took care of every possible
> > startup error. But I gave up on hostname.sh.
> > There is a bug when the hostname is not set in '/etc/hostname' (or
> > because it has not been assigned by DHCP yet).
> > hostname.sh is supposed to set it to localhost. The problem with all
> > that is that `hostname` returns '(none)' instead of an empty string in
> > this case.
> > The script does not account for that, and tries to set it to '(none)'
> > instead, which is an invalid hostname.
> > I would suggest ignoring it, until the bug is fixed.
> >http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165086
> > On Mar 13, 11:21 pm, Josh Kraemer <joshkrae...@gmail.com> wrote:
> > > I'm using a Debian AMI that I built from scratch. Whether I use my own
> > > Debian AMI or an existing published Debian AMI, I always notice the
> > > following errors from the system console log when the instance boots:
> > > hostname: the specified hostname is invalid
> > > startpar: service(s) returned failure: hostname.sh ...
> > > hostname.sh is an init.d script that Debian uses to set the hostname
> > from
> > > /etc/hostname, which doesn't exist and is not used in any Debian AMIs.
> > > How can I disable or remove hostname.sh? I've tried to remove it, but
> > then
> > > I just get errors that hostname.sh could not be found, because it's
> > > symlinked from somewhere else.
> > > The above errors don't affect the operation of the instance, but it's
> > just
> > > annoying to seem them on each boot.