报错异常:
总结来说:关防火墙,改文件夹名,刷新浏览器
[root@test 12345]# service firewalld status //查看防火墙状态
Redirecting to /bin/systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-01-14 20:55:23 PST; 19h ago
Docs: man:firewalld(1)
Main PID: 673 (firewalld)
Tasks: 2
Memory: 1.0M
CGroup: /system.slice/firewalld.service
└─673 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
Jan 14 20:55:32 test firewalld[673]: WARNING: COMMAND_FAILED: '/usr/sbin/ip...e.
...
...
Jan 14 20:55:33 test firewalld[673]: WARNING: COMMAND_FAILED: '/usr/sbin/ip...).
Hint: Some lines were ellipsized, use -l to show in full.
[root@test 12345]# service firewalld stop //关闭防火墙
Redirecting to /bin/systemctl stop firewalld.service
root@test 12345]# docker ps //再查看运行中的容器
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
79f229042aae tomcat "catalina.sh run" 49 seconds ago Up 47 seconds 0.0.0.0:8888->8080/tcp cranky_wu
[root@test 12345]# docker exec -it 79f229042aae /bin/bash //进入容器内部
root@79f229042aae:/usr/local/tomcat# ls
BUILDING.txt CONTRIBUTING.md LICENSE NOTICE README.md RELEASE-NOTES RUNNING.txt bin conf lib logs native-jni-lib temp webapps webapps.dist work
root@79f229042aae:/usr/local/tomcat# cd webapps
root@79f229042aae:/usr/local/tomcat/webapps# ls
root@79f229042aae:/usr/local/tomcat/webapps# cd ..
root@79f229042aae:/usr/local/tomcat# ls
BUILDING.txt CONTRIBUTING.md LICENSE NOTICE README.md RELEASE-NOTES RUNNING.txt bin conf lib logs native-jni-lib temp webapps webapps.dist work
root@79f229042aae:/usr/local/tomcat# mv webapps webapps2 //将两个文件夹分别改名
root@79f229042aae:/usr/local/tomcat# mv webapps.dist webapps //将两个文件夹分别改名
root@79f229042aae:/usr/local/tomcat#
刷新浏览器重新访问就好