2

I have deployed my simple webapp on Springboot Rest and deployed it on azure cloud successfully just like my other webapps.

But I am getting HTTP Status 404 – Not Found when I hit the azure URL of my webapp.

The status of webapp on azure is showing as "Running" but still I am getting 404.

Please note that, the application running perfectly on my local machine but not on azure.

Below are the error message details,

"HTTP Status 404 – Not Found Type Status Report Message / Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/8.5.41"

And below is my azure maven plugin configuration I used in my application,

<groupId>com.microsoft.azure</groupId>

If someone check and assist me on this would be so helpful.

Thanks in advance.

Adam
  • 2,726
  • 1
  • 9
  • 22

3 Answers3

0

Without knowing how you performed your deployment. I am going to assume that you didn't deploy a WAR file to the webapps folder. If you just copied the files over Tomcat will not automatically load those like it will for a WAR file. Restart the Tomcat server and see if your app gets loaded and starts working.

Jamie
  • 3,094
  • 1
  • 18
  • 28
  • Hi Jamie, It's not the first time that I am doing azure deployment, I have done it many times for my official use but not with my personal id. I do not need to copy war file to tomcat, I just use maven plugin for azure and It should do the deployment for me as It did for another azure webapps which I did on my official azure account. But this time, for some reason I am not getting proper response from azure webapp url. So ur assist me if u know on this. – Satish Kumbari Jun 14 '19 at 04:16
0

After tirelessly searching on the internet this is what I did which worked out perfectly I got my ftp credentials from azure and used filezilla to upload my jar file to wwwroot folder. It is important to rename your jar file to app.jar. You can see more information here https://learn.microsoft.com/en-us/azure/app-service/containers/configure-language-java#starting-jar-apps.

Also to run SpringBoot on App Service Linux, you should use the Java SE offering and not Tomcat which your site is configured to.

Please check the following tutorial:

https://learn.microsoft.com/en-us/java/azure/spring-framework/deploy-spring-boot-java-app-with-maven-plugin?view=azure-java-stable

e.g OS Linux

javaVersion jre8

runtimeStack jre8

You can configure this at the Settings ,configuration and general settings on the azure portal.

I hope this helps someone...

Antonio
  • 151
  • 1
  • 6
0

You need to configure your azure app service to use Java web server: Java SE (Embedded Web Server)

Your configuration should look like this:

You configuration should looklike this

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83