{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4064","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4064/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4064/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4064/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4064","id":109139387,"number":4064,"title":"Context start failed but APPLI could still in status start up and not enough log details for errors","user":{"login":"zbi","id":5686266,"avatar_url":"https://avatars.githubusercontent.com/u/5686266?v=3","gravatar_id":"","url":"https://api.github.com/users/zbi","html_url":"https://github.com/zbi","followers_url":"https://api.github.com/users/zbi/followers","following_url":"https://api.github.com/users/zbi/following{/other_user}","gists_url":"https://api.github.com/users/zbi/gists{/gist_id}","starred_url":"https://api.github.com/users/zbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbi/subscriptions","organizations_url":"https://api.github.com/users/zbi/orgs","repos_url":"https://api.github.com/users/zbi/repos","events_url":"https://api.github.com/users/zbi/events{/privacy}","received_events_url":"https://api.github.com/users/zbi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/46","html_url":"https://github.com/spring-projects/spring-boot/milestones/1.3.0.RC1","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/46/labels","id":1272991,"number":46,"title":"1.3.0.RC1","description":"","creator":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":90,"state":"open","created_at":"2015-08-26T08:18:13Z","updated_at":"2015-10-07T09:30:26Z","due_on":"2015-10-13T23:00:00Z","closed_at":null},"comments":9,"created_at":"2015-09-30T17:19:45Z","updated_at":"2015-10-07T15:00:23Z","closed_at":null,"body":"Hello,\r\n\r\nIn our project, there is a cause which block the start context of spring boot. We could not access to `/health`. But the spring boot application still started with status ok.\r\n\r\nIt miss really a lot of details in the log. In our case, we could only see \r\n\r\n```\r\n\"2015-09-30 13:53:57.925  WARN[main] --- .s.b.a.a.EndpointWebMvcAutoConfiguration - Could not start embedded container (management endpoints are still available through JMX) \"\r\n```\r\n\r\nThe message is logged when a `EmbeddedServletContainerException` happens and there is a comment \t in the code      \r\n\r\n```java\r\n// No support currently for deploying a war with management.port=<different>,\r\n// and this is the signature of that happening\r\n```\r\n\r\nWith this, we could not make the analysis more further because we don't even know the exception is thrown by which class. Also It is even with \"WARN\" but not \"ERROR\".\r\n\r\nCould you please \r\n1. make the log level correct and have more details when there are some errors ?\r\n2. Throw an exception when the context could not start and stop the start processing? If not, it would confuse the user and more than more no one will believe the message.\r\n\r\nPlease tell me if you need more message and I really appreciate if some of you could explain also the message \" No support currently for deploying a war with management.port=<different> \"\r\n\r\nThanks in advance,\r\n\r\nZhuhan\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/146221985","html_url":"https://github.com/spring-projects/spring-boot/issues/4064#issuecomment-146221985","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4064","id":146221985,"user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars.githubusercontent.com/u/914682?v=3","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T15:00:22Z","updated_at":"2015-10-07T15:00:22Z","body":"@philwebb `ServletComponentRegisteringPostProcessor` uses this logic to detect an embedded container:\r\n\r\n```\r\n\tprivate boolean isRunningInEmbeddedContainer() {\r\n\t\treturn this.applicationContext instanceof EmbeddedWebApplicationContext\r\n\t\t\t\t&& ((EmbeddedWebApplicationContext) this.applicationContext)\r\n\t\t\t\t\t\t.getServletContext() == null;\r\n\t}\r\n```\r\n\r\nIt relies on running during initialisation at which point the servlet context won't have been set in the embedded case."}}