Container wont start

fhainz

New Member
Sep 25, 2018
5
0
1
35
Hello!

My containers wont start anymore.

Job for pve-container@300.service failed because the control process exited with error code.
See "systemctl status pve-container@300.service" and "journalctl -xe" for details.
TASK ERROR: command 'systemctl start pve-container@300' failed: exit code 1

systemctl status pve-container@300.service :
root@proxmox:~# systemctl status pve-container@300.service
pve-container@300.service - PVE LXC Container: 300
Loaded: loaded (/lib/systemd/system/pve-container@.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-09-25 18:43:16 CEST; 6min ago
Docs: man:lxc-start
man:lxc
man:pct
Process: 5300 ExecStart=/usr/bin/lxc-start -n 300 (code=exited, status=1/FAILURE)

Sep 25 18:43:16 proxmox systemd[1]: Starting PVE LXC Container: 300...
Sep 25 18:43:16 proxmox systemd[1]: pve-container@300.service: Control process exited, code=exited status=1
Sep 25 18:43:16 proxmox systemd[1]: Failed to start PVE LXC Container: 300.
Sep 25 18:43:16 proxmox systemd[1]: pve-container@300.service: Unit entered failed state.
Sep 25 18:43:16 proxmox systemd[1]:
pve-container@300.service: Failed with result 'exit-code'.


journalctl -xe :

-- Unit pvesr.service has begun starting up.
Sep 25 18:49:00 proxmox systemd[1]: Started Proxmox VE replication runner.
-- Subject: Unit pvesr.service has finished start-up
-- Defined-By: systemd
--
-- Unit pvesr.service has finished starting up.
--
-- The start-up result is done.

Sep 25 18:50:00 proxmox systemd[1]: Starting Proxmox VE replication runner...
-- Subject: Unit pvesr.service has begun start-up
-- Defined-By: systemd
--
-- Unit pvesr.service has begun starting up.

Sep 25 18:50:00 proxmox systemd[1]: Started Proxmox VE replication runner.
-- Subject: Unit pvesr.service has finished start-up
-- Defined-By: systemd
--
-- Unit pvesr.service has finished starting up.
--
-- The start-up result is done.


I updated to proxmox version 5.2-9 but still the same.

Has anybody an idea?
 
root@proxmox:~# lxc-start -n 300 -F
root@proxmox:~#

i did not get any info and no entry in task history.
 
Are you sure container 300 exists at all? What is the output of

# cat /var/lib/lxc/300/config
 
Yes i'm sure.

root@proxmox:~# cat /var/lib/lxc/300/config
lxc.arch = amd64
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.monitor.unshare = 1
lxc.tty.max = 2
lxc.environment = TERM=linux
lxc.uts.name = FHEM-Main
lxc.cgroup.memory.limit_in_bytes = 4294967296
lxc.cgroup.memory.memsw.limit_in_bytes = 8589934592
lxc.cgroup.cpu.shares = 1024
lxc.rootfs.path = /var/lib/lxc/300/rootfs
lxc.net.0.type = veth
lxc.net.0.veth.pair = veth300i0
lxc.net.0.hwaddr = 2e:e8:2a:d8:f8:64
lxc.net.0.name = eth0
lxc.cgroup.cpuset.cpus = 0-3
 
You'll want to pass a few more parameters to lxc-start:
Code:
# lxc-start -o lxc-start.log -lDEBUG -F -n 300
Then paste both the output you get as well as the contents of the `lxc-start.log` file created by the above command.
 
root@proxmox:~# lxc-start -o lxc-start.log -lDEBUG -F -n 300
lxc-start: 300: conf.c: run_buffer: 353 Script exited with status 2
lxc-start: 300: start.c: lxc_init: 828 Failed to run lxc.hook.pre-start for container "300"
lxc-start: 300: start.c: __lxc_start: 1914 Failed to initialize container "300"
lxc-start: 300: tools/lxc_start.c: main: 330 The container failed to start
lxc-start: 300: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options

lxc-start.log:
lxc-start 300 20181001142150.513 INFO lsm - lsm/lsm.c:lsm_init:47 - LSM security driver AppArmor
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "reject_force_umount # comment this to allow umount -f; not recommended"
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for reject_force_umount action 0(kill)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for reject_force_umount action 0(kill)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for reject_force_umount action 0(kill)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:do_resolve_add_rule:503 - Set seccomp rule to reject force umounts
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for reject_force_umount action 0(kill)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "[all]"
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "kexec_load errno 1"
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for kexec_load action 327681(errno)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for kexec_load action 327681(errno)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for kexec_load action 327681(errno)
lxc-start 300 20181001142150.513 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for kexec_load action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "open_by_handle_at errno 1"
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for open_by_handle_at action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for open_by_handle_at action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for open_by_handle_at action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for open_by_handle_at action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "init_module errno 1"
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for init_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for init_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for init_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for init_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "finit_module errno 1"
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for finit_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for finit_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for finit_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for finit_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:757 - Processing "delete_module errno 1"
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:934 - Added native rule for arch 0 for delete_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:943 - Added compat rule for arch 1073741827 for delete_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:953 - Added compat rule for arch 1073741886 for delete_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:963 - Added native rule for arch -1073741762 for delete_module action 327681(errno)
lxc-start 300 20181001142150.514 INFO seccomp - seccomp.c:parse_config_v2:967 - Merging compat seccomp contexts into main context
lxc-start 300 20181001142150.514 INFO conf - conf.c:run_script_argv:374 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "300", config secti$
lxc-start 300 20181001142150.971 DEBUG conf - conf.c:run_buffer:344 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 300 lxc pre-start with output: volume 'HDD_Ba$
lxc-start 300 20181001142150.978 ERROR conf - conf.c:run_buffer:353 - Script exited with status 2
lxc-start 300 20181001142150.978 ERROR start - start.c:lxc_init:828 - Failed to run lxc.hook.pre-start for container "300"
lxc-start 300 20181001142150.978 ERROR start - start.c:__lxc_start:1914 - Failed to initialize container "300"
lxc-start 300 20181001142150.978 ERROR lxc_start - tools/lxc_start.c:main:330 - The container failed to start
lxc-start 300 20181001142150.978 ERROR lxc_start - tools/lxc_start.c:main:336 - Additional information can be obtained by setting the --logfile and --logpriority options

Is there a problem with my hdd mount?
 
Some of that output looks truncated, so I'm not sure where the prestart hook actually fails. You could just try a `pct mount 300` to check if the mounting works at all (and `pct unmount 300` afterwards).
Can you also post your /etc/pve/lxc/300.conf file?
 
Hello,
I've got a similar issue since my latest software update:

systemctl status lxc@105.service
Code:
● lxc@105.service - LXC Container: 105
   Loaded: loaded (/lib/systemd/system/lxc@.service; disabled; vendor preset: enabled)
  Drop-In: /usr/lib/systemd/system/lxc@.service.d
           └─pve-reboot.conf
   Active: failed (Result: exit-code) since Sat 2018-10-13 23:31:41 CEST; 23min ago
     Docs: man:lxc-start
           man:lxc
  Process: 18774 ExecStart=/usr/bin/lxc-start -n 105 (code=exited, status=1/FAILURE)

Oct 13 23:31:36 titan-n1 systemd[1]: Starting LXC Container: 105...
Oct 13 23:31:41 titan-n1 lxc-start[18774]: lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
Oct 13 23:31:41 titan-n1 lxc-start[18774]: lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode.
Oct 13 23:31:41 titan-n1 lxc-start[18774]: lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.
Oct 13 23:31:41 titan-n1 systemd[1]: lxc@105.service: Control process exited, code=exited status=1
Oct 13 23:31:41 titan-n1 systemd[1]: Failed to start LXC Container: 105.
Oct 13 23:31:41 titan-n1 systemd[1]: lxc@105.service: Unit entered failed state.
Oct 13 23:31:41 titan-n1 systemd[1]: lxc@105.service: Failed with result 'exit-code'.

/tmp/lxc-105.log
lxc-start 20181013214556.236 INFO lxc_start_ui - tools/lxc_start.c:main:275 - using rcfile /var/lib/lxc/105/config
lxc-start 20181013214556.257 WARN lxc_confile - confile.c:config_pivotdir:2022 - lxc.pivotdir is ignored. It will soon become an error.
lxc-start 20181013214556.308 ERROR lxc_container - lxccontainer.c:do_lxcapi_start:866 - Permission denied - Failed to make / rslave at startup
lxc-start 20181013214556.313 ERROR lxc_start_ui - tools/lxc_start.c:main:366 - The container failed to start.
lxc-start 20181013214556.315 ERROR lxc_start_ui - tools/lxc_start.c:main:370 - Additional information can be obtained by setting the --logfile and --logpriority options.

/etc/pve/lxc/105.conf
Code:
arch: amd64
cores: 1
hostname: iob
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=CE:25:B8:41:D9:FB,type=veth
ostype: debian
rootfs: local-zfs-vmdata:subvol-105-disk-1,acl=1,size=8G
swap: 1024

pct mount/unmount works for ID 105.

Thank you for your help!
Oliver
 
Here you will find some additional information regarding my issue described above:

journalctl -xe
--
-- Unit pvesr.service has begun starting up.
Oct 23 23:16:01 titan-n1 systemd[1]: Started Proxmox VE replication runner.
-- Subject: Unit pvesr.service has finished start-up
-- Defined-By: systemd

--
-- Unit pvesr.service has finished starting up.
--
-- The start-up result is done.
Oct 23 23:16:05 titan-n1 pvedaemon[3364]: starting CT 108: UPID:titan-n1:00000D24:05B935A3:5BCF8F95:vzstart:108:root@pam:
Oct 23 23:16:05 titan-n1 pvedaemon[20590]: <root@pam> starting task UPID:titan-n1:00000D24:05B935A3:5BCF8F95:vzstart:108:root@pam:
Oct 23 23:16:05 titan-n1 systemd[1]: Starting LXC Container: 108...
-- Subject: Unit lxc@108.service has begun start-up
-- Defined-By: systemd

--
-- Unit lxc@108.service has begun starting up.
Oct 23 23:16:05 titan-n1 audit[3370]: AVC apparmor="DENIED" operation="mount" info="failed mntpnt match" error=-13 profile="/usr/bin/lxc-start" name="/" pid=3370 comm="lxc-start" flags="rw, rslave"
Oct 23 23:16:05 titan-n1 kernel: audit: type=1400 audit(1540329365.458:31): apparmor="DENIED" operation="mount" info="failed mntpnt match" error=-13 profile="/usr/bin/lxc-start" name="/" pid=3370 comm="lx
Oct 23 23:16:10 titan-n1 lxc-start[3366]: lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
Oct 23 23:16:10 titan-n1 lxc-start[3366]: lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode.
Oct 23 23:16:10 titan-n1 lxc-start[3366]: lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.
Oct 23 23:16:10 titan-n1 systemd[1]: lxc@108.service: Control process exited, code=exited status=1
Oct 23 23:16:10 titan-n1 systemd[1]: Failed to start LXC Container: 108.
-- Subject: Unit lxc@108.service has failed
-- Defined-By: systemd

--
-- Unit lxc@108.service has failed.
--
-- The result is failed.
Oct 23 23:16:10 titan-n1 systemd[1]: lxc@108.service: Unit entered failed state.
Oct 23 23:16:10 titan-n1 systemd[1]: lxc@108.service: Failed with result 'exit-code'.
Oct 23 23:16:10 titan-n1 pvedaemon[3364]: command 'systemctl start lxc@108' failed: exit code 1
Oct 23 23:16:10 titan-n1 pvedaemon[20590]: <root@pam> end task UPID:titan-n1:00000D24:05B935A3:5BCF8F95:vzstart:108:root@pam: command 'systemctl start lxc@108' failed: exit code 1
Oct 23 23:16:23 titan-n1 pvedaemon[7373]: <root@pam> starting task UPID:titan-n1:00000D45:05B93CA4:5BCF8FA7:vzstart:105:root@pam:
Oct 23 23:16:23 titan-n1 pvedaemon[3397]: starting CT 105: UPID:titan-n1:00000D45:05B93CA4:5BCF8FA7:vzstart:105:root@pam:
Oct 23 23:16:23 titan-n1 systemd[1]: Starting LXC Container: 105...
-- Subject: Unit lxc@105.service has begun start-up
-- Defined-By: systemd

--
-- Unit lxc@105.service has begun starting up.
Oct 23 23:16:23 titan-n1 audit[3403]: AVC apparmor="DENIED" operation="mount" info="failed mntpnt match" error=-13 profile="/usr/bin/lxc-start" name="/" pid=3403 comm="lxc-start" flags="rw, rslave"
Oct 23 23:16:23 titan-n1 kernel: audit: type=1400 audit(1540329383.393:32): apparmor="DENIED" operation="mount" info="failed mntpnt match" error=-13 profile="/usr/bin/lxc-start" name="/" pid=3403 comm="lx
Oct 23 23:16:28 titan-n1 lxc-start[3399]: lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
Oct 23 23:16:28 titan-n1 lxc-start[3399]: lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode.
Oct 23 23:16:28 titan-n1 lxc-start[3399]: lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.
Oct 23 23:16:28 titan-n1 pvedaemon[3397]: command 'systemctl start lxc@105' failed: exit code 1
Oct 23 23:16:28 titan-n1 systemd[1]: lxc@105.service: Control process exited, code=exited status=1
Oct 23 23:16:28 titan-n1 systemd[1]: Failed to start LXC Container: 105.
-- Subject: Unit lxc@105.service has failed
-- Defined-By: systemd

--
-- Unit lxc@105.service has failed.
--
-- The result is failed.
Oct 23 23:16:28 titan-n1 systemd[1]: lxc@105.service: Unit entered failed state.
Oct 23 23:16:28 titan-n1 systemd[1]: lxc@105.service: Failed with result 'exit-code'.
Oct 23 23:16:28 titan-n1 pvedaemon[7373]: <root@pam> end task UPID:titan-n1:00000D45:05B93CA4:5BCF8FA7:vzstart:105:root@pam: command 'systemctl start lxc@105' failed: exit code 1
lines 6337-6398/6398 (END)

Regards
Oliver
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!