Placa de rede ubuntu server 18.04 [RESOLVIDO]

13. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 08:39h

"As primeiras quatro placas de rede virtual podem ser configuradas em detalhes na janela do Gerenciador VirtualBox. Placas de rede adicionais podem ser configuradas usando o comando VBoxManage."

"O VirtualBox fornece até oito placas PCI Ethernet virtuais para cada máquina virtual."
"Quatro das placas de rede podem ser configuradas na seção Rede da caixa de diálogo Configurações na interface gráfica do usuário do VirtualBox. Você pode configurar todas as oito placas de rede na linha de comando usando VBoxManage modifyvm."

https://www.virtualbox.org/manual/ch03.html#settings-network

Para trabalhar na linha de comando com o VB, faça o seguinte:
Abra o terminal no sistema host. Procure o arquivo virtualbox:
# find / | grep virtualbox
Deve estar num caminho assim, por exemplo:
/etc/oracle/virtualbox.

Daí você entra ali:
cd /caminho/caminho/virtualbox e executa os comandos vboxmanage e eles serão reconhecidos.


________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



  


14. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 09:07h

Eu acredito que o problema não seja no virtual box e sim no ubuntu, as outras duas vms estão rodando.... eu até fiz uma troca de placa nas configurações do vb e eles subiram normalmente.

seguindo os links enviados pelo Buckminster, não consgui nada substancial, porem há um erro qdo executo netplan try, listei abaixo:

root@srv03:/home/server# vim /etc/netplan/*.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s3:
dhcp4: true
version: 2

root@srv03:/home/server# ip addr
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: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 08:00:27:5c:4d:58 brd ff:ff:ff:ff:ff:ff
root@srv03:/home/server# ifconfig enp0s3 up
root@srv03:/home/server# sudo netplan try
bind: Address already in use <-- estas linhas
netplan: fatal error: cannot bind to port 2983, is another daemon running?, exiting. <--- estas linhas
root@srv03:/home/server#


15. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 09:31h

"Eu acredito que o problema não seja no virtual box e sim no ubuntu, as outras duas vms estão rodando.... eu até fiz uma troca de placa nas configurações do vb e eles subiram normalmente."

O VB cria uma VM para cada sistema guest, então o problema pode ser na VM, coisa que não sabemos ainda, mas pode ser no Ubuntu da VM.

Veja
dhcp4: true

bind: Address already in use
netplan: fatal error: cannot bind to port 2983, is another daemon running?, exiting

Acredito que não está pegando IP, por isso que não sobe ao iniciar.
O problema é com o Netplan.

Execute no terminal do Ubuntu da VM:
# apt-get remove netplan
# apt-get install netplan.io netplan-
# netplan generate; netplan try
E veja se resolve.


________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



16. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 09:48h

só tenho a agradecer a ajuda...

mas infelizmente nem continua...

server@srv03:~$ sudo su
[sudo] password for server:
root@srv03:/home/server# apt-get remove netplan
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python3-attr python3-automat python3-constantly python3-hyperlink
python3-incremental python3-pam python3-pyasn1 python3-pyasn1-modules
python3-service-identity python3-twisted python3-twisted-bin
python3-zope.interface
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
netplan
0 upgraded, 0 newly installed, 1 to remove and 16 not upgraded.
After this operation, 110 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 205737 files and directories currently installed.)
Removing netplan (1.10.1-5build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@srv03:/home/server# apt-get install netplan.io netplan-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'netplan' is not installed, so not removed
The following packages were automatically installed and are no longer required:
python3-attr python3-automat python3-constantly python3-hyperlink
python3-incremental python3-pam python3-pyasn1 python3-pyasn1-modules
python3-service-identity python3-twisted python3-twisted-bin
python3-zope.interface
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libnetplan0 python3-netifaces
The following NEW packages will be installed:
libnetplan0 netplan.io python3-netifaces
0 upgraded, 3 newly installed, 0 to remove and 16 not upgraded.
Need to get 12.8 kB/106 kB of archives.
After this operation, 438 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 python3-netifaces amd64 0.10.4-0.1build4
Temporary failure resolving 'br.archive.ubuntu.com'
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/pool/main/n/netifaces/python3-netifaces_0.10.4-0.1build4_amd64.deb Temporary failure resolving 'br.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@srv03:/home/server# netplan generate; netlan try

Command 'netplan' not found, but can be installed with:

apt install netplan.io
apt install netplan


Command 'netlan' not found, did you mean:

command 'netplan' from deb netplan.io
command 'netplan' from deb netplan

Try: apt install <deb name>

root@srv03:/home/server#



17. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 10:10h

Tente com o apt, mas verifique se está conectado na internet.
Caso necessário, levante o link com ip link set enp0s3 up.
E daí:
# apt update
# apt install netplan.io
# netplan generate; netplan try


________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



18. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 10:19h

isso que esta mi lascando... a placa sobe mas não conecta

server@srv03:~$ sudo su
[sudo] password for server:
root@srv03:/home/server# ip link set enp0s3 up
root@srv03:/home/server# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::a00:27ff:fe5c:4d58 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:5c:4d:58 txqueuelen 1000 (Ethernet)
RX packets 87 bytes 8477 (8.4 KB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 6 bytes 516 (516.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1578 bytes 151802 (151.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1578 bytes 151802 (151.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@srv03:/home/server# apt-get update
Err:1 https://linux.teamviewer.com/deb stable InRelease
Temporary failure resolving 'linux.teamviewer.com'
Err:2 http://br.archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Temporary failure resolving 'ppa.launchpad.net'
Err:4 http://br.archive.ubuntu.com/ubuntu bionic-updates InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:5 http://br.archive.ubuntu.com/ubuntu bionic-backports InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:6 http://br.archive.ubuntu.com/ubuntu bionic-security InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/bionic/InRelease Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch https://linux.teamviewer.com/deb/dists/stable/InRelease Temporary failure resolving 'linux.teamviewer.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@srv03:/home/server#





e ja conferir o yaml

root@srv03:/home/server# cat /etc/netplan/*.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s3:
dhcp4: true
version: 2
root@srv03:/home/server#



19. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 10:50h

Execute isso para vermos se é problema de DNS, não se preocupa que é temporário, ao reiniciar esse DNS sumirá do resolv.conf:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

E entre no arquivo /etc/apt/sources.list e comente a linha com esses repositórios:
http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
https://linux.teamviewer.com/deb stable InRelease

Daí:
$ sudo ip link set enp0s3 up
$ sudo apt clean <<< use o apt, não o apt-get.
$ sudo apt update

e veja se resolve.
Caso não resolver, reinicie esse Ubuntu e veja se a conexão volta.

Caso resolver, execute:
$ sudo apt install netplan.io
$ sudo netplan generate; netplan try


________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



20. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 11:58h

ta dificilllll

executei o primeiro comando e foi de boa
root@srv03:/home/server# echo "nameserver 8.8.8.8"| sudo tee /etc/resolv.conf > /dev/null
root@srv03:/home/server#


agora no source.list não tem os repositorios que vc pediu para comentar

root@srv03:/home/server# cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu bionic main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu bionic-updates main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu bionic universe
# deb-src http://br.archive.ubuntu.com/ubuntu bionic universe
deb http://br.archive.ubuntu.com/ubuntu bionic-updates universe
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://br.archive.ubuntu.com/ubuntu bionic multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu bionic multiverse
deb http://br.archive.ubuntu.com/ubuntu bionic-updates multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://br.archive.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-security main restricted
deb http://br.archive.ubuntu.com/ubuntu bionic-security universe
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-security universe
deb http://br.archive.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu bionic-security multiverse
root@srv03:/home/server# sudo ip link set enp0s3 up
root@srv03:/home/server# sudo apt clean
root@srv03:/home/server# sudo apt update
Err:1 https://linux.teamviewer.com/deb stable InRelease
Temporary failure resolving 'linux.teamviewer.com'
Err:2 http://br.archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:3 http://br.archive.ubuntu.com/ubuntu bionic-updates InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:4 http://br.archive.ubuntu.com/ubuntu bionic-backports InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:5 http://br.archive.ubuntu.com/ubuntu bionic-security InRelease
Temporary failure resolving 'br.archive.ubuntu.com'
Err:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Temporary failure resolving 'ppa.launchpad.net'
Reading package lists... Done
Building dependency tree
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Temporary failure resolving 'br.archive.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/bionic/InRelease Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch https://linux.teamviewer.com/deb/dists/stable/InRelease Temporary failure resolving 'linux.teamviewer.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@srv03:/home/server#



Reiniciei e nada mesma nhaca


21. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 12:12h

Se não tem aqueles repositórios no sources.list, ele está pegando esses repositórios de onde?
Do sistema host?
Verifique no sources.list do sistema host se tem aqueles repositórios.


________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



22. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 12:18h

Num pega do host, mas por desencargo de consiencia eu desabilitei do host e deu a mesma coisa..

nunca fiz e nem sabe se é possivel:

- teria como fazer algum reset de netplan, configuração de interfaces de rede.... tipo forçar a busca de interfaces no boot?

a muito tempo atras me deparei com isso e só foi remover 70-persistent-net.rules e reiniciar ai ele voltou


mas a partir do ubuntu 18.04 não tem mais


23. Re: Placa de rede ubuntu server 18.04

Buckminster
Buckminster

(usa Debian)

Enviado em 24/08/2021 - 12:28h

Bartels escreveu:

Num pega do host, mas por desencargo de consiencia eu desabilitei do host e deu a mesma coisa..

nunca fiz e nem sabe se é possivel:

- teria como fazer algum reset de netplan, configuração de interfaces de rede.... tipo forçar a busca de interfaces no boot?

a muito tempo atras me deparei com isso e só foi remover 70-persistent-net.rules e reiniciar ai ele voltou


mas a partir do ubuntu 18.04 não tem mais


Sim, mas se não pega do host, ele está pegando de onde esses repositórios?
O sources.list é único e um dos problemas acredito que está aí. Quando tenta dar o apt update ele está usando aqueles repositórios que não são dele, isso bagunça o sistema.
Verifique se tem o diretório /etc/apt/sources.list.d, se tiver, veja o que tem dentro.

Dê um cd em /run/systemd/network/
$ cd /run/systemd/network/
$ ls
deve ter algo parecido como 10-netplan-enp0s3.network
$ cat 10-netplan-enp0s3.network
para ver o que tem dentro.

No arquivo /etc/netplan/*.yaml comente as configurações que tem lá e coloque abaixo essas, vamos testar com esse Ubuntu em Bridge em vez de NAT. Depois é só desfazer a configuração se não der certo.
Coloque o que está abaixo dentro do arquivo:

network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
bridges:
br0:
dhcp4: yes
interfaces:
- enp0s3


Note que as linhas do arquivo são identadas – é importante prestar atenção a isso, ou a configuração não terá efeito. E a identação deve ser feita com espaços, e não tecla tab.
Aqui no forum não aceita espaços nem tab. Veja no link a identação na seção Configuring network bridges:
https://netplan.io/examples/
http://www.bosontreinamentos.com.br/linux/como-configurar-endereco-ip-estatico-no-linux-ubuntu-18-04...

Salve e saia do arquivo e execute:
$ netplan apply
e veja se retorna mensagem de erro.



________________________________________________
Sanou tua dúvida, resolveu teu problema?
Então marque como Resolvido e escolha a Melhor Resposta.

Ou então execute:
# chown -R root:root /
# mount -o remount,rw /
# reboot

e veja o sistema derreter na sua frente.



24. Re: Placa de rede ubuntu server 18.04 [RESOLVIDO]

André Bartels
Bartels

(usa Ubuntu)

Enviado em 24/08/2021 - 13:51h

Segui os procedimento,


root@srv03:/home/server# ls -l /etc/apt/sources.list.d
total 12
-rw-r--r-- 1 root root 124 Aug 11 14:48 ondrej-ubuntu-php-bionic.list
-rw-r--r-- 1 root root 1201 Aug 11 14:48 teamviewer.list
-rw-r--r-- 1 root root 1201 Aug 11 14:48 teamviewer.list.save

root@srv03:/home/server# ls -l /run/systemd/network/
ls: cannot access '/run/systemd/network/': No such file or directory
root@srv03:/home/server# ls -l /run/systemd/network
ls: cannot access '/run/systemd/network': No such file or directory

root@srv03:/home/server# cat /etc/netplan/*.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
#network:
# ethernets:
# enp0s3:
# dhcp4: true
# version: 2
network:
version: 2
rederer: networkd
ethernets:
enp0s3:
dhcp4: no
bridges:
br0:
dhcp4: yes
interface:
-enp0s3

Command 'netplan' not found, but can be installed with:

apt install netplan.io
apt install netplan








Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts