Когда я пытаюсь поднять докер-контейнер, он не загружает веб-сервер Apache. - PullRequest
0 голосов
/ 31 октября 2019

Когда работает контейнер с apache, я не могу получить доступ к маршруту.

Мой docker-compose :

version: '3'
services:
  tomcat:
    container_name: tomcatSimple
    image: tomcat:9.0.27-jdk8-corretto
    restart: always
    ports:
      - '8090:8080'
    volumes:
      - tomcat_webapps:/usr/local/tomcat/webapps
volumes:
  tomcat_webapps:

с docker-ps я могу видеть контейнер

CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                    NAMES
e6a608431f8a        tomcat:9.0.27-jdk8-corretto   "catalina.sh run"   53 minutes ago      Up 8 minutes        0.0.0.0:8090->8080/tcp   tomcatSimple 

с помощью docker inspect e6a608431f8a

{
        "Id": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
        "Created": "2019-10-31T11:45:28.6292202Z",
        "Path": "catalina.sh",
        "Args": [
            "run"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 294,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2019-10-31T12:29:47.6437158Z",
            "FinishedAt": "2019-10-31T13:04:58.5282453+01:00"
        },
        "Image": "sha256:30dd95129d60bfe08aaacd21fdb8022bd6c1e328997bae5254658453aa602379",
        "ResolvConfPath": "",
        "HostnamePath": "",
        "HostsPath": "",
        "LogPath": "C:\\ProgramData\\Docker\\containers\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3-json.log",
        "Name": "/tomcatSimple",
        "RestartCount": 0,
        "Driver": "lcow",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "trydocker_tomcat_webapps:/usr/local/tomcat/webapps:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "trydocker_default",
            "PortBindings": {
                "8080/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8090"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "CapAdd": null,
            "CapDrop": null,
            "Capabilities": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 0,
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "hyperv",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\Docker\\lcow\\e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3"
            },
            "Name": "lcow"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "trydocker_tomcat_webapps",
                "Source": "C:\\ProgramData\\Docker\\volumes\\trydocker_tomcat_webapps\\_data",
                "Destination": "/usr/local/tomcat/webapps",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "e6a608431f8a",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/tomcat/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto",
                "CATALINA_HOME=/usr/local/tomcat",
                "TOMCAT_NATIVE_LIBDIR=/usr/local/tomcat/native-jni-lib",
                "LD_LIBRARY_PATH=/usr/local/tomcat/native-jni-lib",
                "GPG_KEYS=05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23",
                "TOMCAT_MAJOR=9",
                "TOMCAT_VERSION=9.0.27",
                "TOMCAT_SHA512=408d30bf56d59941149b397e5e725a5f9baf225807397a4b7a3be79f7d211e6d878d34bf00776746a54cc7d067f168db24c367e5c7390bb7329b3bca428726cc"
            ],
            "Cmd": [
                "catalina.sh",
                "run"
            ],
            "Image": "tomcat:9.0.27-jdk8-corretto",
            "Volumes": {
                "/usr/local/tomcat/webapps": {}
            },
            "WorkingDir": "/usr/local/tomcat",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "61e1ab2b8140f4f4e6a215a0eb5350b5512f40571133f1313b1fc9f7a0af2a57",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "trydocker",
                "com.docker.compose.service": "tomcat",
                "com.docker.compose.version": "1.24.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "8080/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "8090"
                    }
                ]
            },
            "SandboxKey": "e6a608431f8aa0e21ffc6121426974be49a45fdb2d856f2e93f6233adf016ac3",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "trydocker_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "tomcat",
                        "e6a608431f8a"
                    ],
                    "NetworkID": "2b43c6dd8527271224208b671bc29b54ad0b4819d175cca7e6d976abc550caf2",
                    "EndpointID": "33c6cb0e77a251b44ec5f6d1141098fabd876af46fba9ff92549f44e655ebcae",
                    "Gateway": "172.22.128.1",
                    "IPAddress": "172.22.135.63",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "00:15:5d:01:0d:c6",
                    "DriverOpts": null
                }
            }
        }
    }

Кажется, что все правильно, но при доступе к localhost: 8090

это не показывает мне экран приветствия tomcat

Estado HTTP 404 - Нет информации Типовое информационное сообщение

mensaje Не найдено

Descripción El recurso Requerido no está disonible.

Apache Tomcat / 9.0.2

Мои журналы

31-Oct-2019 11:45:30.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.27
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Oct 7 2019 09:57:22 UTC
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.19.27-linuxkit
31-Oct-2019 11:45:30.803 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_232-b09
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Amazon.com Inc.
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
31-Oct-2019 11:45:30.804 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 11:45:30.810 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 11:45:30.811 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 11:45:30.812 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 11:45:30.838 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips  26 Jan 2017]
31-Oct-2019 11:45:31.144 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.178 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.181 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [691] milliseconds
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 11:45:31.224 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 11:45:31.240 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 11:45:31.255 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 11:45:31.260 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [78] milliseconds
31-Oct-2019 12:04:57.477 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.483 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.484 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
31-Oct-2019 12:04:57.486 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.489 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:04:57.498 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:04:57.499 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.27
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Oct 7 2019 09:57:22 UTC
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.27.0
31-Oct-2019 12:29:47.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.19.27-linuxkit
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
31-Oct-2019 12:29:47.041 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-1.8.0-amazon-corretto/jre
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_232-b09
31-Oct-2019 12:29:47.042 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Amazon.com Inc.
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
31-Oct-2019 12:29:47.043 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
31-Oct-2019 12:29:47.044 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
31-Oct-2019 12:29:47.045 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
31-Oct-2019 12:29:47.046 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
31-Oct-2019 12:29:47.047 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
31-Oct-2019 12:29:47.048 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3].
31-Oct-2019 12:29:47.049 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
31-Oct-2019 12:29:47.050 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
31-Oct-2019 12:29:47.055 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k-fips  26 Jan 2017]
31-Oct-2019 12:29:47.307 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.335 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.342 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [455] milliseconds
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
31-Oct-2019 12:29:47.372 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.27]
31-Oct-2019 12:29:47.390 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
31-Oct-2019 12:29:47.402 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
31-Oct-2019 12:29:47.409 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [66] milliseconds
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...