Discussion:
cgmanager: cgm_list_children for controller=systemd, cgroup_path=user failed: invalid request
(too old to reply)
Smart Goldman
2015-01-14 14:28:35 UTC
Permalink
Hello.

I know about neither PAM nor cgmanager very well.
But since my ubuntu server outputs a cgmanager-related error and I can not
solve it myself, please allow me to ask a question.
I apologize to you all if question about cgmanager is not allowed here.

Ubuntu 14.04.1 LTS 64bit minimal is running as an OS on contracted VPS
service by OpenVZ.
The following error message is output to /var/log/auth.log by rebooting
server.

/var/log/auth.log
Jan 12 02:27:05 myhost systemd-logind[297]: cgmanager: cgm_list_children
for controller=systemd, cgroup_path=user failed: invalid request
Jan 12 02:27:05 myhost systemd-logind[297]: New seat seat0.
Jan 12 02:27:06 myhost sshd[493]: Server listening on 0.0.0.0 port 22.
Jan 12 02:27:06 myhost sshd[493]: Server listening on :: port 22.

It looks like it is output soon after installing cgroup-bin and
cgmanager-utils.
What is the cause of the problem?
Or is this ignorable error message?

Thank you in advance.
Serge Hallyn
2015-01-14 15:11:00 UTC
Permalink
Post by Smart Goldman
Hello.
I know about neither PAM nor cgmanager very well.
But since my ubuntu server outputs a cgmanager-related error and I can not
solve it myself, please allow me to ask a question.
I apologize to you all if question about cgmanager is not allowed here.
cgmanager is an lxc project, so no worries.
Post by Smart Goldman
Ubuntu 14.04.1 LTS 64bit minimal is running as an OS on contracted VPS
service by OpenVZ.
The following error message is output to /var/log/auth.log by rebooting
server.
/var/log/auth.log
Jan 12 02:27:05 myhost systemd-logind[297]: cgmanager: cgm_list_children
for controller=systemd, cgroup_path=user failed: invalid request
Jan 12 02:27:05 myhost systemd-logind[297]: New seat seat0.
Jan 12 02:27:06 myhost sshd[493]: Server listening on 0.0.0.0 port 22.
Jan 12 02:27:06 myhost sshd[493]: Server listening on :: port 22.
It looks like it is output soon after installing cgroup-bin and
cgmanager-utils.
What is the cause of the problem?
Or is this ignorable error message?
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea. Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged containers.

But it looks like that error message happened after you did that,
upon login?

The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
Smart Goldman
2015-01-14 16:23:54 UTC
Permalink
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.

Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2 things.
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No such
file or directory
systemd-logind[2957]: Failed to create cgroup name=systemd:/user/0.user: No
such file or directory
After executing 'apt-get -y install cgroup-bin cgmanager-utils', above 2
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged containers.
Now I tried 'sudo restart systemd-logind' and systemd-logind restarted.
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.

This error message is written even if I log out before reboot is executed
or I execute reboot via control panel which is outside of ubuntu system.
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.

***@myhost:~# cat /proc/self/cgroup
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
***@myhost:~#

I appreciate your help and I apologize for troubling you.
Serge Hallyn
2015-01-14 20:12:36 UTC
Permalink
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2 things.
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No such
file or directory
systemd-logind[2957]: Failed to create cgroup name=systemd:/user/0.user: No
such file or directory
0.user? This is logging in as root?
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils', above 2
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged containers.
Now I tried 'sudo restart systemd-logind' and systemd-logind restarted.
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.
Create the file /etc/default/cgmanager containing the text:

cgmanager_opts="--debug"

Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Post by Smart Goldman
This error message is written even if I log out before reboot is executed
or I execute reboot via control panel which is outside of ubuntu system.
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.

You may be able to work around this by adding the line:

env cgm_extra_mounts="-m name=systemd,name=container,name=fairsched,name=beancounter"

to /etc/default/cgmanager

-serge
Smart Goldman
2015-01-15 13:13:10 UTC
Permalink
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2 things.
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No such
file or directory
systemd-logind[2957]: Failed to create cgroup
name=systemd:/user/0.user: No
Post by Serge Hallyn
Post by Smart Goldman
such file or directory
0.user? This is logging in as root?
Yes. This log was recorded by logging in with root.
If I am right, it was output as 1000.user when I logged in with normal user.
Post by Serge Hallyn
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils', above 2
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged containers.
Now I tried 'sudo restart systemd-logind' and systemd-logind restarted.
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.
cgmanager_opts="--debug"
Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Here's /var/log/upstart/cgmanager.log after restarting and logging in the
ubuntu with root. I found there is something like error
"cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup".

***@myhost:~# tail -f /var/log/upstart/cgmanager.log
UPSTART_JOB=cgmanager
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
cgmanager_opts=--debug
PWD=/
cgm_extra_mounts=-m
name=systemd,name=container,name=fairsched,name=beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
found 1 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Connection from private client
GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
Disconnected from private client
Connection from private client
Create: Client fd is: 6 (pid=442, uid=0, gid=0)
Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for 442
(0:0)
cgmanager_create: returning 0; existed is -1
Connection from private client
Disconnected from private client
MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
963 moved to systemd:user/0.user/c2.session by 442's request
Connection from private client
Disconnected from private client
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Connection from private client
Disconnected from private client
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Disconnected from private client
Post by Serge Hallyn
Post by Smart Goldman
This error message is written even if I log out before reboot is executed
or I execute reboot via control panel which is outside of ubuntu system.
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
to /etc/default/cgmanager
I added that line to /etc/default/cgmanager.
But the log "failed: invalid request" is still written.

Here's my current /etc/default/cgmanager:
***@myhost:~# cat /etc/default/cgmanager
cgmanager_opts="--debug"
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
***@myhost:~#

Regards,
Serge Hallyn
2015-01-15 13:33:03 UTC
Permalink
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2 things.
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No such
file or directory
systemd-logind[2957]: Failed to create cgroup
name=systemd:/user/0.user: No
Post by Serge Hallyn
Post by Smart Goldman
such file or directory
0.user? This is logging in as root?
Yes. This log was recorded by logging in with root.
If I am right, it was output as 1000.user when I logged in with normal user.
Post by Serge Hallyn
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils', above 2
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged
containers.
Post by Serge Hallyn
Post by Smart Goldman
Now I tried 'sudo restart systemd-logind' and systemd-logind restarted.
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.
cgmanager_opts="--debug"
Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Here's /var/log/upstart/cgmanager.log after restarting and logging in the
ubuntu with root. I found there is something like error
"cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup".
UPSTART_JOB=cgmanager
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
cgmanager_opts=--debug
PWD=/
cgm_extra_mounts=-m
name=systemd,name=container,name=fairsched,name=beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
found 1 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Connection from private client
GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
Disconnected from private client
Connection from private client
Create: Client fd is: 6 (pid=442, uid=0, gid=0)
Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for 442
(0:0)
cgmanager_create: returning 0; existed is -1
Connection from private client
Disconnected from private client
MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
963 moved to systemd:user/0.user/c2.session by 442's request
Connection from private client
Disconnected from private client
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Connection from private client
Disconnected from private client
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Disconnected from private client
Post by Serge Hallyn
Post by Smart Goldman
This error message is written even if I log out before reboot is
executed
Post by Serge Hallyn
Post by Smart Goldman
or I execute reboot via control panel which is outside of ubuntu system.
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
to /etc/default/cgmanager
I added that line to /etc/default/cgmanager.
But the log "failed: invalid request" is still written.
cgmanager_opts="--debug"
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Sorry, I did a bad cut-paste. Drop the "env" in front of cgm_extra_mounts.
Make sure that

cgm_extra_mounts="-m name=systemd,name=container,name=fairsched,name=beancounter"

is all one line.
Smart Goldman
2015-01-15 14:06:07 UTC
Permalink
Post by Serge Hallyn
Sorry, I did a bad cut-paste. Drop the "env" in front of
cgm_extra_mounts.
Post by Serge Hallyn
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
is all one line.
Thank you. The log "failed: invalid request" by reboot has been removed!
But instead, now these 2 errors are written in /var/log/auth.log by login.

Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory

Hmm... Why these errors come again?

Here are logs of reboot and login:
Jan 15 13:36:08 myhost sshd[1097]: Accepted password for root from
119.105.136.26 port 54477 ssh2
Jan 15 13:36:08 myhost sshd[1097]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:36:08 myhost systemd-logind[442]: Removed session c3.
Jan 15 13:36:08 myhost systemd-logind[442]: New session c4 of user root.
Jan 15 13:37:59 myhost systemd-logind[440]: New seat seat0.
Jan 15 13:38:00 myhost sshd[495]: Server listening on 0.0.0.0 port 22.
Jan 15 13:38:00 myhost sshd[495]: Server listening on :: port 22.
Jan 15 13:38:57 myhost sshd[894]: Accepted password for root from
119.105.136.26 port 54519 ssh2
Jan 15 13:38:57 myhost sshd[894]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2
things.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No
such
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
file or directory
systemd-logind[2957]: Failed to create cgroup
name=systemd:/user/0.user: No
Post by Serge Hallyn
Post by Smart Goldman
such file or directory
0.user? This is logging in as root?
Yes. This log was recorded by logging in with root.
If I am right, it was output as 1000.user when I logged in with normal
user.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils',
above 2
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged
containers.
Post by Serge Hallyn
Post by Smart Goldman
Now I tried 'sudo restart systemd-logind' and systemd-logind
restarted.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.
cgmanager_opts="--debug"
Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Here's /var/log/upstart/cgmanager.log after restarting and logging in the
ubuntu with root. I found there is something like error
"cgmanager:get_pid_cgroup_main: Could not determine the requestor
cgroup".
Post by Smart Goldman
UPSTART_JOB=cgmanager
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
cgmanager_opts=--debug
PWD=/
cgm_extra_mounts=-m
name=systemd,name=container,name=fairsched,name=beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
found 1 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Connection from private client
GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
Disconnected from private client
Connection from private client
Create: Client fd is: 6 (pid=442, uid=0, gid=0)
Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for
442
Post by Smart Goldman
(0:0)
cgmanager_create: returning 0; existed is -1
Connection from private client
Disconnected from private client
MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
963 moved to systemd:user/0.user/c2.session by 442's request
Connection from private client
Disconnected from private client
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Connection from private client
Disconnected from private client
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Disconnected from private client
Post by Serge Hallyn
Post by Smart Goldman
This error message is written even if I log out before reboot is
executed
Post by Serge Hallyn
Post by Smart Goldman
or I execute reboot via control panel which is outside of ubuntu
system.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
to /etc/default/cgmanager
I added that line to /etc/default/cgmanager.
But the log "failed: invalid request" is still written.
cgmanager_opts="--debug"
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Sorry, I did a bad cut-paste. Drop the "env" in front of cgm_extra_mounts.
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
is all one line.
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Serge Hallyn
2015-01-15 14:22:53 UTC
Permalink
What do /proc/self/cgroup and /var/log/upstart/cgmanager.log now show?
Post by Serge Hallyn
Post by Serge Hallyn
Sorry, I did a bad cut-paste. Drop the "env" in front of
cgm_extra_mounts.
Post by Serge Hallyn
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
is all one line.
Thank you. The log "failed: invalid request" by reboot has been removed!
But instead, now these 2 errors are written in /var/log/auth.log by login.
Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Hmm... Why these errors come again?
Jan 15 13:36:08 myhost sshd[1097]: Accepted password for root from
119.105.136.26 port 54477 ssh2
Jan 15 13:36:08 myhost sshd[1097]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:36:08 myhost systemd-logind[442]: Removed session c3.
Jan 15 13:36:08 myhost systemd-logind[442]: New session c4 of user root.
Jan 15 13:37:59 myhost systemd-logind[440]: New seat seat0.
Jan 15 13:38:00 myhost sshd[495]: Server listening on 0.0.0.0 port 22.
Jan 15 13:38:00 myhost sshd[495]: Server listening on :: port 22.
Jan 15 13:38:57 myhost sshd[894]: Accepted password for root from
119.105.136.26 port 54519 ssh2
Jan 15 13:38:57 myhost sshd[894]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2
things.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No
such
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
file or directory
systemd-logind[2957]: Failed to create cgroup
name=systemd:/user/0.user: No
Post by Serge Hallyn
Post by Smart Goldman
such file or directory
0.user? This is logging in as root?
Yes. This log was recorded by logging in with root.
If I am right, it was output as 1000.user when I logged in with normal
user.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils',
above 2
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged
containers.
Post by Serge Hallyn
Post by Smart Goldman
Now I tried 'sudo restart systemd-logind' and systemd-logind
restarted.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on /var/log/auth.log.
cgmanager_opts="--debug"
Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Here's /var/log/upstart/cgmanager.log after restarting and logging in the
ubuntu with root. I found there is something like error
"cgmanager:get_pid_cgroup_main: Could not determine the requestor
cgroup".
Post by Smart Goldman
UPSTART_JOB=cgmanager
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
cgmanager_opts=--debug
PWD=/
cgm_extra_mounts=-m
name=systemd,name=container,name=fairsched,name=beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
found 1 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Connection from private client
GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
Disconnected from private client
Connection from private client
Create: Client fd is: 6 (pid=442, uid=0, gid=0)
Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for
442
Post by Smart Goldman
(0:0)
cgmanager_create: returning 0; existed is -1
Connection from private client
Disconnected from private client
MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
963 moved to systemd:user/0.user/c2.session by 442's request
Connection from private client
Disconnected from private client
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Connection from private client
Disconnected from private client
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Disconnected from private client
Post by Serge Hallyn
Post by Smart Goldman
This error message is written even if I log out before reboot is
executed
Post by Serge Hallyn
Post by Smart Goldman
or I execute reboot via control panel which is outside of ubuntu
system.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does /proc/self/cgroup
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
to /etc/default/cgmanager
I added that line to /etc/default/cgmanager.
But the log "failed: invalid request" is still written.
cgmanager_opts="--debug"
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Sorry, I did a bad cut-paste. Drop the "env" in front of cgm_extra_mounts.
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
is all one line.
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Smart Goldman
2015-01-15 14:51:58 UTC
Permalink
Post by Serge Hallyn
What do /proc/self/cgroup and /var/log/upstart/cgmanager.log now show?
/proc/self/cgroup shows this:
***@myhost:~# cat /proc/self/cgroup
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
***@myhost:~#

And /var/log/upstart/cgmanager.log is this:
***@myhost:~# tail -n 50 /var/log/upstart/cgmanager.log
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
***@myhost:~#

Sorry for bothering you..
Post by Serge Hallyn
Post by Serge Hallyn
Post by Serge Hallyn
Sorry, I did a bad cut-paste. Drop the "env" in front of
cgm_extra_mounts.
Post by Serge Hallyn
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
is all one line.
Thank you. The log "failed: invalid request" by reboot has been removed!
But instead, now these 2 errors are written in /var/log/auth.log by login.
Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Hmm... Why these errors come again?
Jan 15 13:36:08 myhost sshd[1097]: Accepted password for root from
119.105.136.26 port 54477 ssh2
Jan 15 13:36:08 myhost sshd[1097]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:36:08 myhost systemd-logind[442]: Removed session c3.
Jan 15 13:36:08 myhost systemd-logind[442]: New session c4 of user root.
Jan 15 13:37:59 myhost systemd-logind[440]: New seat seat0.
Jan 15 13:38:00 myhost sshd[495]: Server listening on 0.0.0.0 port 22.
Jan 15 13:38:00 myhost sshd[495]: Server listening on :: port 22.
Jan 15 13:38:57 myhost sshd[894]: Accepted password for root from
119.105.136.26 port 54519 ssh2
Jan 15 13:38:57 myhost sshd[894]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Jan 15 13:38:57 myhost systemd-logind[440]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 15 13:38:57 myhost sshd[894]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager is an lxc project, so no worries.
Okay. and thank you for swift response.
Post by Serge Hallyn
A few things - first, running cgroup-bin alongside cgmanager is
probably a bad idea.
Oh really? It is better to remove either one?
Another following 2 errors were output before installing these 2
things.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
sshd[4603]: pam_systemd(sshd:session): Failed to create session: No
such
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
file or directory
systemd-logind[2957]: Failed to create cgroup
name=systemd:/user/0.user: No
Post by Serge Hallyn
Post by Smart Goldman
such file or directory
0.user? This is logging in as root?
Yes. This log was recorded by logging in with root.
If I am right, it was output as 1000.user when I logged in with normal
user.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After executing 'apt-get -y install cgroup-bin cgmanager-utils',
above 2
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
errors were removed.
Post by Serge Hallyn
Second, on 14.04 after install cgmanager
you unfortunately need to 'sudo restart systemd-logind', then
log out and log back in (or just ssh localhost) to get a new
cgroup. After that you should be able to create unprivileged
containers.
Post by Serge Hallyn
Post by Smart Goldman
Now I tried 'sudo restart systemd-logind' and systemd-logind
restarted.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
After that I logged out, log back and execute 'reboot'.
However error log of cgmanager is still written on
/var/log/auth.log.
Post by Serge Hallyn
Post by Serge Hallyn
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
cgmanager_opts="--debug"
Restart cgmanager (sudo stop cgmanager; sudo start cgmanager) and then
login, and look at /var/log/upstart/cgmanager.log
Here's /var/log/upstart/cgmanager.log after restarting and logging in the
ubuntu with root. I found there is something like error
"cgmanager:get_pid_cgroup_main: Could not determine the requestor
cgroup".
Post by Smart Goldman
UPSTART_JOB=cgmanager
TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
cgmanager_opts=--debug
PWD=/
cgm_extra_mounts=-m
name=systemd,name=container,name=fairsched,name=beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
found 1 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Connection from private client
GetPidCgroup: Client fd is: 6 (pid=442, uid=0, gid=0)
cgmanager:get_pid_cgroup_main: Could not determine the requestor cgroup
Disconnected from private client
Connection from private client
Create: Client fd is: 6 (pid=442, uid=0, gid=0)
Created /run/cgmanager/fs/none,name=systemd/user/0.user/c2.session for
442
Post by Smart Goldman
(0:0)
cgmanager_create: returning 0; existed is -1
Connection from private client
Disconnected from private client
MovePid: Client fd is: 7 (pid=442, uid=0, gid=0)
963 moved to systemd:user/0.user/c2.session by 442's request
Connection from private client
Disconnected from private client
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Chown: Client fd is: 6 (pid=442, uid=0, gid=0)
Connection from private client
Disconnected from private client
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Chown: Client fd is: 7 (pid=442, uid=0, gid=0)
Disconnected from private client
Post by Serge Hallyn
Post by Smart Goldman
This error message is written even if I log out before reboot is
executed
Post by Serge Hallyn
Post by Smart Goldman
or I execute reboot via control panel which is outside of ubuntu
system.
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
The message may be ignorable - the real question is, when you
login, do you get a custom cgroup? What does
/proc/self/cgroup
Post by Serge Hallyn
Post by Serge Hallyn
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
show?
I am sorry. How can I know whether I got a custom cgroup?
Here is the contents of my /proc/self/cgroup.
4:name=systemd:/user/1000.user/c1.session
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
I appreciate your help and I apologize for troubling you.
The /12042 is weird. It looks like something libcgroup may have
done for you.
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Post by Serge Hallyn
to /etc/default/cgmanager
I added that line to /etc/default/cgmanager.
But the log "failed: invalid request" is still written.
cgmanager_opts="--debug"
env cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
Sorry, I did a bad cut-paste. Drop the "env" in front of
cgm_extra_mounts.
Post by Serge Hallyn
Post by Serge Hallyn
Post by Serge Hallyn
Make sure that
cgm_extra_mounts="-m
name=systemd,name=container,name=fairsched,name=beancounter"
is all one line.
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Serge Hallyn
2015-01-16 20:31:16 UTC
Permalink
Post by Smart Goldman
Post by Serge Hallyn
What do /proc/self/cgroup and /var/log/upstart/cgmanager.log now show?
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?

I do think removing cgroup-bin

sudo apt-get purge cgroup-bin

will fix the mounting of the name=beancounter etc hierarchies.
Smart Goldman
2015-01-17 01:26:39 UTC
Permalink
Post by Serge Hallyn
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?
Yes, mine is ubuntu system provided by a VPS service of
https://crissic.net/los-angeles_vps_pre-launch
I think it's a possibility. I may need to ask the provider about it..
Although I do not think this information will be helpful, this is my kernel
version.
***@okapi:~# uname -a
Linux okapi 2.6.32-042stab093.5 #1 SMP Wed Sep 10 17:39:49 MSK 2014 x86_64
x86_64 x86_64 GNU/Linux
I think I've never changed the kernel by myself.
Post by Serge Hallyn
I do think removing cgroup-bin
sudo apt-get purge cgroup-bin
will fix the mounting of the name=beancounter etc hierarchies.
I had removed cgroup-bin.
But unfortunately it looks like it was not fixed.

Each file after removing cgroup-bin, reboot and re-login is now as follows:

***@okapi:~# cat /proc/self/cgroup
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042

***@okapi:~# tail -n 13 /var/log/upstart/cgmanager.log
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts

***@okapi:~# tail -n 10 /var/log/auth.log
Jan 17 00:31:48 okapi sudo: root : TTY=pts/0 ; PWD=/root ; USER=root ;
COMMAND=/usr/bin/apt-get -y purge cgroup-bin
Jan 17 00:31:48 okapi sudo: pam_unix(sudo:session): session opened for user
root by root(uid=0)
Jan 17 00:31:55 okapi sudo: pam_unix(sudo:session): session closed for user
root
Jan 17 00:32:53 okapi systemd-logind[326]: New seat seat0.
Jan 17 00:32:54 okapi sshd[492]: Server listening on 0.0.0.0 port 22.
Jan 17 00:32:54 okapi sshd[492]: Server listening on :: port 22.
Jan 17 00:34:09 okapi sshd[897]: Accepted password for root from
119.105.136.26 port 56815 ssh2
Jan 17 00:34:09 okapi sshd[897]: pam_unix(sshd:session): session opened for
user root by (uid=0)
Jan 17 00:34:09 okapi systemd-logind[326]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 17 00:34:09 okapi sshd[897]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Smart Goldman
2015-01-17 17:47:59 UTC
Permalink
I forgot to say.
Some cgroup-related packages have been still installed.

***@okapi:~# dpkg -l|grep cgroup
ii cgmanager 0.24-0ubuntu7
amd64 Central cgroup manager daemon
ii cgmanager-utils 0.24-0ubuntu7
amd64 Central cgroup manager daemon (utilities)
ii cgroup-lite 1.9 all
Light-weight package to set up cgroups at system boot
ii libcgmanager0:amd64 0.24-0ubuntu7
amd64 Central cgroup manager daemon (client library)
ii libcgroup1 0.38-1ubuntu2
amd64 Library to control and monitor control groups

I have to remove them? I think these excepting cgmanager-utils have been
preinstalled.

Sorry for taking your precious time.
Post by Smart Goldman
Post by Serge Hallyn
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?
Yes, mine is ubuntu system provided by a VPS service of
https://crissic.net/los-angeles_vps_pre-launch
Post by Smart Goldman
I think it's a possibility. I may need to ask the provider about it..
Although I do not think this information will be helpful, this is my
kernel version.
Post by Smart Goldman
Linux okapi 2.6.32-042stab093.5 #1 SMP Wed Sep 10 17:39:49 MSK 2014
x86_64 x86_64 x86_64 GNU/Linux
Post by Smart Goldman
I think I've never changed the kernel by myself.
Post by Serge Hallyn
I do think removing cgroup-bin
sudo apt-get purge cgroup-bin
will fix the mounting of the name=beancounter etc hierarchies.
I had removed cgroup-bin.
But unfortunately it looks like it was not fixed.
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Operation not permitted
Post by Smart Goldman
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Jan 17 00:31:48 okapi sudo: root : TTY=pts/0 ; PWD=/root ; USER=root
; COMMAND=/usr/bin/apt-get -y purge cgroup-bin
Post by Smart Goldman
Jan 17 00:31:48 okapi sudo: pam_unix(sudo:session): session opened for
user root by root(uid=0)
Post by Smart Goldman
Jan 17 00:31:55 okapi sudo: pam_unix(sudo:session): session closed for
user root
Post by Smart Goldman
Jan 17 00:32:53 okapi systemd-logind[326]: New seat seat0.
Jan 17 00:32:54 okapi sshd[492]: Server listening on 0.0.0.0 port 22.
Jan 17 00:32:54 okapi sshd[492]: Server listening on :: port 22.
Jan 17 00:34:09 okapi sshd[897]: Accepted password for root from
119.105.136.26 port 56815 ssh2
Post by Smart Goldman
Jan 17 00:34:09 okapi sshd[897]: pam_unix(sshd:session): session opened
for user root by (uid=0)
Post by Smart Goldman
Jan 17 00:34:09 okapi systemd-logind[326]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Post by Smart Goldman
Jan 17 00:34:09 okapi sshd[897]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
Serge Hallyn
2015-01-21 18:19:09 UTC
Permalink
Post by Smart Goldman
Post by Serge Hallyn
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?
Yes, mine is ubuntu system provided by a VPS service of
https://crissic.net/los-angeles_vps_pre-launch
I think it's a possibility. I may need to ask the provider about it..
Although I do not think this information will be helpful, this is my kernel
version.
Linux okapi 2.6.32-042stab093.5 #1 SMP Wed Sep 10 17:39:49 MSK 2014 x86_64
x86_64 x86_64 GNU/Linux
I think I've never changed the kernel by myself.
Post by Serge Hallyn
I do think removing cgroup-bin
sudo apt-get purge cgroup-bin
will fix the mounting of the name=beancounter etc hierarchies.
I had removed cgroup-bin.
But unfortunately it looks like it was not fixed.
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
Yeah that's weird.

Look around /var/log and see what is mounting those cgroups
at boot. What files still exist under /etc/init and /etc/init.d?
Post by Smart Goldman
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Jan 17 00:31:48 okapi sudo: root : TTY=pts/0 ; PWD=/root ; USER=root ;
COMMAND=/usr/bin/apt-get -y purge cgroup-bin
Jan 17 00:31:48 okapi sudo: pam_unix(sudo:session): session opened for user
root by root(uid=0)
Jan 17 00:31:55 okapi sudo: pam_unix(sudo:session): session closed for user
root
Jan 17 00:32:53 okapi systemd-logind[326]: New seat seat0.
Jan 17 00:32:54 okapi sshd[492]: Server listening on 0.0.0.0 port 22.
Jan 17 00:32:54 okapi sshd[492]: Server listening on :: port 22.
Jan 17 00:34:09 okapi sshd[897]: Accepted password for root from
119.105.136.26 port 56815 ssh2
Jan 17 00:34:09 okapi sshd[897]: pam_unix(sshd:session): session opened for
user root by (uid=0)
Jan 17 00:34:09 okapi systemd-logind[326]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 17 00:34:09 okapi sshd[897]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Smart Goldman
2015-01-23 14:37:38 UTC
Permalink
Post by Serge Hallyn
Yeah that's weird.
Look around /var/log and see what is mounting those cgroups
I tried to search the log about mounting cgroups. But I did not know which
is the log.
The following are log of the mount and state of the mount I think.

***@okapi:~# tail -n 5 /var/log/upstart/mounted-proc.log
chmod: cannot access '/proc/slabinfo': No such file or directory
chmod: cannot access '/proc/slabinfo': No such file or directory
chmod: cannot access '/proc/slabinfo': No such file or directory
chmod: cannot access '/proc/slabinfo': No such file or directory
chmod: cannot access '/proc/slabinfo': No such file or directory
***@okapi:~# tail -n 5 /var/log/upstart/mountall.log
mountall: Event failed
mountall: Event failed
mountall: Event failed
mountall: Event failed
mountall: Event failed
***@okapi:~# mount
/dev/ploop10682p1 on / type ext4
(rw,relatime,barrier=1,data=ordered,balloon_ino=12)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type devtmpfs (rw,nosuid,noexec,relatime,mode=755)
none on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
none on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=52432k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,relatime)
none on /run/user type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
Post by Serge Hallyn
at boot. What files still exist under /etc/init and /etc/init.d?
Files under /etc/init and /etc/init.d are the following.

***@okapi:~# ls -al /etc/init
total 312
drwxr-xr-x 2 root root 4096 Jan 16 13:44 .
drwxr-xr-x 89 root root 4096 Jan 23 13:45 ..
-rw-r--r-- 1 root root 328 Feb 22 2014 bootmisc.sh.conf
-rw-r--r-- 1 root root 1169 Apr 14 2014 cgmanager.conf
-rw-r--r-- 1 root root 1169 Apr 14 2014 cgmanager.conf~
-rw-r--r-- 1 root root 855 Apr 14 2014 cgproxy.conf
-rw-r--r-- 1 root root 379 Mar 13 2013 cgroup-lite.conf
-rw-r--r-- 1 root root 232 Feb 22 2014 checkfs.sh.conf
-rw-r--r-- 1 root root 253 Feb 22 2014 checkroot-bootclean.sh.conf
-rw-r--r-- 1 root root 307 Feb 22 2014 checkroot.sh.conf
-rw-r--r-- 1 root root 100 Jan 23 13:45 console.conf
-rw-r--r-- 1 root root 1122 Jul 18 2014 container-detect.conf
-rw-r--r-- 1 root root 356 Jul 18 2014 control-alt-delete.conf
-rw-r--r-- 1 root root 297 Feb 9 2013 cron.conf
-rw-r--r-- 1 root root 489 Nov 11 2013 dbus.conf
-rw-r--r-- 1 root root 273 Nov 19 2010 dmesg.conf
-rw-r--r-- 1 root root 1105 Mar 7 2014 dovecot.conf
-rw-r--r-- 1 root root 1377 Jul 18 2014 failsafe.conf
-rw-r--r-- 1 root root 267 Jul 18 2014 flush-early-job-log.conf
-rw-r--r-- 1 root root 284 Jul 23 2013 hostname.conf
-rw-r--r-- 1 root root 557 Sep 25 18:51 hwclock.conf
-rw-r--r-- 1 root root 444 Sep 25 18:51 hwclock-save.conf
-rw-r--r-- 1 root root 689 Apr 10 2014 kmod.conf
-rw-r--r-- 1 root root 268 Feb 22 2014 mountall-bootclean.sh.conf
-rw-r--r-- 1 root root 1232 Feb 22 2014 mountall.conf
-rw-r--r-- 1 root root 349 Feb 22 2014 mountall-net.conf
-rw-r--r-- 1 root root 261 Feb 22 2014 mountall-reboot.conf
-rw-r--r-- 1 root root 311 Feb 22 2014 mountall.sh.conf
-rw-r--r-- 1 root root 1201 Feb 22 2014 mountall-shell.conf
-rw-r--r-- 1 root root 327 Feb 22 2014 mountdevsubfs.sh.conf
-rw-r--r-- 1 root root 405 Feb 22 2014 mounted-debugfs.conf
-rw-r--r-- 1 root root 730 Feb 22 2014 mounted-dev.conf
-rw-r--r-- 1 root root 480 Feb 22 2014 mounted-proc.conf
-rw-r--r-- 1 root root 618 Feb 22 2014 mounted-run.conf
-rw-r--r-- 1 root root 1890 Feb 22 2014 mounted-tmp.conf
-rw-r--r-- 1 root root 903 Feb 22 2014 mounted-var.conf
-rw-r--r-- 1 root root 323 Feb 22 2014 mountkernfs.sh.conf
-rw-r--r-- 1 root root 249 Feb 22 2014 mountnfs-bootclean.sh.conf
-rw-r--r-- 1 root root 313 Feb 22 2014 mountnfs.sh.conf
-rw-r--r-- 1 root root 238 Feb 22 2014 mtab.sh.conf
-rw-r--r-- 1 root root 1770 Feb 19 2014 mysql.conf
-rw-r--r-- 1 root root 2359 Jan 1 08:06 networking.conf
-rw-r--r-- 1 root root 1109 May 8 2014 network-interface.conf
-rw-r--r-- 1 root root 530 Mar 20 2014 network-interface-container.conf
-rw-r--r-- 1 root root 1756 May 4 2013 network-interface-security.conf
-rw-r--r-- 1 root root 534 Feb 17 2014 passwd.conf
-rw-r--r-- 1 root root 519 Mar 13 2014 plymouth.conf
-rw-r--r-- 1 root root 326 Mar 13 2014 plymouth-log.conf
-rw-r--r-- 1 root root 675 Mar 13 2014 plymouth-ready.conf
-rw-r--r-- 1 root root 778 Mar 13 2014 plymouth-shutdown.conf
-rw-r--r-- 1 root root 899 Mar 13 2014 plymouth-splash.conf
-rw-r--r-- 1 root root 796 Mar 13 2014 plymouth-stop.conf
-rw-r--r-- 1 root root 421 Apr 11 2014 plymouth-upstart-bridge.conf
-rw-r--r-- 1 root root 363 Jan 6 2014 procps.conf
-rw-r--r-- 1 root root 661 Jul 18 2014 rc.conf
-rw-r--r-- 1 root root 683 Jul 18 2014 rcS.conf
-rw-r--r-- 1 root root 1543 Jul 18 2014 rc-sysinit.conf
-rw-r--r-- 1 root root 426 Apr 18 2013 rsyslog.conf
-rw-r--r-- 1 root root 277 Jul 18 2014 shutdown.conf
-rw-r--r-- 1 root root 641 May 2 2014 ssh.conf
-rw-r--r-- 1 root root 711 Mar 13 2014 startpar-bridge.conf
-rw-r--r-- 1 root root 1183 Oct 29 07:02 systemd-logind.conf
-rw-r--r-- 1 root root 348 Jul 18 2014 tty1.conf
-rw-r--r-- 1 root root 97 Jan 23 13:45 tty2.conf
-rw-r--r-- 1 root root 333 Jul 18 2014 tty3.conf
-rw-r--r-- 1 root root 333 Jul 18 2014 tty4.conf
-rw-r--r-- 1 root root 232 Jul 18 2014 tty5.conf
-rw-r--r-- 1 root root 232 Jul 18 2014 tty6.conf
-rw-r--r-- 1 root root 337 May 7 2014 udev.conf
-rw-r--r-- 1 root root 645 Sep 12 14:03 udev-fallback-graphics.conf
-rw-r--r-- 1 root root 768 May 7 2014 udev-finish.conf
-rw-r--r-- 1 root root 356 May 7 2014 udevmonitor.conf
-rw-r--r-- 1 root root 190 Oct 22 00:13 udev-static.conf
-rw-r--r-- 1 root root 335 Oct 22 00:13 udevtrigger.conf
-rw-r--r-- 1 root root 412 Jul 18 2014 upstart-file-bridge.conf
-rw-r--r-- 1 root root 329 Jul 18 2014 upstart-socket-bridge.conf
-rw-r--r-- 1 root root 553 Jul 18 2014 upstart-udev-bridge.conf
-rw-r--r-- 1 root root 1521 Jul 18 2014 wait-for-state.conf

***@okapi:~# ls -al /etc/init.d
total 188
drwxr-xr-x 2 root root 4096 Jan 10 20:45 .
drwxr-xr-x 89 root root 4096 Jan 23 13:45 ..
-rwxr-xr-x 1 root root 9974 Jan 7 2014 apache2
-rwxr-xr-x 1 root root 19 Oct 22 00:12 bind9
lrwxrwxrwx 1 root root 21 Feb 9 2013 cron -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 2813 Nov 25 19:37 dbus
-rwxr-xr-x 1 root root 1329 Mar 13 2014 halt
-rwxr-xr-x 1 root root 3523 Jan 4 2013 iptables-persistent
-rwxr-xr-x 1 root root 1293 Mar 13 2014 killprocs
-rwxr-xr-x 1 root root 1990 Jan 22 2013 kmod
-rw-r--r-- 1 root root 0 Oct 22 00:13 .legacy-bootordering
-rwxr-xr-x 1 root root 674 Oct 22 00:13 modules_dep.sh
-rwxr-xr-x 1 root root 5491 Feb 19 2014 mysql
-rwxr-xr-x 1 root root 4479 Mar 20 2014 networking
-rwxr-xr-x 1 root root 1292 Mar 13 2014 ondemand
-rwxr-xr-x 1 root root 7507 Feb 12 2014 postfix
-rwxr-xr-x 1 root root 1192 May 27 2013 procps
-rwxr-xr-x 1 root root 3092 Dec 27 2012 quota
-rwxr-xr-x 1 root root 1959 Dec 27 2012 quotarpc
-rwxr-xr-x 1 root root 6120 Mar 13 2014 rc
-rwxr-xr-x 1 root root 782 Mar 13 2014 rc.local
-rwxr-xr-x 1 root root 117 Mar 13 2014 rcS
-rw-r--r-- 1 root root 2427 Mar 13 2014 README
-rwxr-xr-x 1 root root 639 Mar 13 2014 reboot
-rwxr-xr-x 1 root root 2913 Dec 4 2013 rsyslog
-rwxr-xr-x 1 root root 10536 Oct 6 2013 saslauthd
-rwxr-xr-x 1 root root 3920 Mar 13 2014 sendsigs
-rwxr-xr-x 1 root root 590 Mar 13 2014 single
-rw-r--r-- 1 root root 4290 Mar 13 2014 skeleton
-rwxr-xr-x 1 root root 4077 May 2 2014 ssh
-rwxr-xr-x 1 root root 731 Feb 5 2014 sudo
-rwxr-xr-x 1 root root 6173 May 7 2014 udev
-rwxr-xr-x 1 root root 2721 Mar 13 2014 umountfs
-rwxr-xr-x 1 root root 2260 Mar 13 2014 umountnfs.sh
-rwxr-xr-x 1 root root 1872 Mar 13 2014 umountroot
-rwxr-xr-x 1 root root 3111 Mar 13 2014 urandom
-rwxr-xr-x 1 root root 229 Oct 22 00:12 vzreboot
-rwxr-xr-x 1 root root 19 Oct 22 00:12 wide-dhcpv6-client
-rwxr-xr-x 1 root root 2666 Sep 25 2013 x11-common
Post by Serge Hallyn
Post by Smart Goldman
Post by Serge Hallyn
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?
Yes, mine is ubuntu system provided by a VPS service of
https://crissic.net/los-angeles_vps_pre-launch
I think it's a possibility. I may need to ask the provider about it..
Although I do not think this information will be helpful, this is my kernel
version.
Linux okapi 2.6.32-042stab093.5 #1 SMP Wed Sep 10 17:39:49 MSK 2014 x86_64
x86_64 x86_64 GNU/Linux
I think I've never changed the kernel by myself.
Post by Serge Hallyn
I do think removing cgroup-bin
sudo apt-get purge cgroup-bin
will fix the mounting of the name=beancounter etc hierarchies.
I had removed cgroup-bin.
But unfortunately it looks like it was not fixed.
4:name=systemd:/
3:freezer,devices,name=container:/12042
2:cpuacct,cpu,cpuset,name=fairsched:/12042
1:blkio,name=beancounter:/12042
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
Mounted container onto /run/cgmanager/fs/none,name=container
Mounted fairsched onto /run/cgmanager/fs/none,name=fairsched
Mounted beancounter onto /run/cgmanager/fs/none,name=beancounter
found 4 controllers
buf is /run/cgmanager/agents/cgm-release-agent.systemd
buf is /run/cgmanager/agents/cgm-release-agent.container
buf is /run/cgmanager/agents/cgm-release-agent.fairsched
buf is /run/cgmanager/agents/cgm-release-agent.beancounter
Mounted systemd onto /run/cgmanager/fs/none,name=systemd
cgmanager: Failed mounting /run/cgmanager/fs/none,name=container: Operation
not permitted
Yeah that's weird.
Look around /var/log and see what is mounting those cgroups
at boot. What files still exist under /etc/init and /etc/init.d?
Post by Smart Goldman
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
Jan 17 00:31:48 okapi sudo: root : TTY=pts/0 ; PWD=/root ; USER=root ;
COMMAND=/usr/bin/apt-get -y purge cgroup-bin
Jan 17 00:31:48 okapi sudo: pam_unix(sudo:session): session opened for user
root by root(uid=0)
Jan 17 00:31:55 okapi sudo: pam_unix(sudo:session): session closed for user
root
Jan 17 00:32:53 okapi systemd-logind[326]: New seat seat0.
Jan 17 00:32:54 okapi sshd[492]: Server listening on 0.0.0.0 port 22.
Jan 17 00:32:54 okapi sshd[492]: Server listening on :: port 22.
Jan 17 00:34:09 okapi sshd[897]: Accepted password for root from
119.105.136.26 port 56815 ssh2
Jan 17 00:34:09 okapi sshd[897]: pam_unix(sshd:session): session opened for
user root by (uid=0)
Jan 17 00:34:09 okapi systemd-logind[326]: Failed to create cgroup
name=systemd:/user/0.user: No such file or directory
Jan 17 00:34:09 okapi sshd[897]: pam_systemd(sshd:session): Failed to
create session: No such file or directory
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
Serge Hallyn
2015-01-26 16:37:32 UTC
Permalink
Which provider is this? Do they have a free trial? Maybe I can try a
free trial to figure out how to get you going.

Otherwise, the simpler path may be for you to uninstall cgmanager, write
an upstart job to create a cgroup for each controller owned by your
user, write a script you run on login to enter yourself into that,
and then just let lxc use the cgroup filesystem (cgfs.c which it will
use by default). For any hierarchies you don't need/want to use, you
can use lxc.cgroup.use in /etc/lxc/lxc.conf (see "man lxc.system.conf")
to exclude it.

-serge
Smart Goldman
2015-01-28 13:25:22 UTC
Permalink
Post by Serge Hallyn
Which provider is this? Do they have a free trial? Maybe I can try a
free trial to figure out how to get you going.
The provider is Crissic Solutions. https://crissic.net/
A staff of this provider says they do not have free trial.
But website says they have "10 Days Money Back".
Or I can create account for you on my server. Can I send directly your
account information to your e-mail address?
Post by Serge Hallyn
Otherwise, the simpler path may be for you to uninstall cgmanager, write
an upstart job to create a cgroup for each controller owned by your
user, write a script you run on login to enter yourself into that,
and then just let lxc use the cgroup filesystem (cgfs.c which it will
use by default). For any hierarchies you don't need/want to use, you
can use lxc.cgroup.use in /etc/lxc/lxc.conf (see "man lxc.system.conf")
to exclude it.
It looks like my server does not have /etc/lxc directory for now.
I need to create the directory or to install something?

Smart Goldman
2015-01-18 04:52:00 UTC
Permalink
Sorry for my mails again and again, everyone.
Post by Serge Hallyn
Operation not permitted? That's unexpected. Are you running a custom
kernel or custom selinux policy?
I got an answer from VPS support team as follows.

It isn't a custom kernel, but it is an OpenVZ kernel so it is a shared
kernel, you do not have access to modify kernel properties with OpenVZ.

We run KernelCare as well if that matters, but it shouldn't.
Continue reading on narkive:
Loading...