This is e-mail notification to warn you that your hostname is setup improperly on your system.

Wanabo

Verified User
Joined
Jan 19, 2013
Messages
336
Location
The Netherlands
This is e-mail notification to warn you that your hostname is setup improperly on your system.

Code:
host.domainname.nl, resolves to 127.0.0.1.  Please make sure that your hostname resolves to your server ip (serverip) or else your email may not work correctly.

Solution:

Create an A record for your hostname (host.domainname.nl.) in your DNS control panel. Point the hostname to your server's main IP address.  Also check /etc/hosts to ensure that the server ip is correctly set.

An A record all ready exists so started digging.

Found this thread from 15 years ago, [hostname], resolves to 127.0.0.1 which points me to check etc/hosts

Current etc/hosts
Code:
 Your system has configured 'manage_etc_hosts' as True.
As a result, if you wish for changes to this file to persist
then you will need to either
a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
b.) change or remove the value of 'manage_etc_hosts' in
     /etc/cloud/cloud.cfg or cloud-config from user-data

The following lines are desirable for IPv4 capable hosts
27.0.0.1 host.domainname.nl host
27.0.0.1 localhost.localdomain localhost
27.0.0.1 localhost4.localdomain4 localhost4

The following lines are desirable for IPv6 capable hosts
:1 host.domainname.nl host
:1 localhost.localdomain localhost
:1 localhost6.localdomain6 localhost6

So think I need to change it to the below. But I have not set up an ipv6 address for the server yet. I have a ipv6/24 block added in the DA ip-manager and honestly I don't know how to assign single ipv6 addresses. I need a little help with ipv6 and do I need to change anything in /etc/cloud/ ??

Code:
 Your system has configured 'manage_etc_hosts' as True.
As a result, if you wish for changes to this file to persist
then you will need to either
a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
b.) change or remove the value of 'manage_etc_hosts' in
     /etc/cloud/cloud.cfg or cloud-config from user-data

The following lines are desirable for IPv4 capable hosts
serverip host.domainname.nl host
27.0.0.1 localhost.localdomain localhost
27.0.0.1 localhost4.localdomain4 localhost4

The following lines are desirable for IPv6 capable hosts
??????????? host.domainname.nl host
:1 localhost.localdomain localhost
:1 localhost6.localdomain6 localhost6

/etc/cloud/templates/hosts.redhat.tmpl
Code:
## template:jinja
{#
This file /etc/cloud/templates/hosts.redhat.tmpl is only utilized
if enabled in cloud-config.  Specifically, in order to enable it
you need to add the following to config:
  manage_etc_hosts: True
-#}
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
#
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 {{fqdn}} {{hostname}}
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4

# The following lines are desirable for IPv6 capable hosts
::1 {{fqdn}} {{hostname}}
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

The value of 'manage_etc_hosts' in /etc/cloud/cloud.cfg is not present. cloud-config is nowhere to be found.
 
Did you try setting the hostname from the administrator settings?
 
Don't think that is the problem. Hostname is properly displayed in :2222/admin/settings/server Also the correct hostname was used during DA install.
My guess it has to do with the cloud template used by my webhoster.
Besides I know how to fix it in etc/hosts at least for ipv4, just not sure how to proceed with ipv6 and if I need to edit some cloud config as suggested in etc/hosts.
 
Why do you even use 127.0.0.1 as a FQDN hostname? I presume this hosts file is presented by your host because it's not done that way during a normal OS install.

This is a normal /etc/hosts file on a DA server like we have them (not using ipv6), only content needed:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
95.xxx.xxx.xxx            server.domain.nl server
This is how it should be and as you can see, 127.0.0.1 pointing to localhost (not hostname) and nothing with 27.0.0.1. These lines is all you need.

Be aware, I do not use cloud.
For ipv6 you can do quite the same but then like:
Code:
::1 localhost6.localdomain6 localhost6
and ofcourse you can add your ipv6 ip and hostname the same way which is done with ipv4.
 
I figured the ipv4 part out already.
Leaves me with the ipv6 part.
I could remove :1 host.domainname.nl host part and see how it goes.
But I really would like to learn about ipv6. Google isn't much helpfull.
Like how to extrapolate a single ipv6 address from my whole block? It has a total IP addresses: 1208925819614629174706176
How to split it for example in recognizable ranges so I can assign it to DA users?
How to keep track of assigned ipv6 addresses, is there a handy tool?
Can I let DA assign a random ipv6 address from my owned block?
Do I need subnetting for ipv6?



1593022999428.png


Should I add here some of the 1208925819614629174706176 ipv6 addresses?
But which ones?
 
I could remove :1 host.domainname.nl host part and see how it goes.
You should. As you could read from my reply before, you don't use your hostname for localhost *anywhere* in your /etc/hosts file.
I posted what you should use for ipv6, so why don't you use that?

Learning about ipv6 is something else.
 
As for ipv6 learning, since you're also Dutch, try this:
and these two:

And don't forget the calculator to see which ip's are in a range:
 
I've commented out :1 host.domainname.nl host in my etc/hosts file.

Thanks Richard, Your first link contained chapter 11 making an ipv6 plan. Exactly what I needed. I think I'll try to put (at least some) my ipv6 addresses in an Excel sheet, so I can make blocks for DA users.
Links 2 and 3 are less usefull but it did give me a better understanding.
Link 4 was all ready known to me.

Next time I start googling in Dutch as English produces allmost only links to caculators and basic information.... But perhaps I needed better search keywords.
 
I've commented out :1 host.domainname.nl host in my etc/hosts file.
I was talking about my advise adding this:
Code:
::1 localhost6.localdomain6 localhost6

You have this for ip4 and probably might also need it for ipv6. Just not use your host.domainname.nl in there. You've removed that so that's fine.

Mostly I also Google in English because that gives best result. But learning is mostly best or the easiest in our own language, so that's why I Googled in Dutch and was glad to find some interesting links. You're welcome.
I will contact you when I'm going to start with ipv6 planning if needed. I'm sure you can learn me something by then. ;)
 
Back
Top