AWS instance after machine hostname change, the server loose connection after while

0

Hi all,

OS: SLES15 Server: EC2 with Load Balancer and Auto Scaling

After changing the hostname as "sudo hostnamectl set-hostname webserver.mydomain.com", the server loose connection after a while.

Any ideas how to make it stable? Thank you

1 Antwort
1

Hostname can be made permanent with below steps:

  1. Set hostname $ sudo hostnamectl set-hostname new-hostname

$ sudo vi /etc/hosts

Find the localhost string and append the new hostname.

127.0.0.1 localhost webserver.mydomain.com

Save and exit

  1. Confirm the change in hostname:

$ hostnamectl

Please refer: https://repost.aws/knowledge-center/linux-static-hostname-suse

AWS
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen