Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: bentsea on April 01, 2019, 12:19:23 AM

Title: Changing Hostname Inserts Junk into Hostname
Post by: bentsea on April 01, 2019, 12:19:23 AM
From the change hostname menu (Server Settings -> Change Hostname) I am experiencing an error when clicking the change hostname button. No matter what I set my hostname to, the server appends "127.0.0.1" to the hostname when it moves to the next screen.

Example, if I try to set my hostname to server5.bentsea.net the server sets it to server5.bentsea.net127.0.0.1.

THis obviously causes SSL generation to fail and causes the "You do not have a valid hostname set" error.

Can anyone recommend any kind of troubleshooting for this?
Title: Re: Changing Hostname Inserts Junk into Hostname
Post by: evansa on April 01, 2019, 10:02:21 PM
Hello,

EDIT /etc/hosts and set hostname manually.
You can also contain support so we investigate further
Title: Re: Changing Hostname Inserts Junk into Hostname
Post by: Netino on April 03, 2019, 01:11:52 AM
The problem maybe the /etc/hostname file was created without the linefeed character.
Then, change it manually, adding the linefeed at the end of that line, and after, create your certificates.

Depending on your server, this file could go back to the previous version alone, automatically.

If so, to solve it, you can set the immutable attribute of the file (after your changes):
Code: [Select]
# chattr +i /etc/hostname

Regards,
Netino
Title: Re: Changing Hostname Inserts Junk into Hostname
Post by: Igor S. on April 03, 2019, 06:34:43 AM
Hi.
From the change hostname menu (Server Settings -> Change Hostname) I am experiencing an error when clicking the change hostname button. No matter what I set my hostname to, the server appends "127.0.0.1" to the hostname when it moves to the next screen.

Example, if I try to set my hostname to server5.bentsea.net the server sets it to server5.bentsea.net127.0.0.1.

THis obviously causes SSL generation to fail and causes the "You do not have a valid hostname set" error.

Can anyone recommend any kind of troubleshooting for this?

I guess the problem in /etc/hosts. Check all records there and delete the wrong one.