[RESOLVED] Terminal prompt name changed

General support questions
Post Reply
motogeeeksatyam
Posts: 28
Joined: 2011/08/20 16:23:59

[RESOLVED] Terminal prompt name changed

Post by motogeeeksatyam » 2012/10/14 07:28:30

hi,
Earlier when i open up terminal it shows like this:
[code][my_username@localhost: ~][/code]

But now it shows like this:
[code][my_username@dhcppc17 ~][/code]

how to restore it to previous state, i dont want this dhcppc17 because it is creating a problem as i start htttpd server using this command:

[code]servive httpd start[/code]

The terminal says:

[code]Starting httpd: httpd: apr_sockaddr_info_get() failed for dhcppc17
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[/code]

Still my server works fine but there is a little problem i think that is why it shows this warning as i stated above because of dhcppc17.

Should i continue using my PC by ignoring this warning or there is a solution for this.

If you need any information about my PC configuration please ask.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Terminal prompt name changed

Post by TrevorH » 2012/10/14 12:26:51

Judging by the content of the name it's been given I would hazard a guess that it's being given out by DHCP. Perhaps adding the line

[code]
DHCP_HOSTNAME=whatever
[/code]

to /etc/sysconfig/network might help once you reboot?

thepostman
Posts: 12
Joined: 2012/09/20 09:27:25

Re: Terminal prompt name changed

Post by thepostman » 2012/10/16 03:20:16

This is the displaying of error:

[code]Starting httpd: httpd: apr_sockaddr_info_get() failed for dhcppc17 [/code]

and this is warning, it won't affect to the starting up:

[code]httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName[/code]

You should take a look at http error_log for the reason why apache fails to start.

On other side, can you show me your out put of:

/etc/sysconfig/network

How about your networking configuration? It is static or DHCP?

driftwood
Posts: 119
Joined: 2012/01/26 14:40:16

Re: Terminal prompt name changed

Post by driftwood » 2012/10/16 11:47:20

In my opinion, the warning is innocuous. I get it all the time, it doesn't cause any trouble.

motogeeeksatyam
Posts: 28
Joined: 2011/08/20 16:23:59

Re: Terminal prompt name changed

Post by motogeeeksatyam » 2012/10/16 18:27:39

The output of file /etc/sysconfig/network is:

[code]NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain[/code]

lystor
Posts: 187
Joined: 2008/09/10 15:46:12
Location: Ukraine, Donetsk

Re: Terminal prompt name changed

Post by lystor » 2012/10/17 06:31:43

Hi, motogeeeksatyam

Remove [b]domain-name[/b] and [b]host-name[/b] from the list of options the [url=http://pkgs.org/download/dhclient]dhclient[/url] is to request from the server:
[code]request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name, nis-domain, nis-servers, ntp-servers, interface-mtu[/code]
See dhclient.conf sample for a syntax:
/usr/share/doc/dhclient-4.1.1/dhclient.conf.sample

Default dhclient config file:
/etc/dhcp/dhclient.conf

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Terminal prompt name changed

Post by jlehtone » 2012/10/17 07:25:35

Duct taping dhclient is not elegant.
[quote]motogeeeksatyam wrote:
[code]Starting httpd: httpd: apr_sockaddr_info_get() failed for dhcppc17
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[/code][/quote]
Both of these lines give multiple hits in websearch. I'd focus on the httpd

There are multiple players in this picture:
1. Access to httpd has two things: IP address and the servername in URL. This allows multiple "virtual" servers on same IP address and port.
2. Name resolution. httpd apparently wants to make sure that "servername" resolves to the IP and IP resolves to the servername.
3. httpd does by default use the hostname as servername. You can set in httpd's config the 'ServerName' parameter(s).
4. A host can call itself whatever, with no checks. Almost nobody knows that name.

This leads to questions:
1. Do you have phoney "ServerName" in httpd's config? Probably not.
2. Does the DHCP both give the name "dhcppc17" and point to a DNS that resolves that name properly? Is the IP public?
3. Does the DHCP allocate an address from dynamic range?
4. Do you connect to the httpd from other machines?

Let the hostname be for now and add to httpd's configuration:
[code]ServerName localhost[/code]

motogeeeksatyam
Posts: 28
Joined: 2011/08/20 16:23:59

Re: Terminal prompt name changed

Post by motogeeeksatyam » 2012/10/25 16:21:34

I recently changed my internet service provider now i am using a DSL for internet and my terminal name is back as earlier Resolved.
I think it was changed beacuse the Internet connection used by me was shared by many people via router that may be the cause of that name "dhcppc 17" in my terminal now it is back to :
"my_username@localhost"

RESOLVED by taking dedicated internet connection.. :-D

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

[RESOLVED] Terminal prompt name changed

Post by AlanBartlett » 2012/10/25 18:13:19

Thank you for reporting back with the details.

On your behalf and for posterity, this thread is now marked [RESOLVED].

haroon.linux
Posts: 1
Joined: 2014/02/19 15:53:41

Re: [RESOLVED] Terminal prompt name changed

Post by haroon.linux » 2014/02/19 15:57:13

Thank you so much...

Add line in /etc/httpd/conf/httpd.conf

ServerName hostname

then the problem is resolved

Post Reply