[lxc-users] Error: /proc must be mounted
Itamar Gal
itamarggal at gmail.com
Wed Nov 23 17:29:08 UTC 2016
Dear lxc-users,
First I will give an extremely brief description of my problem. I recently
upgrade some packages on my server. Containers which have been created since
the upgrade are having some issues. Specifically, if I run the ps command I get
the following error:
$ ps
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
Now I will give more background and describe some of my attempts to further
investigate and resolve the issue.
I have a server running Ubuntu 12.04.5 LTS (Precise Pangolin). I recently
performed an upgrade of all system packages (i.e. apt-get upgrade) after not
having done so for some time. Here are the contents of my apt sources file:
$ cat /etc/apt/sources.list
# Standard packages
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted
universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main
restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main
restricted universe multiverse
# PPA for virtual box
deb http://download.virtualbox.org/virtualbox/debian precise contrib
In particular, this operation resulted in an upgrade of the kernel and of some
LXC-related packages. Here is some version information related to LXC:
$ uname -a
Linux myhostname 3.2.0-86-generic #124-Ubuntu SMP
Wed Jun 17 21:40:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ apt-show-versions | grep lxc
liblxc1/precise uptodate 2.0.5+master~20161122-0513-0ubuntu1~precise
lxc/precise uptodate 2.0.5+master~20161122-0019-0ubuntu1~precise
lxc-common/precise uptodate 2.0.5+master~20161122-0513-0ubuntu1~precise
lxc-templates/precise uptodate 2.0.5+master~20161122-0513-0ubuntu1~precise
lxc1/precise uptodate 2.0.5+master~20161122-0513-0ubuntu1~precise
lxcfs/precise uptodate 2.0.4-0ubuntu1~ubuntu12.04.1~ppa1
lxctl/precise uptodate 0.3.1+debian-1
python3-lxc/precise uptodate 2.0.5+master~20161122-0513-0ubuntu1~precise
Here is an example of how I might go about reproducing my problem. First I
create a container, start it and log in via the console:
sudo lxc-create -n "temp-test" -t "ubuntu" -- --release "trusty"
sudo lxc-start -n "temp-test"
sudo lxc-console -n "temp-test"
Once inside the container, I try to run the ps command and follow some
instructions:
$ ps
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
$ sudo mount proc /proc -t proc
mount: proc already mounted
$ sudo ps
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
Then I check my fstab (it's empty):
$ cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
Then I try an strace:
$ strace ps aux 2>&1 | tail
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, 0x7ffc59676200) = -1 EINVAL (Invalid argument)
geteuid() = 1000
open("/proc/uptime", O_RDONLY) = -1 ENOTCONN (Transport
endpoint is not connected)
write(2, "Error: /proc must be mounted\n T"..., 176Error: /proc
must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
) = 176
exit_group(102) = ?
I try to google for the error:
Transport endpoint is not connected
Unfortunately I was unable to find a solution that way. I also looked at the
lxcfs upstart log (on the host):
$ sudo cat /var/log/upstart/lxcfs.log
bindings.c: 4484: collect_and_mount_subsystems: Failed to preserve
initial mount namespace.
This lead to more fruitless google searches. I think that covers most of it.
I'm not sure how to proceed. Any help or advice would be greatly appreciated.
Cheers,
Itamar
More information about the lxc-users
mailing list