Deploying Java Spring Boot Application to Azure Web App Linux - java

I struggle since 3 days with deprecated tutorials and not even working Microsoft docs.
After the Microsoft Docs did not really help me I tried to do the following:
Using the IntelliJ CE Plugin for Azure I try to deploy this demo
to Azure App Service.
From the plugin I chose "Run on Web App", which succeeds as:
Stopping Web App...
Getting Deployment Credential...
Connecting to FTP server...
Removing from FTP server: /site/wwwroot/webapps/TodoDemo-0.0.1-SNAPSHOT
Uploading artifact to: /site/wwwroot/webapps/TodoDemo-0.0.1-SNAPSHOT.war ...
Uploading successfully...
Logging out of FTP server...
Starting Web App...
Deploy successfully!
URL: https://**********.azurewebsites.net/TodoDemo-0.0.1-SNAPSHOT
Then, clicking the link "URL" I end up at:
What step am I missing?
Here some more info about the environment:
I did not change any other setting from the out-of-the-box Web App.
PS: If I deploy the same WAR to a VM on Azure, everything works fine. Happy to provide more info if necessary.

In the meantime I managed to get it to run and wrote a Medium story about my struggles and learning.
https://medium.com/#dmnkmyr/java-web-apps-on-azure-the-hunt-for-up-to-date-documentation-730e5cbabd45
Also during that time MS seems to have worked on it and there is docs now. I put them here and in Medium.
https://learn.microsoft.com/en-us/java/api/overview/azure/maven/docs/web-app-samples?view=azure-java-stable
Good look everyone

Related

No webpage was found for the web address: http://localhost:8080 in spring

I have my apps running on java spring.
After i start the tomcat in eclipse, it runs well
But after certain minutes +- 30 minutes. It shows "This localhost page can’t be found
No webpage was found for the web address: http://localhost:8080/testadmin/Dashboard"
if i try http://localhost:8080/testadmin (it calls index.jsp), it shows the web. But function inside of index.jsp that call another controller function show 404 in the network console.
If i restart eclipse tomcat. The web runs well again. Is there any missing things on it ?
That type of problem I mostly found in eclipse so you can only clean the eclipse cache then it's gonna work fine but now I switched to IntelliJ now it's fine.

Azure, default "Hey, Java developers!" welcome page after successfully deployment

After succesfully deployment via Github repo of my Spring boot Application in Azure's App Service i have still "Hey java developers!" page, i tried do this via Github and Github Actions, Github and Kudu, FTP, but result is allways the same. I'm out of ideas.
UPDATE
Today, I try again. I disconnect connection. And try to reconnect, I saw build area like below.
After Action completed, it works.
So I suggest you disconnect and reconnect to solve the problem.
PRIVIOUS
According to your description, I personally tested one side and your problem reappeared.
My troubleshooting steps:
First create a default page for webapp. (Under windows, it fails, indicating that this is not).
Deploy the webapp under linux and find that everything is normal.
From the Action on github, it was found that there should be a problem with the build in the deployment under windows.
In conclusion:
It is recommended to use linux to deploy webapp. As for the deployment failure under windows, it is recommended to raise a support ticket for help.
My test result.
Under Linux, after build action, we can see app.jar file under wwwroot folder.
I also move it to windows webapp, it doesn't work.

How do I get Apache and tomcat docker containers to talk to each other?

I am a total newb at this and I want to learn. I have a webapp running in a docker container currently on Ubuntu 16.04TLS. I can connect to it over the Internet and it works fine. I want to run an Apache frontend in a separate container and enable SSL. I worked on this for 8 hours today and I know I was close. I had to restore the VM in the end so i could put the webapp back online.
I followed this tutorial https://medium.com/#jmarhee/running-multiple-web-applications-on-a-docker-host-with-apache-85f673f02803 and was successful at being able to connect to Apache (I got the default home page with the install) but was unable to get Apache to proxy for Tomcat. I got a 503 error when I enabled the proxy pass through. I am all about reading if you folks are good with pointing me in the right direction. Since I want to learn, I may come back with more questions. I did read another article http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach but I did not understand how to apply it to my situation.
TIA for any help you can provide me with.

Azure web api with java

[Update: Problem Solved, Clear solution unable to be achieved. More information in comments]
I am new to azure and I am attempting to create a API Application following the tutorial found here https://azure.microsoft.com/en-us/documentation/articles/app-service-api-java-api-app/
Everything works fine on the local machine but when I attempt to push it to the live site and do a Postman request for http://talkapi.azurewebsites.net/api/contacts/2 I get resource not available.
I don't know what bugging tools I have and where to start. I was wondering if anyone had some advice on where to start debugging or what the problem is.
According to the tuturial and per my experience, it seems that the issue of 404 not found was caused by the incorrect deployment on Azure.
Please access the link https://talkapi.scm.azurewebsites.net/DebugConsole the Kudu tool of your API App and move to the path D:\home\site\wwwroot\webapps, then you will see the fig below.
Try to drag your ROOT.war file and drop here (\webapps), and tomcat will auto-decompress the war file and replace the directory ROOT, then you can try to request the api http://talkapi.azurewebsites.net/api/contacts/2 again.
Kudu is the engine behind git deployments in Azure Web Sites includes Azure API App, you can see more detals at https://github.com/projectkudu/kudu/wiki.
Hope it helps. Any update, please feel free to let me know.

Playframework 2.1.1 deploy on production server

What steps should I take to correctly deploy Playframework 2.1.1 website on production server?
More specific questions:
1) Should I install Play on my production server?
2) Locally it is clear to use play run but in production I need to run it 24/7 and restart it again if server has been restarted. How this works? Some outostart or something?
3) How to deploy it on Ubuntu 12.04(Apache2) server on mydomain.com(port 80)?
4) What configuration settings should I change/add for production to disable debug etc.?
I would really appreciate information about default deployment workflow for Playframework 2.1.1
First create a deployable version of your project using play clean compile dist.
The documentation recommends play clean compile stage but the dist command generates a nice ZIP file and does basically the same things.
You then load that file onto your server and extract it to the desired folder. Now start the Play server with the start file Play created for you.
Play defaults to TCP port 9000 as it does in debug mode but you can change that by using the option -Dhttp.port=80. Listening on a specific IP address can be done via -Dhttp.address=127.0.0.1.
But the thing I do is using an nginx as a reverse proxy to control things link GZIP compression and to listen on a specific hostname. Just search the web for more details about reverse proxies.
You should have an own configuration file for your production use because you need to turn off evolutions, change the database server, and maybe some other stuff you added during development. More about the production configuration can be found in the docs.

Categories