without starter run plugin mvn application java spring maven tomcat spring-boot

java - starter - Terminando mvn spring-boot: la ejecución no detiene a tomcat



spring-boot-maven-plugin (12)

Puedo iniciar con éxito el arranque de primavera con mvn spring-boot , la documentation menciona que salir de la aplicación con gracia toca el ctrl-c .

Terminate batch job (Y/N)? Y

El proceso de maven termina pero Tomcat aún se está ejecutando y todavía puedo acceder a la página web. Cuando trato de reiniciar Spring-boot nuevamente, no se puede iniciar Tomcat porque el puerto está en uso.

. ____ _ __ _ _ /// / ___''_ __ _ _(_)_ __ __ _ / / / / ( ( )/___ | ''_ | ''_| | ''_ // _` | / / / / /// ___)| |_)| | | | | || (_| | ) ) ) ) '' |____| .__|_| |_|_| |_/__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.1.0.BUILD-SNAPSHOT) 2014-05-02 12:13:57.666 INFO 6568 --- [ main] Example : Starting Example on challenger with PID 6568 (E:/workspace/SpringBoot/target/cla sses started by steven in E:/workspace/SpringBoot) 2014-05-02 12:13:57.707 INFO 6568 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWeb ApplicationContext@11ecab7c: startup date [Fri May 02 12:13:57 EDT 2014]; root of context hierarchy 2014-05-02 12:13:58.097 INFO 6568 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean ''beanNameViewResolver'': replacing [Root bean : class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfi gure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class pat h resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; laz yInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAuto ConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfig ure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]] 2014-05-02 12:13:58.682 INFO 6568 --- [ main] .t.TomcatEmbeddedServletContainerFactory : Server initialized with port: 8080 2014-05-02 12:13:58.892 INFO 6568 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat 2014-05-02 12:13:58.892 INFO 6568 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/7.0.53 2014-05-02 12:13:58.981 INFO 6568 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2014-05-02 12:13:58.981 INFO 6568 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1277 ms 2014-05-02 12:13:59.453 INFO 6568 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: ''dispatcherServlet'' to [/] 2014-05-02 12:13:59.455 INFO 6568 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: ''hiddenHttpMethodFilter'' to: [/*] 2014-05-02 12:13:59.570 ERROR 6568 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler ["http-nio-8080"] java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:344) at sun.nio.ch.Net.bind(Net.java:336) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:473) at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:647) at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:449) at org.apache.catalina.connector.Connector.startInternal(Connector.java:1007) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:459) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:270) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:145) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:680) at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) at org.springframework.boot.SpringApplication.run(SpringApplication.java:930) at Example.main(Example.java:16) 2014-05-02 12:13:59.571 ERROR 6568 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[org.apache.coyote.http11.Http11NioProtocol- 8080]] org.apache.catalina.LifecycleException: Failed to start component [Connector[org.apache.coyote.http11.Http11NioProtocol-8080]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:459) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:270) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:145) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:680) at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) at org.springframework.boot.SpringApplication.run(SpringApplication.java:930) at Example.main(Example.java:16) Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat"; Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1014) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 18 common frames omitted Caused by: java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:344) at sun.nio.ch.Net.bind(Net.java:336) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:473) at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:647) at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:449) at org.apache.catalina.connector.Connector.startInternal(Connector.java:1007) ... 19 common frames omitted 2014-05-02 12:13:59.572 INFO 6568 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat 2014-05-02 12:13:59.580 INFO 6568 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/E:/workspace/SpringBoot/src/m ain/resources, file:/E:/workspace/SpringBoot/src/main/resources, file:/E:/workspace/SpringBoot/target/classes/, file:/C:/Users/steven/.m2/repository/org/springframework/boot/spring -boot-starter-web/1.1.0.BUILD-SNAPSHOT/spring-boot-starter-web-1.1.0.BUILD-SNAPSHOT.jar, file:/C:/Users/steven/.m2/repository/org/springframework/boot/spring-boot-starter/1.1.0.BUI LD-SNAPSHOT/spring-boot-starter-1.1.0.BUILD-SNAPSHOT.jar, file:/C:/Users/steven/.m2/repository/org/springframework/boot/spring-boot/1.1.0.BUILD-SNAPSHOT/spring-boot-1.1.0.BUILD-SNA PSHOT.jar, file:/C:/Users/steven/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.1.0.BUILD-SNAPSHOT/spring-boot-autoconfigure-1.1.0.BUILD-SNAPSHOT.jar, file:/C: /Users/steven/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.1.0.BUILD-SNAPSHOT/spring-boot-starter-logging-1.1.0.BUILD-SNAPSHOT.jar, file:/C:/Users/steven/. m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar, file:/C:/Users/steven/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar, file:/C:/Users/steven/.m2 /repository/org/slf4j/jul-to-slf4j/1.7.7/jul-to-slf4j-1.7.7.jar, file:/C:/Users/steven/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.7/log4j-over-slf4j-1.7.7.jar, file:/C:/Users/st even/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar, file:/C:/Users/steven/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar, f ile:/C:/Users/steven/.m2/repository/org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar, file:/C:/Users/steven/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.1.0.BUILD -SNAPSHOT/spring-boot-starter-tomcat-1.1.0.BUILD-SNAPSHOT.jar, file:/C:/Users/steven/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.53/tomcat-embed-core-7.0.53.jar, f ile:/C:/Users/steven/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/7.0.53/tomcat-embed-el-7.0.53.jar, file:/C:/Users/steven/.m2/repository/org/apache/tomcat/embed/tomcat-e mbed-logging-juli/7.0.53/tomcat-embed-logging-juli-7.0.53.jar, file:/C:/Users/steven/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar, fi le:/C:/Users/steven/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar, file:/C:/Users/steven/.m2/repository/com/fasterxml/jackson/co re/jackson-core/2.3.3/jackson-core-2.3.3.jar, file:/C:/Users/steven/.m2/repository/org/springframework/spring-web/4.0.3.RELEASE/spring-web-4.0.3.RELEASE.jar, file:/C:/Users/steven/ .m2/repository/org/springframework/spring-aop/4.0.3.RELEASE/spring-aop-4.0.3.RELEASE.jar, file:/C:/Users/steven/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file :/C:/Users/steven/.m2/repository/org/springframework/spring-beans/4.0.3.RELEASE/spring-beans-4.0.3.RELEASE.jar, file:/C:/Users/steven/.m2/repository/org/springframework/spring-cont ext/4.0.3.RELEASE/spring-context-4.0.3.RELEASE.jar, file:/C:/Users/steven/.m2/repository/org/springframework/spring-core/4.0.3.RELEASE/spring-core-4.0.3.RELEASE.jar, file:/C:/Users /steven/.m2/repository/org/springframework/spring-webmvc/4.0.3.RELEASE/spring-webmvc-4.0.3.RELEASE.jar, file:/C:/Users/steven/.m2/repository/org/springframework/spring-expression/4 .0.3.RELEASE/spring-expression-4.0.3.RELEASE.jar] Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedde d.EmbeddedServletContainerException: Unable to start embedded Tomcat at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) [INFO] ------------------------------------------------------------------------ at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) [INFO] BUILD SUCCESS at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:680) [INFO] ------------------------------------------------------------------------ at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [INFO] Total time: 4.653 s at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) at org.springframework.boot.SpringApplication.run(SpringApplication.java:930) at Example.main(Example.java:16) Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat [INFO] Finished at: 2014-05-02T12:13:59-05:00 at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:106) [INFO] Final Memory: 16M/232M [INFO] ------------------------------------------------------------------------ at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:270) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:145) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) ... 7 more Caused by: java.lang.IllegalStateException: Tomcat connector in failed state at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:102) ... 12 more

Para continuar, tengo que terminar manualmente el proceso en ejecución. ¿Es esto un error o me estoy perdiendo algo?


Editar: en ubuntu, usa el comando:

fuser -k 8080/tcp

para matar el proceso Estoy usando spring-boot 1.3.0-Build-snapshot y el problema aún persiste. Mi SO es Ubuntu y el problema ocurre ya sea ejecutando desde Eclipse o desde la consola. La discusión sobre este tema está here . Esto parece ser un problema con las bibliotecas de Spring-boot, al menos con respecto a las bibliotecas de tomcat. También estoy en la línea de esta solución. Lamentablemente, este es el precio que pagamos por tratar de usar tecnologías de vanguardia hasta que maduren.


En IDEA debe detener el proceso antes de ejecutarlo nuevamente. Ese comando apagará Tomcat integrado.


Escriba los siguientes comandos en orden.

$ ps -ef | grep -i java $ kill -9 3361


Eso solo sucede en Windows. here

Actualización: debería arreglarse ahora.


Esta solución funcionó para mí con Spring Boot v1.x y ahora funciona, con v2.x:

hangingJavaProcessToStop=`jps | grep Application | awk ''{print $1}''` echo "hangingJavaProcessToStop: $hangingJavaProcessToStop" kill -9 $hangingJavaProcessToStop

De esta forma, puede eliminar específicamente el proceso Java de la Application Spring Boot en lugar de eliminar todos los procesos Java a la vez. Supongo que si su Spring Boot "Aplicación" (método main que contiene la clase) se llama de manera diferente, debe usar su nombre en lugar de la Application .

Estoy ejecutando el fragmento anterior, en mi máquina con Windows usando WSL / Debian . No estoy usando la línea de comandos de PowerShell o Windows.


Esto es lo que hago en Mac:

kill `lsof -i -n -P | grep TCP | grep 8080 | tr -s " " "/n" | sed -n 2p`

Encuentra el PID usando 8080 y lo mata.


He tenido este problema al ejecutar la aplicación de arranque de primavera desde netbeans 8.1 en Mac. El proceso de java no finalizó cuando presioné el botón de cuadrado rojo en netbeans, así que cuando relancé la aplicación, siempre obtengo la excepción de "agéndeme, adress ya en uso". Este es un error conocido.

La solución fue agregar spring-boot: ejecutar comando para ejecutar los objetivos del proyecto ...

... y también si obtiene " No se encontró ningún complemento para el prefijo ''spring-boot'' en el proyecto actual y en los grupos de complementos ", puede que necesite agregar esto a las dependencias:

<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.5.RELEASE</version> </parent> <repositories> <repository> <id>spring-releases</id> <url>https://repo.spring.io/libs-release</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>spring-releases</id> <url>https://repo.spring.io/libs-release</url> </pluginRepository> </pluginRepositories>


Me encontré con el mismo problema al ejecutar la aplicación SpringBoot en eclipse en Mac. De forma manual tuve que encontrar todos los PID usando 8080 y matarlos. Pero, afortunadamente, me di cuenta de que podemos matar esa instancia de tomcat directamente desde la vista de "consola" del eclipse, presionando el botón de detener (icono de cuadrado rojo) y ejecutar nuevamente la aplicación de inicio de primavera.


Para aquellos que usan Eclipse, esta es de lejos la mejor respuesta:

Abra "configuraciones de ejecución", edite el lanzamiento de experto que definió para su proyecto, y debajo de la pestaña "JRE", agregue -Dfork = falso al área de texto de argumentos de VM.

Luego, cuando presione el botón rojo de detención, el servidor Tomcat se detendrá y sus puertos se liberarán.

La respuesta viene de una publicación aquí en Github por jordihs



Todavía me pasa en la versión 1.1.9 ejecutándose en Windows 7.

Entonces, después de presionar Ctrl C. La forma más rápida de matar al fondo será Java.

Encuentra el PID java

c:/>netstat -ano | find "8080" TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1196 TCP [::]:8080 [::]:0 LISTENING 1196 c:/>taskkill /F /PID 1196 SUCCESS: The process with PID 1196 has been terminated.

Supongo que en el ejemplo anterior está ejecutando en http puerto 8080


Usted causa un apagado al llamar a curl -v -X POST http://127.0.0.1:8091/shutdown siempre que haya configurado Spring-boot correctamente.

Para respaldar esto, deberá actualizar las propiedades de su aplicación. Esto se describe parcialmente en https://.com/a/26563344/58794 .

actualizando application.yml agregando:

management: security: enabled: false endpoints: shutdown: enabled: true

o actualizando application.properties agregando:

management.security.enabled=false endpoints.shutdown.enabled=true

Una vez llamado

$ curl -v -X POST http://127.0.0.1:8091/shutdown * STATE: INIT => CONNECT handle 0x600057990; line 1423 (connection #-5000) * Added connection 0. The cache now contains 1 members * Trying 127.0.0.1... * TCP_NODELAY set * STATE: CONNECT => WAITCONNECT handle 0x600057990; line 1475 (connection #0) * Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0) * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057990; line 1592 (connection #0) * Marked for [keep alive]: HTTP default * STATE: SENDPROTOCONNECT => DO handle 0x600057990; line 1610 (connection #0) > POST /shutdown HTTP/1.1 > Host: 127.0.0.1:8091 > User-Agent: curl/7.56.1 > Accept: */* > * STATE: DO => DO_DONE handle 0x600057990; line 1689 (connection #0) * STATE: DO_DONE => WAITPERFORM handle 0x600057990; line 1814 (connection #0) * STATE: WAITPERFORM => PERFORM handle 0x600057990; line 1824 (connection #0) * HTTP 1.1 or later with persistent connection, pipelining supported < HTTP/1.1 200 < X-Application-Context: application:h2:8091 < Content-Type: application/vnd.spring-boot.actuator.v1+json;charset=UTF-8 < Transfer-Encoding: chunked < Date: Fri, 22 Dec 2017 07:01:04 GMT < * STATE: PERFORM => DONE handle 0x600057990; line 1993 (connection #0) * multi_done * Connection #0 to host 127.0.0.1 left intact * Expire cleared {"message":"Shutting down, bye..."}

el contenedor se apagará

o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0 o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit ''default''

pero si se lanzó desde mvn spring-boot:run es probable que obtenga un:

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 35.613 s [INFO] Finished at: 2017-12-22T02:01:05-05:00 [INFO] Final Memory: 25M/577M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.7.RELEASE:run (default-cli) on project PROJECTNAME: Could not exec java: Application finished with exit code: 1 -> [Help 1]

Si no tiene management.security.enabled=false es posible que se le presente el siguiente error:

$ curl -v -X POST http://127.0.0.1:8091/shutdown > POST /shutdown HTTP/1.1 > Host: 127.0.0.1:8091 > User-Agent: curl/7.56.1 > Accept: */* > < HTTP/1.1 401 < X-Application-Context: application:h2:8091 < Content-Type: application/vnd.spring-boot.actuator.v1+json;charset=UTF-8 < Transfer-Encoding: chunked < Date: Fri, 22 Dec 2017 06:56:19 GMT < {"timestamp":1513925779265,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/shutdown"}

Si no tiene endpoints.shutdown.enabled=true , verá:

$ curl -v -X POST http://127.0.0.1:8091/shutdown > POST /shutdown HTTP/1.1 > Host: 127.0.0.1:8091 > User-Agent: curl/7.56.1 > Accept: */* > < HTTP/1.1 404 < X-Application-Context: application:h2:8091 < Content-Type: application/json;charset=UTF-8 < Transfer-Encoding: chunked < Date: Fri, 22 Dec 2017 06:58:52 GMT < {"timestamp":1513925932345,"status":404,"error":"Not Found","message":"No message available","path":"/shutdown"}

Si prueba un GET en lugar de POST, se presentará este error:

$ curl -v http://127.0.0.1:8091/shutdown > GET /shutdown HTTP/1.1 > Host: 127.0.0.1:8091 > User-Agent: curl/7.56.1 > Accept: */* > < HTTP/1.1 405 < X-Application-Context: application:h2:8091 < Allow: POST < Content-Type: application/json;charset=UTF-8 < Transfer-Encoding: chunked < Date: Fri, 22 Dec 2017 06:54:12 GMT < {"timestamp":1513925652827,"status":405,"error":"Method Not Allowed","exception":"org.springframework.web.HttpRequestMethodNotSupportedException","message":"Request method ''GET'' not supported","path":"/shutdown"}