###前提・実現したいこと
DockerでApache TomcatのWebサーバを立てたいです.
Githubレポジトリ(openscoring
/
openscoring-docker)からcloneしたものをビルドしました.
DockerにもJavaにも詳しくないので何をどうしたら良いのか分からない状態です...
###発生している問題・エラーメッセージ
Dockerイメージを起動させて, Webサーバを立てたのですが, localhost:8080
にアクセスしてもサーバに接続できていない状態です.
###サーバ立ち上げ時の画面
立ち上げコマンド
docker run --net="host" openscoring/openscoring:latest
docker run --net=host openscoring/openscoring:latest
も試しましたが結果は同じでした.
(調べたら""を付けていないものもあったので一応試しました.)
08-Apr-2020 12:39:10.784 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.51 08-Apr-2020 12:39:10.785 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 5 2020 22:26:25 UTC 08-Apr-2020 12:39:10.786 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.51.0 08-Apr-2020 12:39:10.787 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux 08-Apr-2020 12:39:10.787 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.9.184-linuxkit 08-Apr-2020 12:39:10.787 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 08-Apr-2020 12:39:10.788 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/local/openjdk-8/jre 08-Apr-2020 12:39:10.789 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_242-b08 08-Apr-2020 12:39:10.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 08-Apr-2020 12:39:10.790 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat 08-Apr-2020 12:39:10.791 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat 08-Apr-2020 12:39:10.792 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties 08-Apr-2020 12:39:10.792 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 08-Apr-2020 12:39:10.793 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 08-Apr-2020 12:39:10.794 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 08-Apr-2020 12:39:10.794 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 08-Apr-2020 12:39:10.795 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dconfig.file=application.conf 08-Apr-2020 12:39:10.795 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.5]. 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 08-Apr-2020 12:39:10.796 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 08-Apr-2020 12:39:10.808 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1d 10 Sep 2019] 08-Apr-2020 12:39:10.896 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 08-Apr-2020 12:39:10.909 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 08-Apr-2020 12:39:10.923 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 460 ms 08-Apr-2020 12:39:10.954 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 08-Apr-2020 12:39:10.960 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.51 08-Apr-2020 12:39:11.002 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/ROOT.war] 08-Apr-2020 12:39:12.229 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 08-Apr-2020 12:39:12.352 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/ROOT.war] has finished in [1,349] ms 08-Apr-2020 12:39:12.354 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 08-Apr-2020 12:39:12.361 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1438 ms
###試したこと
- サーバを立ち上げ中にポートを確認したところ, ポートは使われていませんでした.
(そもそもサーバが立ち上がっていない?)
- 別の環境(Python3:Flask)でwebサーバを立ち上げたところ, それは上手くいきました.
(PCの設定自体は問題ない?)
追記
-p 8080:8080
などでポートフォワードしての立ち上げも試したのですが,WARNING: Published ports are discarded when using host network mode
と出てしまい, ポートフォワードに失敗してしまいました.
###環境
- macOS Catalina 10.15.3
- Docker version 19.03.5
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/04/09 01:23 編集
2020/04/09 01:29
2020/04/09 01:56