docker tomcat7没有主机路由

时间:2020-06-13 04:31:03

标签: docker routes tomcat7

我尝试在docker中运行一个tomcat7服务器,当我访问索引页面时,它可以工作,但对其他人不起作用,该docker由我的Dockerfile制成:

    FROM ubuntu:latest
MAINTAINER foo<foo@bar.com>

# Install java 7
WORKDIR /usr
RUN mkdir java
WORKDIR /usr/java
RUN mkdir java-7-oracle
ADD java-7-oracle /usr/java/java-7-oracle

ENV JAVA_HOME=/usr/java/java-7-oracle

WORKDIR /opt
RUN mkdir tomcat
ADD tomcat /opt/tomcat

RUN apt update && apt install -y vim && apt install -y inetutils-ping

RUN chmod +x /opt/tomcat/bin/catalina.sh
EXPOSE 8080

CMD /opt/tomcat/bin/catalina.sh run

它还连接了一个mysql docker,并且我在tomcat docker中成功ping了我的mysql服务器,根据日志, hibernate毫无问题地连接了mysql docker ,我可以通过保存在mysql数据库中的帐户登录。 这是我的webapps结构:

root@02bbc09fb925:/opt/tomcat/webapps# ls
am  cas  ssa-1.4.0  ssa-1.4.0.war  usermanager

这是usermanager / WEB-ING / web.xml设置的一部分(关于主机,其他主机设置相同):

<init-param>
                        <param-name>casServerLoginUrl</param-name>
                        <param-value>http://10.0.10.114:8080/cas/login</param-value>
</init-param>

我不明白为什么我可以访问索引页面,例如:10.0.10.114:8080/cas/login/,10.0.10.114:8080/usermanager/register,但是当我成功登录时,它将重定向到下一页,则发生错误没有路由到主机。.

type Rapport d''exception

message java.net.NoRouteToHostException: No route to host

description Le serveur a rencontré une erreur interne qui l''a empêché de satisfaire la requête.

exception

java.lang.RuntimeException: java.net.NoRouteToHostException: No route to host
    org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:341)
    org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:305)
    org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:50)
    org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:207)
    org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169)
    org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:116)
    org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
cause mère

java.net.NoRouteToHostException: No route to host
    java.net.PlainSocketImpl.socketConnect(Native Method)
    java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    java.net.Socket.connect(Socket.java:579)
    java.net.Socket.connect(Socket.java:528)
    sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    sun.net.www.http.HttpClient.New(HttpClient.java:308)
    sun.net.www.http.HttpClient.New(HttpClient.java:326)
    sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997)
    sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
    sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851)
    sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
    org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:326)
    org.jasig.cas.client.util.CommonUtils.getResponseFromServer(CommonUtils.java:305)
    org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:50)
    org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:207)
    org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169)
    org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:116)
    org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/7.0.67.

0 个答案:

没有答案