Score:0

hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname

ms flag

Aloha, i'm on Ubuntu 18.04 and i recently executed a deadly git clean command that was meant to clean the Hard Drive Cache and that whipped out nearly every thing on my hard disc.

Now i can't license any software i install... That's because i can't resolve the hostname of your machine :

$ ping hostname
ping: hostname: Nom ou service inconnu # in english : Name or service not known

Because of

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat systemd
group:          compat systemd
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

even though i've got my hosts on \etc\hosts

127.0.0.1 localhost
127.0.1.1 blad-Lenovo-ideapad-300-15ISK

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

## Local by Flywheel - Start ##
::1 blad.local #Local Site
.
.
.

I'm not really getting what's wrong, and how to make everything work the way it used to...

Any hint may be helpful

Thanks in advance ^^

cc flag
Is this an Ubuntu 18.04 system? Does /etc/hostname actually contain your hostname? Did your ping example actually use "hostname" or your actual hostname? Everything looks pretty normal otherwise.
ms flag
@ubfan1, yes it is an Ubuntu 18.04 system, and /etc/hostname contains my hostname.
ms flag
but i still can't ping hostname
cc flag
That's ping blad-Lenovo-ideapad-300-15ISK your trying, right?
ms flag
Sorry @ubfan1 i commented [down bellow](https://askubuntu.com/a/1349685/983052) as i was adding an other answer to the question
ms flag
I was wrong from the very strart... There you were right, there's absolutely no problem with my hostname...
Score:0
ms flag

@ubfan1 When i do ping blad-Lenovo-ideapad-300-15ISK i get :

$ ping blad-Lenovo-ideapad-300-15ISK
PING blad-Lenovo-ideapad-300-15ISK (127.0.1.1) 56(84) bytes of data.
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=3 ttl=64 time=0.064 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=4 ttl=64 time=0.063 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=5 ttl=64 time=0.062 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=6 ttl=64 time=0.063 ms
64 bytes from blad-Lenovo-ideapad-300-15ISK (127.0.1.1): icmp_seq=7 ttl=64 time=0.062 ms
^C
--- blad-Lenovo-ideapad-300-15ISK ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6147ms
rtt min/avg/max/mdev = 0.035/0.059/0.069/0.013 ms

And when i do ping hostname i get :

$ ping hostname
ping: hostname: Nom ou service inconnu # in english : Name or service not known

Actually the whole problem started while intalling Matlab, i already downloaded the same version i hade before, and i received an error message in the licensing step :

$ sudo ./matlab
License checkout failed.
License Manager Error -95
MATLAB is unable to connect to the license server. 
Make sure you can resolve the hostname of your machine. 
If you are unable to resolve the hostname, contact your System Administrator.

Troubleshoot this issue by visiting: 
https://www.mathworks.com/support/lme/R2018a/95

Diagnostic Information:
Feature: MATLAB 
License path: /home/blad/.matlab/R2018a_licenses:/usr/local/MATLAB/R2018a/licenses/license.dat:/usr/local/MATLAB/R
2018a/licenses/network.lic 
Licensing error: -95,378. System Error: 115

But i'm starting to think it's a DNS problem, for i get no EDNS :

$ dig blad-Lenovo-ideapad-300-15ISK

; <<>> DiG 9.11.3-1ubuntu1.15-Ubuntu <<>> blad-Lenovo-ideapad-300-15ISK
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57976
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;blad-Lenovo-ideapad-300-15ISK. IN  A

;; ANSWER SECTION:
blad-Lenovo-ideapad-300-15ISK. 0 IN A   127.0.1.1

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Jul 02 21:06:55 CET 2021
;; MSG SIZE  rcvd: 74

same with localhost I actually don't know yet what's the problem, just know that there's something which's going wrong...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.