- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试部署可在我的本地主机上运行Web服务的Web应用程序。
我在dockerized属性文件中使用了端点url,并且正在使用host.docker.internal属性。
For example, I am trying to hit this service http://host.docker.internal:9002/custome/service. I am expecting this to be like http://localhost:9002/custome/service.
2018-08-01 12:53:15,829 ERROR student.ws.WebServiceClientImpl::callRawService(120) - Error calling the service: I/O error: host.docker.internal; nested exception is java.net.UnknownHostException: host.docker.internal
org.springframework.ws.client.WebServiceIOException: I/O error: host.docker.internal; nested exception is java.net.UnknownHostException: host.docker.internal
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:561)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:506)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:446)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:424)
at edu.vanderbilt.mis.student.ws.WebServiceClientImpl.callRawService(WebServiceClientImpl.java:115)
at edu.vanderbilt.mis.student.ws.WebServiceClientImpl.doCallService(WebServiceClientImpl.java:93)
at edu.vanderbilt.mis.student.ws.WebServiceClientImpl.doCallServiceAndUnmarshall(WebServiceClientImpl.java:102)
at edu.vanderbilt.mis.student.ws.WebServiceClientImpl.callServiceAndUnmarshal(WebServiceClientImpl.java:78)
at edu.vanderbilt.mis.more.dao.WsTermDao.getScheduledTerms(WsTermDao.java:20)
at edu.vanderbilt.mis.more.manager.TermManagerDefault.getScheduledTerms(TermManagerDefault.java:16)
at edu.vanderbilt.mis.more.actions.StudentTermAwareAction.populateScheduledTerms(StudentTermAwareAction.java:94)
at edu.vanderbilt.mis.more.actions.StudentTermAwareAction.prepare(StudentTermAwareAction.java:50)
at edu.vanderbilt.mis.more.actions.SearchClassesAction.prepare(SearchClassesAction.java:88)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:140)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at edu.vanderbilt.mis.more.web.filter.StudentAccountAgreementFilter.doFilter(StudentAccountAgreementFilter.java:55)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at edu.vanderbilt.vuit.adi.identity.ping.spring.PingSingleLogoutFilter.doFilter(PingSingleLogoutFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: host.docker.internal
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:286)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.springframework.ws.transport.http.CommonsHttpConnection.onSendAfterWrite(CommonsHttpConnection.java:115)
at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:48)
at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:658)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:606)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555)
... 92 more
最佳答案
我遇到同样的问题,并解决了这个问题,删除了前缀http,例如:使用“host.docker.internal:9002 / custome / service”而不是“http://host.docker.internal:9002 / custome / service”。原因是
# Added by Docker Desktop
30.27.110.80 host.docker.internal
30.27.110.80 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
关于java - 引起原因:java.net.UnknownHostException:host.docker.internal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51639790/
这个问题在这里已经有了答案: How to make a property protected AND internal in C#? (8 个答案) 关闭 9 年前。 我需要声明一个既受又 内部保
我对在 Kotlin 1.3 中使用 Strings.isNullOrEmpty 导入 jdk.internal.joptsimple.internal.Strings.isNullOrEmpty 的
我有一个项目,实习生单元测试应该位于与被测源代码不同的目录树中。有点像这样: projectRoot projectRoot/src projectRoot/tests projectRoot/tes
如何在功能测试中访问浏览器的主要 JavaScript 范围?例如,我想获取对 Dojo 小部件的引用并检查它的属性。例如,在浏览器 JavaScript 控制台中,我可以运行: dijit.
public class TestClass { protected internal int FieldA; internal protected int FieldB; }
我想创建一个内部自动属性: internal bool IP { get; protected internal set; } 我认为可以使 setter protected 或 protected
java.lang.NoSuchMethodError: okhttp3.internal.Internal.initializeInstanceForTests() When creating a
我正在尝试使用 intern 来测试在 node.js 下运行的 dojo 应用程序 我的 intern.js 配置文件是这样的: define({ loader: {
我在 Raspbian wheezy 上的 nginx 1.2.1-2.2 有点问题。我认为它是在我更改站点可用/默认文件中的索引后开始的。以下是相关文件: nginx.conf user www-d
我在尝试加载 Visual studio 2012 时遇到了此错误,遇到了异常。这可能是由扩展引起的,并且在 C:\Users\~\AppData 中给出了附加信息的位置\Roaming\Micros
我正在将一个项目迁移到 Java9,在我切换到新的 Java 版本后,测试开始失败,看起来 PowerMock 正在尝试访问一些它无法访问的类。 Tests run: 1, Failures: 0,
该触发器用于检测进度中的顺序是否已更新,并有助于更新进度的概览状态和完成时间。 但是当发生内部错误时,它并不总是有效,如下所示: Error: 13 INTERNAL: An internal err
当我尝试将包含一些 JavaScript 的项目导入工作区时(使用 Eclipse 的 Neon.M6 版本),出现此错误: eclipse.buildId=4.6.0.I20160317-0200
我在尝试访问 FullContact API 服务器时收到此错误。我正在使用 okhttp 2.7.5 和 okhttp-urlconnection 2.7.5 以及改造 1.9.0。 Caused
当我试图读取一个以前版本的 pandas 保存的 pickle 文件时,它产生了一个 ImportError。 ImportError: No module named 'pandas.core.in
我正在将一个项目迁移到 Java9,在我切换到新的 Java 版本后测试开始失败,似乎 PowerMock 正在尝试访问它无法访问的一些类。 Tests run: 1, Failures: 0, Er
我正在尝试设置 Lumen - 建立在 Laravel 组件之上的“微框架”。服务器端有 nginx + php-fpm。 这是我的 nginx 配置: server { server_nam
在我们的项目中,我们决定在我们的项目中使用最新的 fmt 版本 (6.2.0) 并主要使用 printf 功能,因为我们在广泛使用 printf 的地方进行日志记录。 我使用 fmt 包中包含的 CM
我正在使用 Mockito jar 为 Groovy 编写 Junit 测试用例,但它给了我以下异常: java.lang.NoSuchMethodError: org.mockito.interna
我们的应用程序使用 Google 集合中的 MapMaker 类,并且我们遇到了以下异常,但仅限于使用 webstart 的 OS X 10.4。从应用程序包启动时以及在 OS X 10.5 和 Wi
我是一名优秀的程序员,十分优秀!