AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 745854
Accepted
dutsnekcirf
dutsnekcirf
Asked: 2015-12-30 15:13:46 +0800 CST2015-12-30 15:13:46 +0800 CST 2015-12-30 15:13:46 +0800 CST

Não é possível obter o systemd-networkd para iniciar com sucesso

  • 772

Eu tenho um mini-pc com seis interfaces de rede rodando CentOS 7.2 com Kernel 3.10 com uma instalação mínima.

Quero nomear minhas interfaces net0-net5. Para fazer isso, estou tentando seguir as sugestões mencionadas aqui: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

No artigo acima, afirma-se que, para renomear minhas interfaces, preciso criar arquivos .link e colocá-los em /etc/systemd/network. Esta é a nova maneira pela qual é necessário renomear suas interfaces de rede em conformidade com o systemd-networkd.

No entanto, estou descobrindo que o serviço systemd-networkd não inicia e, sem esse serviço em execução, acho que não consigo nomear minhas interfaces.

Veja o seguinte:

systemctl --failed -l
  UNIT                     LOAD   ACTIVE SUB    DESCRIPTION
<E2><97><8F> systemd-networkd.service loaded failed failed Network Service
<E2><97><8F> systemd-networkd.socket  loaded failed failed networkd rtnetlink so

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.


systemctl  status systemd-networkd -l
��● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Tue 2011-05-10 01:45:45 UTC; 32min ago
     Docs: man:systemd-networkd.service(8)
  Process: 317 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=226/NAMESPACE)
 Main PID: 317 (code=exited, status=226/NAMESPACE)

May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.service entered failed state.
May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed.
May 10 01:45:45 localhost systemd[1]: systemd-networkd.service has no holdoff time, scheduling restart.
May 10 01:45:45 localhost systemd[1]: start request repeated too quickly for systemd-networkd.service
May 10 01:45:45 localhost systemd[1]: Failed to start Network Service.
May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.service entered failed state.
May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed.
May 10 01:45:45 localhost systemd[1]: start request repeated too quickly for systemd-networkd.service
May 10 01:45:45 localhost systemd[1]: Failed to start Network Service.
May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed.

systemctl  status systemd-networkd.socket -l                                                             
��● systemd-networkd.socket - networkd rtnetlink socket
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.socket; enabled; vendor preset: disabled)
   Active: failed (Result: service-failed-permanent) since Tue 2011-05-10 01:45:45 UTC; 39min ago
     Docs: man:systemd-networkd.service(8)
           man:rtnetlink(7)
   Listen: route 273 (Netlink)

May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.socket entered failed state.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Devo mencionar que o NetworkManager não está instalado nem o DHCPlient. Devido ao fato de ser uma instalação mínima, pensei em mostrar quais processos estão em execução:

ps -ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:09 /init
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:00 [ksoftirqd/0]
    5 ?        S<     0:00 [kworker/0:0H]
    7 ?        S      0:00 [migration/0]
    8 ?        S  /0]
   10 ?        S      0:00 [rcuob/1]
   11 ?        S      0:00 [rcuob/2]
   12 ?        S      0:00 [rcuob/3]
   13 ?        S      0:00 [rcu_sched]
   14 ?        S      0:00 [rcuos/0]
   15 ?        S      0:00 [rcuos/1]
   16 ?        S      0:00 [rcuos/2]
   17 ?        S      0:00 [rcuos/3]
   18 ?        S      0:00 [watchdog/0]
   19 ?        S      0:00 [watchdog/1]
   20 ?        S      0:00 [migration/1]
   21 ?        S      0:00 [ksoftirqd/1]
   23 ?        S<     0:00 [kworker/1:0H]
   24 ?        S<     0:00 [khelper]
   25 ?        S      0:00 [kdevtmpfs]
   26 ?        S<     0:00 [netns]
   27 ?        S<     0:00 [perf]
   28 ?        S<     0:00 [writeback]
   29 ?        S<     0:00 [kintegrityd]
   30 ?        S<     0:00 [bioset]
   31 ?        S<     0:00 [kblockd]
   32 ?        S<     0:00 [md]
   33 ?        S      0:00 [kworker/0:1]
   34 ?        S      0:00 [kworker/1:1]
   38 ?        S      0:00 [khungtaskd]
   39 ?        S      0:00 [kswapd0]
   40 ?        SN     0:00 [ksmd]
   41 ?        SN     0:00 [khugepaged]
   42 ?        S      0:00 [fsnotify_mark]
   43 ?        S<     0:00 [crypto]
   51 ?        S<     0:00 [kthrotld]
   54 ?        S<     0:00 [kmpath_rdacd]
   55 ?        S      0:00 [kworker/1:2]
   56 ?        S<     0:00 [kpsmoused]
   57 ?        S      0:00 [kworker/0:2]
   58 ?        S<     0:00 [ipv6_addrconf]
   77 ?        S<     0:00 [deferwq]
   89 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
   96 ?        S<     0:00 [rpciod]
  109 ?        S      0:00 [kauditd]
  110 ?        Ss     0:00 /usr/sbin/lvmetad -f
  131 ?        Ss     0:00 /usr/lib/systemd/systemd-udevd
  160 ?        S<     0:00 [events_power_ef]
  164 ?        S<     0:00 [ata_sff]
  166 ?        S      0:17 [kworker/u8:3]
  167 ?        S      0:00 [scsi_eh_0]
  169 ?        S<     0:00 [scsi_tmf_0]
  172 ?        S      0:00 [scsi_eh_1]
  173 ?        S<     0:00 [scsi_tmf_1]
  174 ?        S      0:00 [kworker/u8:4]
  175 ?        S      0:00 [scsi_eh_2]
  176 ?        S<     0:00 [scsi_tmf_2]
  177 ?        S      0:00 [scsi_eh_3]
  178 ?        S<     0:00 [scsi_tmf_3]
  181 ?        S<     0:00 [kvm-irqfd-clean]
  208 ?        S<     0:00 [kworker/0:1H]
  209 ?        S<     0:00 [kworker/1:1H]
  213 ?        S      0:00 [jbd2/sda1-8]
  214 ?        S<     0:00 [ext4-rsv-conver]
  215 ?        S<     0:00 [ext4-unrsv-conv]
  235 ?        S<sl   0:00 /sbin/auditd -n
  260 ?        SNs    0:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/et
  262 ?        SNsl   0:00 /usr/libexec/rtkit-daemon
  263 ?        Ss     0:00 /bin/dbus-daemon --system --address=systemd: --nofork
  268 ?        Ss     0:00 avahi-daemon: running [linux.local]
  269 ?        Ssl    0:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --no
  270 ?        Ss     0:00 /usr/lib/systemd/systemd-logind
  279 ?        Ss     0:00 /usr/sbin/gpm -m /dev/input/mice -t exps2
  280 ?        Ss     0:00 /usr/sbin/irqbalance --foreground
  281 ?        Ssl    0:00 /usr/sbin/rsyslogd -n
  282 ?        Ssl    0:00 /usr/sbin/gssproxy -D
  284 ?        S      0:00 avahi-daemon: chroot helper
  500 ?        Ss     0:00 /usr/sbin/sshd -D
  503 ?        Ssl    0:00 /usr/bin/python -Es /usr/sbin/tuned -l -P
  510 ?        Ssl    0:00 /usr/sbin/libvirtd
  512 ?        Ss     0:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.
  519 ?        Ss     0:00 /usr/sbin/crond -n
  546 tty1     Ss+    0:00 /sbin/agetty --noclear tty1 linux
  547 ?        Ss     0:00 login -- mini
  976 ?        Ssl    0:00 /usr/lib/polkit-1/polkitd --no-debug
 1022 ?        S      0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/de
 1023 ?        S      0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/de
 1025 ttyS0    Ss     0:00 -bash
 1057 ttyS0    S      0:00 su -
 1058 ttyS0    S      0:00 -bash
 1093 ?        Ss     0:00 /usr/sbin/anacron -s
15547 ttyS0    R+     0:00 ps -ax

Uma coisa que acho interessante é que /init está listado como PID 1, mas ps -p 1 -o comm= mostra que estou executando o systemd. Também:

[root@localhost tmp]# pstree

systemd-+-agetty
        |-alsactl
        |-anacron
        |-auditd---{auditd}
        |-avahi-daemon---avahi-daemon
        |-crond
        |-dbus-daemon
        |-dnsmasq---dnsmasq
        |-firewalld---{firewalld}
        |-gpm
        |-gssproxy---5*[{gssproxy}]
        |-irqbalance
        |-libvirtd---15*[{libvirtd}]
        |-login---bash---su---bash---pstree
        |-lvmetad
        |-polkitd---5*[{polkitd}]
        |-rsyslogd---2*[{rsyslogd}]
        |-rtkit-daemon---2*[{rtkit-daemon}]
        |-sshd
        |-systemd-journal
        |-systemd-logind
        |-systemd-udevd
        |-tuned---4*[{tuned}]
        `-xinetd

Qualquer idéia sobre o que devo fazer para obter systemd-networkd.service e systemd-networkd.socket para carregar com sucesso seria muito apreciada.

centos7
  • 1 1 respostas
  • 5718 Views

1 respostas

  • Voted
  1. Best Answer
    Chloride Cull
    2016-02-10T00:27:59+08:002016-02-10T00:27:59+08:00

    Ele sai com 226/NAMESPACE, o que geralmente significa que não foi possível inserir um namespace para habilitar a proteção especificada no .servicearquivo.

    Existem pelo menos duas maneiras de resolvê-lo.

    A maneira mais fácil e menos segura.

    Copie /usr/lib/systemd/system/systemd-networkd.servicepara /etc/systemd/system/, abra a cópia com seu editor favorito e remova as linhas que começam com Protect. Isso desativa o sandbox e deve deixá-lo iniciar.

    Mais avançado, mas mais seguro

    Recompile o kernel com CONFIG_NAMESPACES=y.

    • 0

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve