sudo/ping/network issues in ubuntu jail

Status
Not open for further replies.

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
I installed the ubuntu jail, because I wanted to use a couple of tools I was familiar with. The issue I'm having is that a lot of the networking options (including sudo) that seem to fail. Here is my output:


[root@Odin] ~# jexec 5 /bin/sh
#
# whoami
root
#
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
#
# sudo echo hello!
sudo: unable to resolve host buntu
hello!
#
# ping google.com
ping: icmp open socket: Operation not permitted
#
# cat /etc/hostname
ubuntu-i386
#
# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu-i386

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
#
# sudo apt-get install libjpeg-progs
sudo: unable to resolve host buntu
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libjpeg-turbo-progs libjpeg-turbo8 libjpeg8
The following NEW packages will be installed:
libjpeg-progs libjpeg-turbo-progs libjpeg-turbo8 libjpeg8
0 upgraded, 4 newly installed, 0 to remove and 59 not upgraded.
Need to get 188 kB/190 kB of archives.
After this operation, 567 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ raring/main libjpeg-turbo8 i386 1.2.1-0ubuntu2
404 Not Found [IP: 91.189.91.14 80]
Err http://us.archive.ubuntu.com/ubuntu/ raring/universe libjpeg-turbo-progs i386 1.2.1-0ubuntu2
404 Not Found [IP: 91.189.91.14 80]
Err http://us.archive.ubuntu.com/ubuntu/ raring/universe libjpeg-progs i386 8c-2ubuntu7
404 Not Found [IP: 91.189.91.14 80]
Failed to fetch http://us.archive.ubuntu.com/ubuntu...-turbo/libjpeg-turbo8_1.2.1-0ubuntu2_i386.deb 404 Not Found [IP: 91.189.91.14 80]
Failed to fetch http://us.archive.ubuntu.com/ubuntu...o/libjpeg-turbo-progs_1.2.1-0ubuntu2_i386.deb 404 Not Found [IP: 91.189.91.14 80]
Failed to fetch http://us.archive.ubuntu.com/ubuntu...peg8-empty/libjpeg-progs_8c-2ubuntu7_i386.deb 404 Not Found [IP: 91.189.91.14 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Anybody know what is going on, and how to fix it?
 

Rand

Guru
Joined
Dec 30, 2013
Messages
906
You sure the - in the hostname is working well? Try renaming the host and see whether that fixes the sudo message.
How is your external (general jail) network config ? Includes dns and default gw?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Let's see... I don't know if "-" is working well. I didn't name it that way, it's the jails' default name. Though for what it's worth, I actually called it "buntu":

[root@Odin] ~# jls
JID IP Address Hostname Path
1 - bsd /mnt/ZPoolSSD/jails/bsd
2 192.168.1.205 buntu /mnt/ZPoolSSD/jails/buntu
3 - keeper /mnt/ZPoolSSD/jails/keeper
4 - minidlna_1 /mnt/ZPoolSSD/jails/minidlna_1
5 - transmission_1 /mnt/ZPoolSSD/jails/transmission_1


I'm unsure why "IP" only shows up for one of my jails, but they are all working.

As for the whole network config, I pretty much left everything blank.
 

Rand

Guru
Joined
Dec 30, 2013
Messages
906
If its buntu then thats ok.
And if you dont have a nameserver or default gateway how should the jail os know where to send their network queries to?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
OK, I hadn't thought about that. I'll try setting them then.

That said my "default gateway" is blank in global configuration too, and there is no "nameserver" field for jails configuation. Maybe I should also check "VIMAGE" ?

EDIT: I just did a "s/ubuntu-i386/buntu/" in "/etc/host[s|name]", and sudo now seems to work, but there are still issues:

After this operation, 567 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ raring/main libjpeg-turbo8 i386 1.2.1-0ubuntu2
Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
Err http://us.archive.ubuntu.com/ubuntu/ raring/universe libjpeg-turbo-progs i386 1.2.1-0ubuntu2
Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
Err http://us.archive.ubuntu.com/ubuntu/ raring/universe libjpeg-progs i386 8c-2ubuntu7
Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
Failed to fetch http://us.archive.ubuntu.com/ubuntu...-turbo/libjpeg-turbo8_1.2.1-0ubuntu2_i386.deb Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
Failed to fetch http://us.archive.ubuntu.com/ubuntu...o/libjpeg-turbo-progs_1.2.1-0ubuntu2_i386.deb Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
Failed to fetch http://us.archive.ubuntu.com/ubuntu...peg8-empty/libjpeg-progs_8c-2ubuntu7_i386.deb Something wicked happened resolving 'us.archive.ubuntu.com:http' (-11 - System error)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
And the jails's nameserver seems correctly configured:

# cat /etc/resolv.conf
search Niflheim
nameserver 192.168.1.254


I also tried with Google's 8.8.8.8 and that doesn't seem to work either. Also:
# ping google.com
ping: unknown host google.com


Help?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Hum...

# ping 192.168.1.254
connect: Network is unreachable
# netstat -nr
/proc/net/route: No such file or directory
INET (IPv4) not configured in this system.
 
Status
Not open for further replies.
Top