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 / 745048
Accepted
dutsnekcirf
dutsnekcirf
Asked: 2015-12-24 13:17:02 +0800 CST2015-12-24 13:17:02 +0800 CST 2015-12-24 13:17:02 +0800 CST

Não é possível iniciar o serviço de “rede” do CentOS 7

  • 772

Eu tenho uma instalação mínima do CentOS 7.2 em um pequeno mini PC com 6 portas Ethernet. Optei por excluir o NetworkManager da instalação, pois prefiro usar o serviço de rede básico ou mudar para o systemd-networkd. No entanto, não consigo iniciar os serviços de rede ou systemd-networkd.

    systemctl status network.service -l
��● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network)
   Active: failed (Result: exit-code) since Tue 2011-05-10 00:01:22 UTC; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25591 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost network[25591]: RTNETLINK answers: File exists
May 10 00:01:22 localhost systemd[1]: network.service: control process exited, code=exited status=1
May 10 00:01:22 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
May 10 00:01:22 localhost systemd[1]: Unit network.service entered failed state.
May 10 00:01:22 localhost systemd[1]: network.service failed.

journalctl -xe -u network.service
    -- Logs begin at Tue 2011-05-10 00:00:40 UTC, end at Tue 2011-05-10 00:02:35 UTC. --
May 10 00:00:44 localhost systemd[1]: Starting LSB: Bring up/down networking...
-- Subject: Unit network.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.service has begun starting up.
May 10 00:00:44 localhost network[334]: Bringing up loopback interface:  [  OK  ]
May 10 00:00:45 localhost network[334]: Bringing up interface eth0:  ERROR    : [/etc/sysconfig/network-scripts/ifup-eth] Device eth
0 does not seem to be present, delaying initialization.
May 10 00:00:45 localhost network[334]: [FAILED]
May 10 00:00:45 localhost network[334]: Bringing up interface eth1:  ERROR    : [/etc/sysconfig/network-scripts/ifup-eth] Device eth
1 does not seem to be present, delaying initialization.
May 10 00:00:45 localhost /etc/sysconfig/network-scripts/ifup-eth[702]: Device eth1 does not seem to be present, delaying initializa
tion.
May 10 00:00:45 localhost network[334]: [FAILED]
May 10 00:00:45 localhost systemd[1]: network.service: control process exited, code=exited status=1
May 10 00:00:45 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
-- Subject: Unit network.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.service has failed.
-- 
-- The result is failed.
May 10 00:00:45 localhost systemd[1]: Unit network.service entered failed state.
May 10 00:00:45 localhost systemd[1]: network.service failed.
May 10 00:01:20 localhost systemd[1]: Starting LSB: Bring up/down networking...

Aqui está dmesg | grep e1000e

    [root@localhost ~]# dmesg | grep eth
[    9.194339] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:01:05:0f:2a:a0
[    9.202239] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[    9.209127] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 8, PBA No: FFFFFF-0FF
[    9.320640] e1000e 0000:04:00.0 eth1: registered PHC clock
[    9.320643] e1000e 0000:04:00.0 eth1: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:53
[    9.320645] e1000e 0000:04:00.0 eth1: Intel(R) PRO/1000 Network Connection
[    9.320734] e1000e 0000:04:00.0 eth1: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[    9.453298] e1000e 0000:05:00.0 eth2: registered PHC clock
[    9.458777] e1000e 0000:05:00.0 eth2: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:54
[    9.466673] e1000e 0000:05:00.0 eth2: Intel(R) PRO/1000 Network Connection
[    9.473608] e1000e 0000:05:00.0 eth2: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[    9.609123] e1000e 0000:06:00.0 eth3: registered PHC clock
[    9.609126] e1000e 0000:06:00.0 eth3: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:55
[    9.609128] e1000e 0000:06:00.0 eth3: Intel(R) PRO/1000 Network Connection
[    9.609203] e1000e 0000:06:00.0 eth3: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[    9.704211] e1000e 0000:07:00.0 eth4: registered PHC clock
[    9.704214] e1000e 0000:07:00.0 eth4: (PCI Express:2.5GT/s:Width x1) 00:30:59:08:18:56
[    9.704216] e1000e 0000:07:00.0 eth4: Intel(R) PRO/1000 Network Connection
[    9.704291] e1000e 0000:07:00.0 eth4: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[    9.816322] e1000e 0000:08:00.0 eth5: registered PHC clock
[    9.816324] e1000e 0000:08:00.0 eth5: (PCI Express:2.5GT/s:Width x1) 00:01:05:0f:2a:a1
[    9.816326] e1000e 0000:08:00.0 eth5: Intel(R) PRO/1000 Network Connection
[    9.816483] e1000e 0000:08:00.0 eth5: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF
[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    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: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN 
    link/gre 0.0.0.0 brd 0.0.0.0
3: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
4: enp0s25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:01:05:0f:2a:a0 brd ff:ff:ff:ff:ff:ff
5: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:30:59:08:18:53 brd ff:ff:ff:ff:ff:ff
6: enp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:30:59:08:18:54 brd ff:ff:ff:ff:ff:ff
7: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:30:59:08:18:55 brd ff:ff:ff:ff:ff:ff
8: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:30:59:08:18:56 brd ff:ff:ff:ff:ff:ff
9: enp8s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:01:05:0f:2a:a1 brd ff:ff:ff:ff:ff:ff
10: eth_bri: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether ae:75:23:c7:e3:b6 brd ff:ff:ff:ff:ff:ff
    inet 129.193.148.1/24 brd 129.193.148.255 scope global eth_bri
       valid_lft forever preferred_lft forever
    inet6 fe80::ac75:23ff:fec7:e3b6/64 scope link 
       valid_lft forever preferred_lft forever

Journctl -u network.service parece implicar que não há eth0, mas a partir de dmesg mostra que há eth0 a eth5. Contudo; quando eu emito ip addr, você pode ver que todos eles foram renomeados para o novo estilo fornecido por systemd-udevd; enp0s25... etc.

Há outro tópico aqui Não é possível iniciar o serviço de "rede" do CentOS 7, o que implica que o serviço dhcpclient pode estar atrapalhando. A resposta a esse tópico sugere desabilitar o serviço dhcpclient. No meu caso, não tenho um dhcpclient rodando.

[root@localhost ~]# ps -ef | grep dhc
root      2506 23576  0 00:23 ttyS0    00:00:00 grep --color=auto dhc
[root@localhost ~]# 
linux
  • 3 3 respostas
  • 26256 Views

3 respostas

  • Voted
  1. Criggie
    2015-12-24T15:27:10+08:002015-12-24T15:27:10+08:00

    O NetworkManager é uma... coisa ruim. Remova-o e configure suas interfaces em /etc/sysconfig/network-scripts/ifcfg-(NAME OF INTERFACE)

    Sua saída dmesg mostra que o kernel iniciou eth0-ethX como nomes de interface, mas algo os renomeou para nomes "mais amigáveis".

    Os nomes das interfaces atuais serão listados por um ip addr show como root.

    • 3
  2. Best Answer
    ThatGuy
    2015-12-24T14:01:30+08:002015-12-24T14:01:30+08:00

    Você tem que configurar manualmente as interfaces. Este link deve fornecer o que você precisa.

    http://ask.xmodulo.com/configure-static-ip-address-centos7.html

    • 0
  3. Abdullah
    2017-05-12T02:24:11+08:002017-05-12T02:24:11+08:00

    Isto resolverá o problema!

    # rm /etc/udev/rules.d/70-persistent-ipoib.rules 
    
    # reboot
    
    • Agora edite /etc/sysconfig/network-scripts/ifcfg-eth0,
    • Adicionar novo HWADDR gerado ou removê-lo
    • Remover linha UUID

    -Reinicie o serviço de rede

     #systemctl restart network.service
    

    AGORA! Trabalhando.

    • 0

relate perguntas

  • Como descobrir detalhes sobre hardware na máquina Linux?

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