Hostname keeps changing back

Hello all,

I’ve installed a fresh SLES 12 server and been configuring it but bumping into a few things.
Most important at this moment is that the hostname keeps changing back after a reboot.

webserver162:~ # hostname
webserver162
webserver162:~ # service apache2 status
apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
Active: active (running) since Thu 2015-04-30 17:09:28 CEST; 2min 24s ago
Main PID: 1702 (httpd2-prefork)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: /system.slice/apache2.service
├─1702 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2317 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2318 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2319 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2320 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2321 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2326 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2327 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
├─2328 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
└─2463 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start

Apr 30 17:09:17 webserver162 start_apache2[1702]: AH00557: httpd2-prefork: apr_sockaddr_info_get() failed for webserver162
Apr 30 17:09:17 webserver162 start_apache2[1702]: AH00558: httpd2-prefork: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message

When I check the /etc/hosts it says webserver162.yard-it.nl and the same for /etc/HOSTNAME but after a reboot it keeps changing back to webserver162.

What could be the problem here?

SLES forums are at http://forums.suse.com

Your problem is caused by a setting in yast / network / network devices -> change hostname via dhcp.

I will have a look there.

No that’s not the problem, that’s selected but greyed out because we are not using DHCP.

Did you set the hostname via yast and not by editing the hostname file?

On 2015-04-30 17:36, criskolkman1 wrote:
>
> Miuku;2707572 Wrote:
>> SLES forums are at http://forums.suse.com
>>
>> Your problem is caused by a setting in yast / network / network devices
>> -> change hostname via dhcp.
>
> I will have a look there.
>
> No that’s not the problem, that’s selected but greyed out because we are
> not using DHCP.

Then you have to ask on the SLES forum. Same login/pass as here.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))