title: embedded tomcat not starting in Spring boot even after port change
body: <p>Embedded Tomcat is not starting in spring boot application. I have tried reading all the solutions related to changing port number. i tried all those still it is giving me same error. I have even tried giving port number as 0 still no help. I have added liquibase dependency as well for that i have created a dummy log file. But i guess thats not causing the problem. I tried other Spring boot projects too still facing same issue.</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
          &lt;groupId&gt;com.springboot.ashish&lt;/groupId&gt;
          &lt;artifactId&gt;springbootdemo&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
  
          &lt;name&gt;springbootdemo&lt;/name&gt;
          &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
          &lt;parent&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
              &lt;version&gt;1.5.9.RELEASE&lt;/version&gt;
              &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
          &lt;/parent&gt;
  
          &lt;properties&gt;
              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
              &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
              &lt;java.version&gt;1.8&lt;/java.version&gt;
              &lt;spring-cloud.version&gt;Edgware.SR1&lt;/spring-cloud.version&gt;
          &lt;/properties&gt;
  
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-actuator-docs&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-aop&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.liquibase&lt;/groupId&gt;
                  &lt;artifactId&gt;liquibase-core&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-social-facebook&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.h2database&lt;/groupId&gt;
                  &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;mysql&lt;/groupId&gt;
                  &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
                  &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
          &lt;/dependencies&gt;
      &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
  
  
      &lt;/project&gt;
  </code></pre>
  
  <p>Stack Trace : </p>
  
  <pre><code>2018-01-23 11:34:29.820  INFO 10432 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0
  2018-01-23 11:34:29.961 DEBUG 10432 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Looking for resource handler mappings
  2018-01-23 11:34:29.961 DEBUG 10432 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**/favicon.ico", locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], class path resource []], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@37e64e37]
  2018-01-23 11:34:29.961 DEBUG 10432 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/webjars/**", locations=[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@31204303]
  2018-01-23 11:34:29.961 DEBUG 10432 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/**", locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@369fb99a]
  2018-01-23 11:34:29.961 DEBUG 10432 --- [           main] o.s.w.s.resource.ResourceUrlProvider     : Found resource handler mapping: URL pattern="/docs/**", locations=[class path resource [META-INF/resources/spring-boot-actuator/docs/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@81a8898]
  2018-01-23 11:34:51.050 ERROR 10432 --- [           main] o.a.coyote.http11.Http11NioProtocol      : Failed to start end point associated with ProtocolHandler ["http-nio-8056"]
  
  java.io.IOException: Unable to establish loopback connection
      at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_121]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl.&lt;init&gt;(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.Pipe.open(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.WindowsSelectorImpl.&lt;init&gt;(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.Selector.open(Unknown Source) ~[na:1.8.0_121]
      at org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector(NioSelectorPool.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.NioSelectorPool.open(NioSelectorPool.java:130) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) [tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) [tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) [spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at com.springboot.ashish.springbootdemo.SpringbootdemoApplication.main(SpringbootdemoApplication.java:23) [classes/:na]
  Caused by: java.net.ConnectException: Connection timed out: connect
      at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_121]
      at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.SocketChannel.open(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(Unknown Source) ~[na:1.8.0_121]
      ... 29 common frames omitted
  
  2018-01-23 11:34:51.052 ERROR 10432 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-8056]]
  
  org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8056]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) [spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
      at com.springboot.ashish.springbootdemo.SpringbootdemoApplication.main(SpringbootdemoApplication.java:23) [classes/:na]
  Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat";  Protocol handler start failed
      at org.apache.catalina.connector.Connector.startInternal(Connector.java:1031) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      ... 13 common frames omitted
  Caused by: java.io.IOException: Unable to establish loopback connection
      at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) ~[na:1.8.0_121]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl.&lt;init&gt;(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.Pipe.open(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.WindowsSelectorImpl.&lt;init&gt;(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.Selector.open(Unknown Source) ~[na:1.8.0_121]
      at org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector(NioSelectorPool.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.NioSelectorPool.open(NioSelectorPool.java:130) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      ... 14 common frames omitted
  Caused by: java.net.ConnectException: Connection timed out: connect
      at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_121]
      at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[na:1.8.0_121]
      at java.nio.channels.SocketChannel.open(Unknown Source) ~[na:1.8.0_121]
      at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(Unknown Source) ~[na:1.8.0_121]
      ... 29 common frames omitted
  
  2018-01-23 11:34:51.069  INFO 10432 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2018-01-23 11:34:51.084  INFO 10432 --- [           main] utoConfigurationReportLoggingInitializer : 
  
  Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
  2018-01-23 11:34:51.100 ERROR 10432 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  The Tomcat connector configured to listen on port 8056 failed to start. The port may already be in use or the connector may be misconfigured.
  Action:
  
  
  Verify the connector's configuration, identify and stop any process that's listening on port 8056, or configure this application to listen on another port.
  </code></pre>