aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Cannot get the official hostname  (Read 1246 times)

HKM

  • Jr. Member
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 76
  • You don't know enough to know that you don't know.
Cannot get the official hostname
« on: December 17, 2015, 09:45:39 AM »

Ok this is driving me crazy.

Code: [Select]
Error: Cannot get the official hostname (error 0: Success)
How do I fix this? which parameter controls this? I have edited /etc/sysconfig/network and still nothing. Where is this trying to pull hostname from?
Logged

BitCoin: 18rNdfKrUz5j3a9TQcECfKzY13gb1NLcmv

HKM

  • Jr. Member
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 76
  • You don't know enough to know that you don't know.
Re: Cannot get the official hostname
« Reply #1 on: December 17, 2015, 03:11:25 PM »

Okay so after digging around all network config on the server it seemed that since I used custom hosts file on local for system wide additional layer of protection against ad tracking and malicious websites, just like IPFilter on ~Mule.  As it was updated it created symlink to /etc/hosts file bind to /sys/data so it broke the link to hostname.

So go to /etc/hosts and find IPv4/IPv6 offending entries like this:
Code: [Select]
127.0.0.1   localhost #IPv4
127.0.0.1   localhost.localdomain localhost localhost4.localdomain4 localhost4

::1   localhost # IPv6
::1   localhost localhost.localdomain localhost6 localhost6.localdomain6

and change it to something like this:
Code: [Select]
127.0.0.1   localhost.localdomain localhost HOSTNAME
::1   localhost localhost.localdomain HOSTNAME

Where HOSTNAME is just input your current. Now for it to take effect it depends on your network config as some clear hosts cache on every DNS request so file is read again. If its don't work then reload network (service networking restart) or reboot (init 6).
Logged

BitCoin: 18rNdfKrUz5j3a9TQcECfKzY13gb1NLcmv