web-dev-qa-db-fra.com

Impossible de se connecter à Ethernet sous Ubuntu 18.10

Je sais que cette question est assez générale, mais je ne sais pas quelles sont les données de problème nécessaires pour poser cette question. Je publie un article de style assez général.

Mon problème est que mon système dit que je suis connecté à Internet mais que je ne peux pas y accéder. Souvent, je perds la connexion à Internet.

Mon noyau est 4.18.0.13 et j'ai changé cette version en 4.4.0.43 et cela fonctionnait pendant un certain temps.

Mais là encore, le problème persiste.

J'ai besoin d'une solution à ce problème car mon travail est en péril pour cette question.

Si vous avez besoin de n'importe quel type de sortie de commande, je le posterai ici pour une requête ultérieure.

Merci beaucoup

Modifier

Je reçois l'erreur

dhcp6 (eth1) request timed out
State change unknown

Je reçois ce message lorsque j'ai essayé de redémarrer mon réseau à l'aide de la commande

Sudo /etc/init.d/networking restart

l'erreur est:

Restarting networking (via systemctl): networking.serviceJob for networking.service failed because a timeout was exceeded.
See "systemctl status networking.service" and "journalctl -xe" for details.

voici quelques commandes obligatoires et leurs sorties, aidez-moi;

adresse IP

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope Host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope Host 
       valid_lft forever preferred_lft forever
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:0a:eb:68:18:a2 brd ff:ff:ff:ff:ff:ff
3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether e0:69:95:91:55:f5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.252/24 brd 192.168.0.255 scope global dynamic noprefixroute eno1
       valid_lft 85929sec preferred_lft 85929sec
    inet6 fe80::e269:95ff:fe91:55f5/64 scope link 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:82:1b:57 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:82:1b:57 brd ff:ff:ff:ff:ff:ff
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ec:28:29:49 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

route ip

default via 192.168.0.229 dev eno1 proto dhcp metric 100 
169.254.0.0/16 dev eno1 scope link metric 1000 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
192.168.0.0/24 dev eno1 proto kernel scope link src 192.168.0.252 metric 100 
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown 

cat/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

cat /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53
search DLink

cat /etc/nsswitch.conf

# /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] dns
networks:       files

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

netgroup:       nis

nslookup ubuntu.com

Server:     127.0.0.53
Address:    127.0.0.53#53

** server can't find ubuntu.com: SERVFAIL

Dig ubuntuforums.org

; <<>> Dig 9.11.4-3ubuntu5-Ubuntu <<>> ubuntuforums.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 46952
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;ubuntuforums.org.      IN  A

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Mon Dec 31 11:16:16 IST 2018
;; MSG SIZE  rcvd: 45

ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.984 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.36 ms
^C
--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 0.984/1.171/1.358/0.187 ms

systemctl status networking.service

networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: en
   Active: failed (Result: exit-code) since Mon 2018-12-31 12:29:59 IST; 21h ago
     Docs: man:interfaces(5)
 Main PID: 1332 (code=exited, status=1/FAILURE)

Dec 31 12:29:56 jith dhclient[1847]: If you think you have received this message due 
Dec 31 12:29:56 jith dhclient[1847]: than a configuration issue please read the secti
Dec 31 12:29:56 jith dhclient[1847]: bugs on either our web page at www.isc.org or in
Dec 31 12:29:56 jith dhclient[1847]: before submitting a bug.  These pages explain th
Dec 31 12:29:56 jith dhclient[1847]: process and the information we find helpful for 
Dec 31 12:29:56 jith dhclient[1847]: 
Dec 31 12:29:56 jith dhclient[1847]: exiting.
Dec 31 12:29:59 jith systemd[1]: networking.service: Main process exited, code=exited
Dec 31 12:29:59 jith systemd[1]: networking.service: Failed with result 'exit-code'.
Dec 31 12:29:59 jith systemd[1]: Failed to start Raise network interfaces.
lines 1-16/16 (END)...skipping...
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2018-12-31 12:29:59 IST; 21h ago
     Docs: man:interfaces(5)
 Main PID: 1332 (code=exited, status=1/FAILURE)

Dec 31 12:29:56 jith dhclient[1847]: If you think you have received this message due to a bug rather
Dec 31 12:29:56 jith dhclient[1847]: than a configuration issue please read the section on submitting
Dec 31 12:29:56 jith dhclient[1847]: bugs on either our web page at www.isc.org or in the README file
Dec 31 12:29:56 jith dhclient[1847]: before submitting a bug.  These pages explain the proper
Dec 31 12:29:56 jith dhclient[1847]: process and the information we find helpful for debugging..
Dec 31 12:29:56 jith dhclient[1847]: 
Dec 31 12:29:56 jith dhclient[1847]: exiting.
Dec 31 12:29:59 jith systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 31 12:29:59 jith systemd[1]: networking.service: Failed with result 'exit-code'.
Dec 31 12:29:59 jith systemd[1]: Failed to start Raise network interfaces.

journalctl -xe

 Jan 01 14:00:37 jith /usr/lib/gdm3/gdm-x-session[5251]: (**) Option "fd" "28"
Jan 01 14:00:37 jith /usr/lib/gdm3/gdm-x-session[5251]: (II) event11 - lircd-uinput: device removed
Jan 01 14:00:37 jith /usr/lib/gdm3/gdm-x-session[5251]: (II) UnloadModule: "libinput"
Jan 01 14:00:37 jith /usr/lib/gdm3/gdm-x-session[5251]: (II) systemd-logind: releasing fd for 13:75
Jan 01 14:00:39 jith systemd[1]: redis-server.service: Start operation timed out. Terminating.
Jan 01 14:00:39 jith systemd[1]: redis-server.service: Failed with result 'timeout'.
Jan 01 14:00:39 jith systemd[1]: Failed to start Advanced key-value store.
-- Subject: Unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit redis-server.service has failed.
-- 
-- The result is RESULT.
Jan 01 14:00:40 jith systemd[1]: redis-server.service: Service RestartSec=100ms expired, scheduling restart.
Jan 01 14:00:40 jith systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 147.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit redis-server.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jan 01 14:00:40 jith systemd[1]: Stopped Advanced key-value store.
-- Subject: Unit redis-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit redis-server.service has finished shutting down.
Jan 01 14:00:40 jith systemd[1]: Starting Advanced key-value store...
-- Subject: Unit redis-server.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit redis-server.service has begun starting up.
Jan 01 14:00:40 jith systemd[1]: redis-server.service: Can't open PID file /var/run/redis/redis-server.pid (yet?) after start: No such file or directory
Jan 01 14:00:42 jith Sudo[8975]:      web : TTY=pts/1 ; PWD=/home/web ; USER=root ; COMMAND=/usr/sbin/service lircd.socket stop
Jan 01 14:00:42 jith Sudo[8975]: pam_unix(Sudo:session): session opened for user root by web(uid=0)
Jan 01 14:00:42 jith Sudo[8975]: pam_unix(Sudo:session): session closed for user root

journalctl -xe

    Jan 01 16:55:34 jith avahi-daemon[1609]: New relevant interface eno1.IPv4 for mDNS.
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.8167] device (eno1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jan 01 16:55:34 jith avahi-daemon[1609]: Registering new address record for 192.168.0.252 on eno1.IPv4.
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.8210] device (eno1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.8213] device (eno1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed'
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.8216] manager: NetworkManager state is now CONNECTED_GLOBAL
Jan 01 16:55:34 jith systemd[1]: Started resolvconf-pull-resolved.service.
-- Subject: Unit resolvconf-pull-resolved.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit resolvconf-pull-resolved.service has finished starting up.
-- 
-- The start-up result is RESULT.
Jan 01 16:55:34 jith systemd-resolved[2075]: Using degraded feature set (UDP) for DNS server 192.168.0.229.
Jan 01 16:55:34 jith dhclient[28822]: bound to 192.168.0.252 -- renewal in 37914 seconds.
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.9139] policy: set 'Wired connection 1' (eno1) as default for IPv4 routing and DNS
Jan 01 16:55:34 jith NetworkManager[1618]: <info>  [1546341934.9162] device (eno1): Activation: successful, device activated.
Jan 01 16:55:34 jith gsd-sharing[5759]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
Jan 01 16:55:34 jith gsd-sharing[5759]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
Jan 01 16:55:34 jith nm-dispatcher[28780]: req:2 'up' [eno1]: new request (1 scripts)
Jan 01 16:55:34 jith nm-dispatcher[28780]: req:2 'up' [eno1]: start running ordered scripts...
Jan 01 16:55:34 jith systemd[1]: Starting resolvconf-pull-resolved.service...
-- Subject: Unit resolvconf-pull-resolved.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit resolvconf-pull-resolved.service has begun starting up.
Jan 01 16:55:34 jith systemd[1]: Started resolvconf-pull-resolved.service.
-- Subject: Unit resolvconf-pull-resolved.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit resolvconf-pull-resolved.service has finished starting up.
-- 
-- The start-up result is RESULT.
1
Kevin RED

Je trouve qu’il manque le paquet libnss-resol dans une nouvelle installation d’ubuntu 18.10. Sans cela, certaines recherches de nom DNS (comme ping pop3.comcast.net) échouent.

Sudo apt-get install libnss-resolve

Cette installation doit modifier le fichier /etc/nsswitch.conf pour avoir une ligne hosts comme celle-ci:

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

Ce paquet supplémentaire a corrigé tous mes problèmes de DNS pour 18.10, même en utilisant les serveurs de noms DNS par défaut fournis par DHCP et ma passerelle sans fil. Le même correctif s'applique à 18.04.

1
ubfan1

Ceci listera les serveurs DNS, nmcli device show | grep IP4.dns

Il semble que vos serveurs DNS ne sont pas configurés.

0
puneet

J'ai résolu le problème temporairement. Je ne sais pas si c'est une solution du tout.

Ce que j'ai fait a été ajouté deux adresses sous les paramètres ipv4 dans les paramètres réseau Ubuntu 8.8.8.8 et 8.8.4.4. et j'ai aussi désactivé les paramètres ipv6.

Mais encore parfois, Internet est coupé et je dois éteindre Internet et me reconnecter pour établir une connexion.

S'il y a quelqu'un qui connaît la situation et sait comment la résoudre, veuillez ajouter d'autres réponses.

0
Kevin RED