2017-11-08 1 views
1

Die Schaffung des Docker Behälter wird mit diesem Befehl gemacht:Problem mit Webseite zugreift (Hochgeladen am Wildfly)

docker run -p 8080:8080 -p 9990:9990 --name wildfly -d -it jboss/wildfly `/opt/jboss/wildfly/bin/standalone.sh -bmanagement 0.0.0.0` 

Wenn ich den Docker Container bin ich die Schaffung einer WAR-Datei durch die Admin-Seite bin Hochladen auf die ich unter port 9990 zugreifen kann. Wie Sie aus der Protokolldatei sehen können, endet der Upload der WAR-Datei erfolgreich und der Kontextpfad ist /TestProject, aber wenn ich versuche, auf den Browser zuzugreifen (http://localhost:8080/TestProject/.../), wird die Nachricht, die ich erhalte, "This page isn’t working". Die WAR-Datei wurde bei lokal installierter Wildfly getestet und es funktioniert.

Log-Datei:

12:24:01,974 WARN [org.jboss.as.ee] (MSC service thread 1-1) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause) 
12:24:02,135 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final 
12:24:02,464 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started client-mappings cache from ejb container 
12:24:02,580 INFO [io.undertow.servlet] (ServerService Thread Pool -- 66) 2 Spring WebApplicationInitializers detected on classpath 
12:24:03,175 INFO [stdout] (ServerService Thread Pool -- 66) 
12:24:03,176 INFO [stdout] (ServerService Thread Pool -- 66) . ____   _   __ _ _ 
12:24:03,176 INFO [stdout] (ServerService Thread Pool -- 66) /\\/___'_ __ _ _(_)_ __ __ _ \ \ \ \ 
12:24:03,176 INFO [stdout] (ServerService Thread Pool -- 66) (()\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 
12:24:03,176 INFO [stdout] (ServerService Thread Pool -- 66) \\/ ___)| |_)| | | | | || (_| | )))) 
12:24:03,177 INFO [stdout] (ServerService Thread Pool -- 66) ' |____| .__|_| |_|_| |_\__, |//// 
12:24:03,177 INFO [stdout] (ServerService Thread Pool -- 66) =========|_|==============|___/=/_/_/_/ 
12:24:03,179 INFO [stdout] (ServerService Thread Pool -- 66) :: Spring Boot ::  (v1.4.2.RELEASE) 
12:24:03,180 INFO [stdout] (ServerService Thread Pool -- 66) 
12:24:03,252 INFO [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) Starting TestProjectApplication on 18aafab37ce1 with PID 53 (started by jboss in /opt/jboss) 
12:24:03,253 INFO [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) No active profile set, falling back to default profiles: default 
12:24:03,296 INFO [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 66) Refreshing org.springframework.boot[email protected]4750038e: startup date [Wed Nov 08 12:24:03 UTC 2017]; root of context hierarchy 
12:24:04,106 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (ServerService Thread Pool -- 66) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
12:24:04,134 INFO [io.undertow.servlet] (ServerService Thread Pool -- 66) Initializing Spring embedded WebApplicationContext 
12:24:04,135 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 66) Root WebApplicationContext: initialization completed in 840 ms 
12:24:04,581 INFO [org.springframework.boot.web.servlet.ServletRegistrationBean] (ServerService Thread Pool -- 66) Mapping servlet: 'dispatcherServlet' to [/] 
12:24:04,585 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'errorPageFilter' to: [/*] 
12:24:04,588 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'characterEncodingFilter' to: [/*] 
12:24:04,588 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 
12:24:04,589 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'httpPutFormContentFilter' to: [/*] 
12:24:04,589 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 66) Mapping filter: 'requestContextFilter' to: [/*] 
12:24:04,766 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] (ServerService Thread Pool -- 66) Looking for @ControllerAdvice: org.springframework.boot[email protected]4750038e: startup date [Wed Nov 08 12:24:03 UTC 2017]; root of context hierarchy 
12:24:04,808 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/hello]}" onto public java.lang.String com.musala.test.project.TestController.test() 
12:24:04,813 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 
12:24:04,813 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 66) Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 
12:24:04,853 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
12:24:04,853 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
12:24:04,877 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 66) Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 
12:24:04,986 INFO [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] (ServerService Thread Pool -- 66) Registering beans for JMX exposure on startup 
12:24:04,997 INFO [com.musala.test.project.TestProjectApplication] (ServerService Thread Pool -- 66) Started TestProjectApplication in 2.33 seconds (JVM running for 1132.907) 
12:24:05,044 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 66) Initializing Mojarra 2.2.13.SP4 for context '/TestProject' 
12:24:05,911 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: '/TestProject' for server 'default-server' 
12:24:05,986 INFO [org.jboss.as.server] (External Management Request Threads -- 6) WFLYSRV0010: Deployed "TestProject.war" (runtime-name : "TestProject.war") 

Erstellt Docker Behälter (die zeigen, dass die Ports geöffnet sind) Created docker container Jede Hilfe wäre sehr willkommen!

+0

Was die Protokolle sagen, nachdem Sie versuchen, auf die Seite zuzugreifen? "Diese Seite funktioniert nicht" sieht nicht wie eine Standardnachricht aus, kommt sie von der App oder vom Server? –

+0

Es kommt direkt aus dem Browser, es erreicht weder den Server noch die App –

+0

Sind Sie sicher, dass die App 8080 im Container verwendet? Versuchen Sie, sich über ssh mit dem Container zu verbinden und überprüfen Sie die App über 'curl' von der Innenseite des Containers. –

Antwort

2

Das Problem besteht darin, den Container auszuführen. Versuchen Sie, den Zugriff auf die App von allen Schnittstellen:

docker run -p 8080:8080 -p 9990:9990 --name wildfly -d -it jboss/wildfly `/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0` 

Das einzige, was Sie war fehlten: -b 0.0.0.0

+0

Danke, es hat perfekt funktioniert –

Verwandte Themen