Reiniciei um RPi e, ao retornar, não consegui acessar o IP estático do dispositivo. A causa foi Unsupported device type 772 for "lo"
.
michael@pi3:~ $ sudo journalctl -u networking
[sudo] password for michael:
-- Logs begin at Sat 2016-05-21 22:31:29 UTC, end at Sun 2017-12-17 15:14:04 UTC. --
Dec 17 15:13:00 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 15:13:01 pi3 dhclient[1053]: Internet Systems Consortium DHCP Client 4.3.1
Dec 17 15:13:01 pi3 ifup[838]: Internet Systems Consortium DHCP Client 4.3.1
Dec 17 15:13:01 pi3 ifup[838]: Copyright 2004-2014 Internet Systems Consortium.
Dec 17 15:13:01 pi3 ifup[838]: All rights reserved.
Dec 17 15:13:01 pi3 ifup[838]: For info, please visit https://www.isc.org/software/dhcp/
Dec 17 15:13:01 pi3 dhclient[1053]: Copyright 2004-2014 Internet Systems Consortium.
Dec 17 15:13:01 pi3 dhclient[1053]: All rights reserved.
Dec 17 15:13:01 pi3 dhclient[1053]: For info, please visit https://www.isc.org/software/dhcp/
Dec 17 15:13:01 pi3 dhclient[1053]:
Dec 17 15:13:02 pi3 ifup[838]: Unsupported device type 772 for "lo"
Dec 17 15:13:02 pi3 ifup[838]: If you think you have received this message due to a bug rather
Dec 17 15:13:02 pi3 ifup[838]: than a configuration issue please read the section on submitting
Dec 17 15:13:02 pi3 ifup[838]: bugs on either our web page at www.isc.org or in the README file
Dec 17 15:13:02 pi3 ifup[838]: before submitting a bug. These pages explain the proper
Dec 17 15:13:02 pi3 ifup[838]: process and the information we find helpful for debugging..
Dec 17 15:13:02 pi3 ifup[838]: exiting.
Dec 17 15:13:02 pi3 ifup[838]: Failed to bring up lo.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 17 15:13:02 pi3 systemd[1]: Failed to start Raise network interfaces.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Unit entered failed state.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Failed with result 'exit-code'.
Até onde sei, não fiz nada para causar isso. Recentemente, realizei o seguinte:
sudo vi /etc/apt/sources.list # Added: deb http://deb.debian.org/debian jessie-backports main contrib non-free
sudo apt-get update -y && sudo apt-get -t jessie-backports install systemd-journal-remote
Ele deu vários avisos sobre o software estar instável, no entanto, eu não encabecei esses avisos.
Desde então, reiniciei algumas vezes, editei /etc/dhcpcd
e /etc/network/interfaces
e removi systemd-journal-remote
e executei apt-get update
e apt-get dist-upgrade
.
O dispositivo agora está se conectando à rede, mas usando um IP DHCP atribuído pelo meu roteador. Não sei ao certo se a remoção de systemd-journal-remote
permitiu que eu me conectasse ao IP do DHCP ou se teria sido capaz de fazer isso antes de removê-lo, mas não tentei porque não sabia que estava fazendo isso no momento.
michael@pi3:~ $ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enxb827ebb47748: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
enxb827ebb47748 1500 0 1207 0 0 0 633 0 0 0 BMRU
lo 65536 0 0 0 0 0 0 0 0 0 LRU
wlan0 1500 0 0 0 0 0 0 0 0 0 BMU
michael@pi3:~ $ /sbin/ifconfig -a
enxb827ebb47748 Link encap:Ethernet HWaddr b8:27:eb:b4:77:48
inet addr:10.120.11.100 Bcast:10.120.11.255 Mask:255.255.255.0
inet6 addr: fe80::ba10:beb8:89b0:6514/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1224 errors:0 dropped:0 overruns:0 frame:0
TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120044 (117.2 KiB) TX bytes:105208 (102.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:e1:22:1d
inet6 addr: fe80::f371:f1a7:b477:5ece/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/etc/network/interfaces
tem iface eth0 inet manual
e /etc/dhcpcd.conf
como mostrado abaixo parece bem, e eu deveria estar usando um IP estático. Embora não consegui descobrir como forçar meu roteador a liberar clientes, alterei o intervalo do pool de IPs que causou o lançamento, mas ele acabou de capturar outro IP dinâmico.
michael@pi3:~ $ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
interface eth0
static ip_address=10.120.11.30/24
static routers=10.120.11.1
static domain_name_servers=10.120.11.1
Em seguida, editei /etc/network/interfaces
como mostrado abaixo e parei e desativei dhcpcd
usando systemctl. Observe que a desativação de dhcpcd
gerou alguns avisos, conforme mostrado abaixo.
michael@pi3:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet dhcp
iface eth0 inet static
address 10.120.11.30
netmask 255.255.0.0
gateway 10.120.11.1
dns-nameservers 10.120.11.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: active (running) since Sun 2017-12-17 18:34:10 UTC; 5s ago
Process: 2460 ExecStart=/sbin/dhcpcd -q -w (code=exited, status=0/SUCCESS)
Main PID: 2513 (dhcpcd)
CGroup: /system.slice/dhcpcd.service
└─2513 /sbin/dhcpcd -q -w
Dec 17 18:34:09 pi3 dhcpcd[2460]: version 6.7.1 starting
Dec 17 18:34:09 pi3 dhcpcd[2460]: dev: loaded udev
Dec 17 18:34:10 pi3 dhcpcd[2460]: DUID 00:01:00:01:20:4c:53:e5:b8:27:eb:e2:72:ec
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: IAID eb:b4:77:48
Dec 17 18:34:10 pi3 dhcpcd[2460]: wlan0: waiting for carrier
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: rebinding lease of 10.120.11.101
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: changing route to 10.120.11.0/24
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: changing default route via 10.120.11.1
Dec 17 18:34:10 pi3 systemd[1]: Started dhcpcd on all interfaces.
Dec 17 18:34:10 pi3 dhcpcd[2513]: enxb827ebb47748: soliciting an IPv6 router
michael@pi3:~ $ sudo systemctl stop dhcpcd.service
michael@pi3:~ $ sudo systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: active (exited) since Sun 2017-12-17 18:06:35 UTC; 28min ago
Docs: man:interfaces(5)
Main PID: 808 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/networking.service
Dec 17 18:06:33 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 18:06:35 pi3 systemd[1]: Started Raise network interfaces.
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: failed (Result: exit-code) since Sun 2017-12-17 18:34:33 UTC; 15s ago
Main PID: 2513 (code=exited, status=1/FAILURE)
Dec 17 18:34:33 pi3 dhcpcd[2541]: dhcpcd[2541]: waiting for pid 2513 to exit
Dec 17 18:34:33 pi3 dhcpcd[2541]: sending signal TERM to pid 2513
Dec 17 18:34:33 pi3 dhcpcd[2541]: waiting for pid 2513 to exit
Dec 17 18:34:33 pi3 dhcpcd[2513]: received signal TERM from PID 2541, stopping
Dec 17 18:34:33 pi3 dhcpcd[2513]: wlan0: removing interface
Dec 17 18:34:33 pi3 dhcpcd[2513]: enxb827ebb47748: removing interface
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Main process exited, code=exited, status=1/FAILURE
Dec 17 18:34:33 pi3 systemd[1]: Stopped dhcpcd on all interfaces.
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Unit entered failed state.
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
michael@pi3:~ $ sudo systemctl is-enabled dhcpcd; echo $?
enabled
0
michael@pi3:~ $ sudo systemctl disable dhcpcd.service
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
insserv: warning: current start runlevel(s) (empty) of script 'dhcpcd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script 'dhcpcd' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script 'dhcpcd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script 'dhcpcd' overrides LSB defaults (0 1 6).
michael@pi3:~ $
Após a reinicialização, não tenho uma conexão.
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: inactive (dead)
michael@pi3:~ $ ifconfig -a
enxb827ebb47748 Link encap:Ethernet HWaddr b8:27:eb:b4:77:48
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:e1:22:1d
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
michael@pi3:~ $ cat netstat.txt
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
lo 65536 0 0 0 0 0 0 0 0 0 LRU
wlan0 1500 0 0 0 0 0 0 0 0 0 BMU
michael@pi3:~ $ cat link.txt
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enxb827ebb47748: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
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: enxb827ebb47748: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ ip route # no returned text
michael@pi3:~ $ systemctl status networking
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: active (exited) since Sun 2017-12-17 17:15:44 UTC; 29s ago
Docs: man:interfaces(5)
Main PID: 1347 (code=exited, status=0/SUCCESS)
Dec 17 17:15:44 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 17:15:44 pi3 systemd[1]: Started Raise network interfaces.
michael@pi3:~ $
O que pode causar Unsupported device type 772 for "lo"
? Poderia ter sido causado pela instalação de systemd-journal-remote
de um backport? Isso também poderia resultar em não conseguir atribuir um IP estático?