BakusCpunekk | 2018-12-13 19:39:16 UTC | #1
Witajcie.
Korzystając z poradnika
https://forum.lvlup.pro/t/tworzenie-kontenerow-openvz/770
chciałem podzielić dedyka na mniejsze kontenery, jednakże gdy postawiłem takowy z systemem Ubuntu to jest tak jak nie byłoby tam internetu.
Dopiero się uczę jeżeli chodzi o takie sprawy i jestem całkiem w tym zielony. :confused:
Logi (apt-get upgrade):
Err:1 http://archive.canonical.com/ubuntu xenial InRelease
Temporary failure resolving 'archive.canonical.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.canonical.com'
Toranktto | 2018-04-03 19:50:35 UTC | #2
Czy posiadasz poprawnie skonfigurowane serwery DNS w pliku /etc/resolv.conf?
BakusCpunekk | 2018-04-03 19:54:57 UTC | #3
[quote=”Toranktto, post:2, topic:6185”]
/etc/resolv.conf
[/quote]
; generated by /sbin/dhclient-script
search MH-PXE pl
nameserver 8.8.8.8
Wydaje mi się że jest dobrze.
Toranktto | 2018-04-03 19:57:18 UTC | #4
Ustawiłeś to w kontenerze czy fizycznym hoście?
BakusCpunekk | 2018-04-03 19:59:43 UTC | #5
W kontenerze jak i fizycznym hoście.
Toranktto | 2018-04-03 20:01:00 UTC | #6
Komunikacja bez użycia DNS działa prawidłowo?
[code]
ping 8.8.8.8
[/code]
Ustawiałeś jakiś firewall?
BakusCpunekk | 2018-04-03 20:01:53 UTC | #7
root@localhost:/# ping 8.8.8.8
connect: Network is unreachable
Nie ustawiałem żadnego FireWalla.
Toranktto | 2018-04-03 20:10:27 UTC | #8
[quote=”BakusCpunekk, post:7, topic:6185”]
Network is unreachable
[/quote]
Pokaż plik /etc/network/interfaces. Jeżeli go nie masz skonfiguruj go według wzoru:
[code]
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address ADRESIP
netmask MASKASIECIOWA
broadcast ADRESBROADCAST
gateway BRAMADOMYSLNA
[/code]
BakusCpunekk | 2018-04-03 20:14:28 UTC | #9
[quote=”Toranktto, post:8, topic:6185”]
auto eth0
iface eth0 inet static
address ADRESIP
netmask 255.255.255.255
broadcast ADRESBROADCAST
gateway BRAMA_DOMYSLNA
[/quote]
Nadal nie działa. Z tego co widzę nie działa Serwis “networking”:
Active: failed (Result: exit-code) since Tue 2018-04-03 16:12:50 EDT; 6s ago
Docs: man:interfaces(5)
Process: 409 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 404 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environ
Main PID: 409 (code=exited, status=1/FAILURE)
Apr 03 16:12:50 localhost.localdomain systemd[1]: Starting Raise network interfaces...
Apr 03 16:12:50 localhost.localdomain ifup[409]: Cannot find device "eth0"
Apr 03 16:12:50 localhost.localdomain ifup[409]: Failed to bring up eth0.
Apr 03 16:12:50 localhost.localdomain systemd[1]: networking.service: Main process exited, code=exited, stat
Apr 03 16:12:50 localhost.localdomain systemd[1]: Failed to start Raise network interfaces.
Apr 03 16:12:50 localhost.localdomain systemd[1]: networking.service: Unit entered failed state.
Apr 03 16:12:50 localhost.localdomain systemd[1]: networking.service: Failed with result 'exit-code'.
Jakieś pomysły?
Toranktto | 2018-04-03 20:20:38 UTC | #10
[quote=”BakusCpunekk, post:9, topic:6185”]
Cannot find device “eth0”
[/quote]
Hm, jedyne co mi przychodzi do głowy to:
[code]
vzctl set KONTENER –ipadd ADRES_IP –save
[/code]
No i wzór konfiguracji który wyżej podałem może być troche zły, pisałem z pamięci a nie siedzę na codzień na GNU/Linux, zedytowałem go troszkę.
BakusCpunekk | 2018-04-03 21:08:59 UTC | #11
[quote=”Toranktto, post:8, topic:6185”]
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address ADRESIP
netmask MASKASIECIOWA
broadcast ADRESBROADCAST
gateway BRAMADOMYSLNA
[/quote]
W dalszym ciągu nic.
Może podzielić go jakimś innym sposobem? :confused:
bopke | 2018-04-03 22:12:22 UTC | #12
Może to głupie, ale spróbuj zmienić nazwę interfejsu z eth0 na ens18, nie znam się zbytnio na Twoim problemie ale nazwa eth0 kojarzy mi się raczej ze starszymi wydaniami debianopochodnych