Advice on how to handle logs with Azure App Service Linux - java

So I've got a few applications run in Azure App Service. Most importantly I've got an executable jar running the majority of the application code. It is currently running as an app service with the Java 11 stack - I have deployed the jar file using Azure Devops and Azure will run this jar within its java 11 container.
The problem I have at the moment is with the application logs. I used to able to ssh onto the vm running the code and check the tomcat logs (before moving to azure app service). I also had ELK installed on the vm although a lot of the time I would just prefer to ssh on and grep and view the logs straight from the vm.
Now all I can do is access the log stream. This will stream the logs as they come out but if I want to search for an error from yesterday I am unable to do so. I've contacted microsoft support who haven't been very helpful so far. I've tried using application insights but I'm not sure how this allows me to better view my logs.
Clicking he application logging tab doesn't allow me to do much - I think it has more features for windows app.s
What I'm ideally looking for is maybe a way to mount a storage account and write the logs there? Or some simple log analytics would do which would enable me to view the logs from the day before or search them. Anyone able to recommend what they do in this situation?
Thanks

Yes, it is as simple as the doc mentioned. Just deploy this jar as well and then point to this agent in the jvm args.
Please let me know if you have any issues.

Related

what to use for web application that finds out information about windows/mac

I am a java beginner, looking for pointers to go about writing a web application that would
get downloaded from a internal server,
reads the system information like, OS, antivirus status - on Mac / Windows
generates a report for the user to view
from what i understand this could be done using applets. I learnt that applets are not supported any longer. so any pointers in the right direction would be very helpful
First thing first. You need to understand difference in between Web Application and Desktop application.
You should look for desktop application, which can read data from installed computer and send data using API and API will save that data in some DB and then you can generate reports from it.
In JAVA you can create a executable JAR to do some job on user's computer.

How to make an offline java application available online?

I have developed an offline java application and i would like to host it online in internet. I am not sure how to adapt my code as an webapplication. How to adapt html css to my code? (as i already have GUI). thanks.
Not able to find the right example or how tos on internet
You can use some cloud services to run your application, for example you can use AWS (aws.amazon.com/cloud‎).
Steps you need to perform:
register your account there;
add credit card (it's gonna take like a few dollars from that);
install application container (like tomcat);
deploy your application to tomcat server (for example);
run tomcat (for example).
That's all, enjoy your application online.

JNLP downloading multiple times

I am developing a web start application. I am just exploring now and a small POC i developed works well barring one problem. A fresh download of the jnlp file is triggered every time the application is launched. I am serving the app from a local installation of tomcat. Also i haven't signed the app. Could any of these two reasons be a possible cause behind the multiple downloads?
The problem with multiple downloads was that it looked bad in terms of user experience. This can be overcome by using jnlp:// instead of http:// .
Previously : http ://address_of_my_jnlp_file/fileName.jnlp
Now : jnlp://address_of_my_jnlp_file/fileName.jnlp
The browser automatically detects that the download is a WebStart application and delegates it to the local JRE which downloads and runs it directly without triggering a browser download.

Netbeans Java web app deployment to web host

I have created a java web application in netbeans using a glassfish server and mySql database.
The web application is working correctly in my local environment and now i want to deploy to my host name which ive purchase from 1and1. Ive transfer my Web folder to my host name via FTP but im literally stuck now.
I know i have to somehow add the glassfish server to that host name but i dont how to do this.
can anyone help me please.
thanks in advance
Basically if you a remote control it is not a big deal.
basic steps would be
- install mysql
- install jdk
- install glassfish
Assuming you have a *nix based server.
Here you can find steps related to GF3 installation. However I do not like the way GF installation described there. Moreover I do not think you are going to have X environment on your server. So if you need to install GF3 you can follow installation for JDK and install GF3 from a zip file. The process is described in the the installation tutorial for GF4. It would be the same for GF3. There also you may find instructions how to install JDK7. At least one important step is missing in that tutorial however. If you do all the steps from that tutorial, your GF instance would not start when OS is restarted. You can find how to fix this in the official documentation. There you can find how you can configure your GF to start as a service. The steps are the same for v3 and v4.
Basically I provided the first two links because of additional information like how to enable WEB console for remote access. You cannot access it right after installation. You have to enable it by changing admin's password and.. but you find the description there.
You can find many blogs tutorials even videos if you google a bit. Tutorial for ubuntu more informative from my point. Many steps are not specific for ubuntu and could be reused for other distributions.
More thoughts about where and how to install GF here on stackoverflow
Just in case couple of links for mysql 5 installation
official documentation
tutorial for different distributions
Just in case. You can use putty for remote access. If your server is configured to allow this, you would be able to connect. You may want to ask support team to clarify it.
For windows it is even simpler
you can download an installer from here for GF4 of from here for GF3. You also can download a zip file and install GF as a service. See official documentation and step-bystep simplified tutorial with pictures here.
I think jdk and mysql would not be a problem on windows based server

Java Web Start - Does it work with Android?

As the title says, is deploying/using applications through Java Web Start a viable option? I found a few posts online from years ago saying that the JavaME applications are only available.
No, it's not an option. Android has an Application Store (called Android Market) that serves a similar purpose: managing applications install, updates and versions... So, technically, you don't need JWS.
Why not just host the .APK file locally on your lan on a webserver and allow people to download it from their browsers?
I believe the only way to get automatic updates like webstart is to use the android market. However, if you just want to deploy your app in your local lan, you can put the app as a link on an internal web server and have people navigate to it using the browser.

Categories

Resources