# systemctl status tomcat9 ● tomcat9.service - Apache Tomcat 9 Web Application Server Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-06-0620:52:24 CST; 10min ago Docs: https://tomcat.apache.org/tomcat-9.0-doc/index.html Process: 187 ExecStartPre=/usr/libexec/tomcat9/tomcat-update-policy.sh (code=exited, status=0/SUCCESS) Process: 191 ExecStart=/bin/sh /usr/libexec/tomcat9/tomcat-start.sh (code=exited, status=226/NAMESPACE) Main PID: 191 (code=exited, status=226/NAMESPACE)
Jun 0620:52:24 test8 systemd\[1\]: Starting Apache Tomcat 9 Web Application Server... Jun 0620:52:24 test8 systemd\[1\]: Started Apache Tomcat 9 Web Application Server. Jun 0620:52:24 test8 systemd\[191\]: tomcat9.service: Failed to set up mount namespacing: Permission den ied Jun 0620:52:24 test8 systemd\[191\]: tomcat9.service: Failed at step NAMESPACE spawning /bin/sh: Permiss ion denied Jun 0620:52:24 test8 systemd\[1\]: tomcat9.service: Main process exited, code=exited, status=226/NAMESPA CE Jun 0620:52:24 test8 systemd\[1\]: tomcat9.service: Failed with result 'exit-code'.
$ lxc profile list +--------------------+---------+ NAME USED BY +--------------------+---------+ default1 +--------------------+---------+ hostbridgedprofile 0 +--------------------+---------+
$ lxc profile delete hostbridgedprofile Error: Profile is currently in use
配置容器网络接口(方法三)
重新初始化lxd,注意在有容器实例存在的情况下,重新初始化网络设置是可以的,但是已经存在的storage pool是不能改动的,当然可以添加新的storage pool
1 2 3 4 5 6 7 8 9 10
$ lxd init Would you like to use LXD clustering? (yes/no) \[default=no\]: Do you want to configure a new storage pool? (yes/no) \[default=yes\]: no Would you like to connect to a MAAS server? (yes/no) \[default=no\]: Would you like to create a new local network bridge? (yes/no) \[default=yes\]: no <=这里为no Would you like to configure LXD to use an existing bridge or host interface? (yes/no) \[default=no\]: yes <= 这里为yes Name of the existing bridge or host interface: br0 <= 这里输入主机桥接接口bro Would you like LXD to be available over the network? (yes/no) \[default=no\]: Would you like stale cached images to be updated automatically? (yes/no) \[default=yes\] Would you like a YAML "lxd init" preseed to be printed? (yes/no) \[default=no\]:
$ lxc list +------+---------+---------------------+-----------------------------------------------+------------+-----------+ NAME STATE IPV4 IPV6 TYPE SNAPSHOTS +------+---------+---------------------+-----------------------------------------------+------------+-----------+ bst RUNNING 10.132.77.54 (eth0) fd42:2d28:4331:ad36:216:3eff:fed5:4b5c (eth0) PERSISTENT 0 +------+---------+---------------------+-----------------------------------------------+------------+-----------+
$ sudo VBoxControl sharedfolder list Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 6.0.8 (C) 2008-2019 Oracle Corporation All rights reserved.
$ sudo mount /dev/cdrom /media/cdrom $ cd /media/cdrom $ sudo su # ./VBoxLinuxAdditions.run Verifying archive integrity... All good. Uncompressing VirtualBox 6.0.8 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 6.0.8of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 4.19.0-5-amd64. update-initramfs: Generating /boot/initrd.img-4.19.0-5-amd64 VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted