The latest version currently released (as of 12/13/2016) is Spring Boot 1.4.2.RELEASE, and the default is 8.5.6 for Tomcat. You can easily change the version of Tomcat by creating a project via SPRING INITIALIZR.
If you are using Maven as your build tool, just specify the version in the properties as shown below.
<properties>
<!-- ... -->
<tomcat.version>8.5.8</tomcat.version>
</properties>
For the time being ... Tomcat won't start if you use the default port number (8080): scream:
The content of the error is "Address already in use". In a sense, it's a common error that you may encounter when you're touching multiple Spring Boot applications at the same time and they're still running.
...
2016-12-11 03:12:06.364 ERROR 20786 --- [ main] o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler [http-nio-8080]
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_102]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_102]
...
But this time, no other app is running and there is no zombie process ...
I won't go into the details, but when I use the built-in Tomcat 8.5.8 on Spring Boot, I accidentally create two Connector
s on Tomcat. By default, both use the 8080 port, so "Address already in use" appears ...
As a trial ... Try changing the server port number to 18080 using the Spring Boot properties ...
server.port=18080
The following log will be output and the server will start.
...
2016-12-11 03:15:39.717 INFO 20842 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http) 18080 (http)
2016-12-11 03:15:39.721 INFO 20842 --- [ main] com.example.Tomcat858DemoApplication : Started Tomcat858DemoApplication in 2.639 seconds (JVM running for 3.076)
It starts, but ... 8080 (Connector made by Tomcat) and 18080 (Connector made by Spring Boot) start Tomcat that waits for a request: tired_face:
Andy Wilkinson of Spring Boot's Core Committer, a Project Member of the Spring Project, reported a bug! !!
The content is the same as the one introduced here, but since the issue is made on the Spring Boot side, I will post a link.
Well, I think it's better to use Tomcat 8.5.6 obediently. If for some reason you need to use a higher version instead of 8.5.6 ... try 8.5.9. For the time being, I started it: sweat_smile: I haven't seen the cause, but when I raised it to 8.5.9 and publicized it, an error occurred in the Spring Boot test, so even with 8.5.9, there may be some things that do not go well when combined with Spring Boot. Hmm.
Unless you have a specific reason, just use Tomcat, which depends on your Spring Boot. At the very least, it must be a proven version that has been used in past Spring Boot release versions ... You should be aware that you are at increased risk of encountering fatal malfunctions.
Recommended Posts