- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 dockerized webapp 有问题。本质上,我有一个 docker-compose yaml 文件,当文件运行时,一切似乎都能顺利启动。我可以看到容器正在使用 docker ps 运行。我可以看到它正在监听正确的端口,但是当我尝试通过浏览器连接时,它拒绝连接。
我的yaml文件
version: '3'
services:
product-search-service:
build: ./product-search-app
ports:
- 8000:5000
product-shipping-service:
build: ./product-shipping-app
ports:
- 9000:5000
website-app:
build: ./web-app
ports:
- 127.0.0.1:8080:80
volumes:
- ./web-app/public-html:/usr/local/apache2/htdocs/
我正在通过网络浏览器连接到 127.0.0.1:8080
控制台日志
Starting webstore-services_product-shipping-service_1 ... done Recreating webstore-services_website-app_1 ... done Starting webstore-services_product-search-service_1 ... done Attaching to webstore-services_product-shipping-service_1, webstore-services_product-search-service_1, webstore-services_website-app_1
website-app_1 | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
website-app_1 | AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
website-app_1 | [Fri Mar 13 11:09:16.255235 2020] [mpm_event:notice] [pid 1:tid 140304540900680] AH00489: Apache/2.4.41 (Unix) configured -- resuming normal operations
product-search-service_1 |
product-search-service_1 | . ____ _ __ _ _
product-search-service_1 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
product-search-service_1 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
product-search-service_1 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
product-search-service_1 | ' |____| .__|_| |_|_| |_\__, | / / / /
product-search-service_1 | =========|_|==============|___/=/_/_/_/
product-search-service_1 | :: Spring Boot :: (v2.0.5.RELEASE)
product-shipping-service_1 |
product-shipping-service_1 | . ____ _ __ _ _
product-shipping-service_1 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
product-shipping-service_1 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
product-shipping-service_1 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
product-shipping-service_1 | ' |____| .__|_| |_|_| |_\__, | / / / /
product-shipping-service_1 | =========|_|==============|___/=/_/_/_/
product-shipping-service_1 | :: Spring Boot :: (v2.0.5.RELEASE)
product-search-service_1 |
product-search-service_1 | 2020-03-13 11:09:25.557 INFO 1 --- [ main] product.App : Starting App v0.1.0 on 82a04050f513 with PID 1 (/app/product-search-service-0.1.0.jar started by root in /app)
product-shipping-service_1 |
product-shipping-service_1 | 2020-03-13 11:09:25.743 INFO 1 --- [ main] shipping.App : Starting App v0.1.0 on 21735f5ffb12 with PID 1 (/app/product-shipping-service-0.1.0.jar started by root in /app)
product-search-service_1 | 2020-03-13 11:09:25.607 INFO 1 --- [ main] product.App : No active profile set, falling back to default profiles: default
product-shipping-service_1 | 2020-03-13 11:09:25.800 INFO 1 --- [ main] shipping.App : No active profile set, falling back to default profiles: default
product-search-service_1 | 2020-03-13 11:09:26.461 INFO 1 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3339ad8e: startup date [Fri Mar 13 11:09:26 GMT 2020]; root of context hierarchy
product-shipping-service_1 | 2020-03-13 11:09:26.606 INFO 1 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3c679bde: startup date [Fri Mar 13 11:09:26 GMT 2020]; root of context hierarchy
product-search-service_1 | 2020-03-13 11:09:41.208 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 5000 (http)
product-search-service_1 | 2020-03-13 11:09:41.583 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
product-search-service_1 | 2020-03-13 11:09:41.584 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.34
product-shipping-service_1 | 2020-03-13 11:09:41.540 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 5000 (http)
product-shipping-service_1 | 2020-03-13 11:09:41.914 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
product-shipping-service_1 | 2020-03-13 11:09:41.923 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.34
product-search-service_1 | 2020-03-13 11:09:41.708 INFO 1 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
product-search-service_1 | 2020-03-13 11:09:42.613 INFO 1 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
product-shipping-service_1 | 2020-03-13 11:09:42.043 INFO 1 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
product-shipping-service_1 | 2020-03-13 11:09:42.873 INFO 1 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
product-search-service_1 | 2020-03-13 11:09:42.615 INFO 1 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 16228 ms
product-search-service_1 | 2020-03-13 11:09:43.319 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
product-search-service_1 | 2020-03-13 11:09:43.355 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
product-search-service_1 | 2020-03-13 11:09:43.364 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
product-search-service_1 | 2020-03-13 11:09:43.370 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
product-shipping-service_1 | 2020-03-13 11:09:42.874 INFO 1 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 16315 ms
product-shipping-service_1 | 2020-03-13 11:09:43.471 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
product-shipping-service_1 | 2020-03-13 11:09:43.505 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
product-shipping-service_1 | 2020-03-13 11:09:43.508 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
product-shipping-service_1 | 2020-03-13 11:09:43.517 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
product-search-service_1 | 2020-03-13 11:09:43.371 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
product-shipping-service_1 | 2020-03-13 11:09:43.521 INFO 1 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
product-search-service_1 | 2020-03-13 11:09:44.733 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-shipping-service_1 | 2020-03-13 11:09:44.846 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-search-service_1 | 2020-03-13 11:09:46.595 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3339ad8e: startup date [Fri Mar 13 11:09:26 GMT 2020]; root of context hierarchy
product-shipping-service_1 | 2020-03-13 11:09:46.656 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3c679bde: startup date [Fri Mar 13 11:09:26 GMT 2020]; root of context hierarchy
product-search-service_1 | 2020-03-13 11:09:47.356 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/product]}" onto public product.Product product.ProductController.product(java.lang.String)
product-search-service_1 | 2020-03-13 11:09:47.448 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
product-shipping-service_1 | 2020-03-13 11:09:47.426 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/shipping]}" onto public shipping.Shipping shipping.ShippingController.shipping(long)
product-shipping-service_1 | 2020-03-13 11:09:47.491 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
product-search-service_1 | 2020-03-13 11:09:47.451 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
product-search-service_1 | 2020-03-13 11:09:47.758 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-shipping-service_1 | 2020-03-13 11:09:47.495 INFO 1 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
product-shipping-service_1 | 2020-03-13 11:09:47.773 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-search-service_1 | 2020-03-13 11:09:47.763 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-shipping-service_1 | 2020-03-13 11:09:47.778 INFO 1 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
product-search-service_1 | 2020-03-13 11:09:49.191 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
product-shipping-service_1 | 2020-03-13 11:09:49.232 INFO 1 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
product-shipping-service_1 | 2020-03-13 11:09:49.633 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 5000 (http) with context path ''
product-search-service_1 | 2020-03-13 11:09:49.612 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 5000 (http) with context path ''
我还想指出,我一直在学习本教程,并且我可以确认之前的所有步骤都已正确完成,因为我现在已经多次这样做了
https://cpit490.gitlab.io/labs/lab-8/
当我尝试连接到 127.0.0.1 时,是否可以启用任何日志记录功能以更好地了解发生了什么?
编辑
附上错误截图
编辑 2
网络应用程序的 Dockerfile
FROM httpd:2-alpine
EXPOSE 80
EXPOSE 443
编辑 3
我正在使用 docker 工具箱以防这有什么不同。我没有 win10 专业版或企业版,所以我不得不使用工具箱
最佳答案
所以我想通了这个问题。
因为我在 Win10 home 上运行 Docker Toolbox,所以我的 docker 从 VirtualBox 运行,它有自己的 IP 地址。要连接到我的 webapp,我需要使用 VB 的 IP 而不是我的本地主机。 Win10 home 没有虚拟机管理程序,所以 localhost 基本上被我锁定了:(
关于spring - Docker-compose 拒绝连接到本地主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60669552/
我在这里想做的是将所有连接转发到机器一上端口 3306 上的本地主机到本地主机上端口 3306 上的机器二。因此,如果您连接到机器一上的 mysql,它的行为就像您正在连接一样在二号机器上。 我认为
通过Kibana界面,如何获得 flex IP /主机? 我的意思是,与kibana连接的Elastic主机。 那有可能吗?我在这个上挣扎了好几个小时,却一无所获:( 附:不确定此问题是否是题外话,应
我知道这听起来很奇怪,但我有一个情况,Deno 需要关闭自己的主机(并因此杀死自己的进程)。这可能吗? 我特别需要这个用于 linux (lubuntu),如果相关的话。我想这需要 sudo 权限,这
我知道这听起来很奇怪,但我有一个情况,Deno 需要关闭自己的主机(并因此杀死自己的进程)。这可能吗? 我特别需要这个用于 linux (lubuntu),如果相关的话。我想这需要 sudo 权限,这
我有一个基本问题,但谷歌并没有为我产生很多结果(反正不是英文的)。基本上我想做的就是: 我有一个图形需要用作整个应用程序的持久 header ,例如:我不能让它在新的 Intent 调用时从屏幕上滑出
您好,我正在使用 xampp,我正在尝试使用 php 进行连接。 $sql_connections = mysql_connect("$server, $username, $password")
我目前正在尝试一些多人游戏的想法,并正在尝试创建一个 Java 应用程序来为基于网络浏览器的多人游戏提供服务。 我的开发环境是主机上的Eclipse, native 上的notepad + Googl
今天为大家分享一篇关于SSH 的介绍和使用方法的文章。本文从SSH是什么出发,讲述了SSH的基本用法,之后在远程登录、端口转发等多种场景下进行独立的讲述,希望能对大家有所帮助。 什么是SSH?
我已经完成了在裸机 Centos 7 上运行的测试 Kubernets 主机的设置。这将用作测试系统,因为我们将在 IBM Bluemix Kubernetes 服务中部署所有内容。 从 Bluemi
我正在尝试通过带有 4.2(果冻 bean )的 android 设备“nexus 7”通过 USB 与我的 freeduino 板进行通信,该板类似于 arduino uno。 几个月后,我使用开发
我正在使用 nginx,但在设置反向代理时遇到问题。 我的 nginx.conf 是默认的(没有对其进行任何更改),我的站点可用配置是: upstream backend_hosts { se
我在 projectlocker(免费 svn 主机)上有一个帐户,但我不知道如何将我的项目文件上传到它。 我在我的仪表板中找不到任何选项。 我在我的电脑上使用tortoiseSvn,那么如何上传文件
设置batchSize = 1有意义吗?如果我想一次处理一个文件? 尝试过batchSize = 1000和batchSize = 1 - 似乎具有相同的效果 { "version": "2.0"
我只想知道.. docker中现在有任何可用的工具吗?我已经阅读了Docker中有关多主机功能的一些文档,例如, Docker群 Docker服务(带有副本) 我也知道群模式下的volume问题,容器
我想将文件从 Docker 的容器挂载到我的 docker 主机。 数据卷不是我的解决方案,因为它们是从 docker 主机到 docker 容器的装载,我需要相反的方法。 谢谢 最佳答案 当 doc
我是新手。我无法正确理解RMI。互联网上有大量教程,但据我所知,它们都是针对本地主机的。服务器和客户端都运行在同一台机器上。 我想在任何计算机上运行客户端,并且主机将位于一台计算机上,让我们考虑IP
我无法从客户端“A”SSH 到服务器“B”(但我可以从同一子网上的许多其他 ssh 客户端而不是“A”——所有都是 *nux 机器) serverA>ssh -v -p 端口用户@serverB Op
设置batchSize = 1有意义吗?如果我想一次处理一个文件? 尝试过batchSize = 1000和batchSize = 1 - 似乎具有相同的效果 { "version": "2.0"
由于我不是天生的编码员,请多多包涵。 这是我尝试使用HAproxy来实现的目标,但是经过数小时的检查后,我无法以某种方式使其工作。 从 domain.com/alpha domain.com/beta
我正在使用 tomcat 运行 Java Web 应用程序,通过电子邮件将生成的报告发送给用户。我可以发送电子邮件,但几个小时后服务器停止发送电子邮件,并出现以下错误。 javax.mail.Mess
我是一名优秀的程序员,十分优秀!