I am trying to use Bluemix monitoring and analytics service bounded to a java application running on Liberty runtime. But the service always shows application as unavailable (even though I can see and verify its working). And none of the stats on CPU/memory utilization & response/throughput times work. The application is started by calling the Main class and its NOT web application. Is there specific entry in manifest.yml for M&A to start working with the application. I have used M&A with node.js application and it worked well.
I thought I will just get an answer by simple google search but alas not able to find anything on this. Appreciate the help
The Monitoring & Analytics service generally assumes a web application. The availability tab is based on doing an http GET of your application's route as defined in Bluemix. Since yours is not a web application it presumably either doesn't have a route or doesn't respond to the one that it has if it does have one; this will cause M&A to report it as down.
Likewise for Liberty apps the performance data is gathered via Websphere application server JMX MBeans. If your app is not a web app, it is likely that it is invisible to these interfaces.
There was a temporary outtage due to network issues, but things should be resolved now. Restage your app and try again...
Related
I know that by sending a http post request to http://host:port/shutdown, we can shutdown a Springboot application. Is it possible to restart the whole springboot application by sending a http request in a production environment? So we don't need to login in the server to do that. Thank you.
I don't think such a thing exists, I'll be glad to be proven otherwise:
Spring boot doesn't do any assumptions about the environment it runs in. So when spring boot process gets shut down, re-starting it again is "out of competence" of spring boot infrastructure which is just a bunch of java classes running inside a JVM process.
You can find Here a list of endpoints exposed by the spring boot. There is a "shutdown" method that you've mentioned there, but there is no "restart" functionality exposed.
Now there are other techniques that probably can help:
If the application gets shut down because of some illegal state of some spring bean, maybe it makes sense to expose some endpoint that will "clean up" the state and make application operational again. If the application has to be restarted due to changes in configuration files or something, then you might want to consider using spring cloud's Refresh Scope for Beans. It's kind of hard to provide more information here, because you haven't mentioned the reason for shutting down the application, but I guess you've got the direction.
Having said that, there are probably some different ways to achieve what you want depending on the environment your application runs in:
If you're running in AWS for example, you can take advantage of their autoscaling policies, shut down the application remotely and AWS will run another instance for you. I'm not an expert in AWS, but I saw this working in ECS for example.
If you're running "java -jar" just on some server and want to make sure that when your process ends (by using 'shutdown') it should be started again, its possible to use some kind of wrapper that would wrap the process in service and track the service availability. There are even ready solutions for this, like Tanuki wrapper (I'm not affiliated with this product but used once its free version and it served us great)
If you're using Docker infrastructure you can change the policy and restart the container automatically when it gets shut down, I haven't used this by myself, but according to This excellent blog post is perfectly doable.
You should look at Spring boot jenkins You will also find a small article explaining how to configure the project on jenkins.
I have just finished developing a REST web service that is consumed by a mobile application. The web service is developed with Java and runs on an Apache server.
I'm now moving to the testing part. And for that purpose, I need to host my web service in a real server.
It is a first experience for, and I just knew that using mutualised (shared) hosting does not allow me to host whatever application, in whatever language.
The one I get to use is OVH, which does not support java web services hosting.
Does anybody have any other alternative to provide. It would help a lot!!
Like I said, if it is for testing purposes you could always use a "normal" PC, running something like XAMPP.
As an alternative you could give RedHat's OpenShift a try, which offers a free, getting-started plan (more info here) that should more than cover your testing requirements.
To run your app (in Eclipse) you would need to : Run As -> Run on Server
And then select a server. If you haven't done so; I suggest you install a local JBoss/WildFly server (the wizard can take care of that for you).
Doing this will display options to run your app either on the local or the OpenShift/rhcloud server.This makes testing faster and allow you to avoid testing on the OpenShift live server.
I want to exchange E-Mails from a locally installed Microsoft Outlook through a Java Application which is running on a Tomcat Server.
In the past this was no Problem but since we switched the tomcat server from a "normal" starting routine to be started as a service (which is done for performance reasons) my Connection to Outlook is not working anymore.
As I was searching for a Solution to this quite for a long time (with no found solution) I decided to leave a post here.
I already know, that
The Outlook Object Model is unsuitable to run in a Windows service
which can be found at http://support.microsoft.com/kb/237913. Due to the registry hive HKEY_CURRENT_USER which is not loaded when a service is started.
But in this case I think a simple 'No - that’s not possible' can’t be a solution and that’s why I am asking here for help.
Is it for example possible to let the application on the tomcat start a new local application which then connects to Outlook?
Is it possible to manually load the HKEY_CURRENT_USER hive?
or on the other hand do this by using a solution which I did not mention yet?
Thanks a lot in advance!
You probably need to create a plugin to outlook which submits the email to your application using web-services (or similar).
I believe this is the usual way of realising requirements like this.
I'am developing a java servlet application, and tesing it on Eclipse + Apache Tomcat (refer: http://www.vogella.de/articles/EclipseWTP/article.html#overview_wtp).
The application is now tested on the localhost and accesed by any clients on the same LAN.
Now, I need to deploy it into the web server, where everyone from anywhere can access this servlet.
Coud you guide me the way that I've to do to archive this task.
You need to have a computer accessible to everyone - i.e. placed on the internet and not behind a firewall - with the appropriate software installed (and hardened against hacker attacks).
If you do not have such a computer, you can have a look at the Google Application Engine which allows you to deploy Java web applications (with some additional restrictions) to the Google cloud. This is free for low-volume applications.
Yes, you can do it by deploying your application in the Cloud Instance. Since we cannot able to make our server instance or computer to be run always(We may come across internet connection problems, Power Fluctuation, etc.,), We have lot of problems while making our instance public(In Security perspective too). So it is better to use cloud instances.
We have many Cloud Service Providers such as AWS by Amazon, Google Cloud, Microsoft Cloud, etc.,
Take a look on this List of Cloud Services Providers.(You have links for all top 10 providers)
looking for someone to verify whether this approach is good or not . let say i have web app A run on tomcat. By deploying one webcache web app on the same tomcat. will that minimum the likelyhood that my web app crash due to overload by web visitors? if yes, what webcache should i used to implement this technique? or should i forget about webcache deploy this way and user service like akamai instead..? low cost is my main priority. looking forward to hear from you all
By duplicating on the same server/machine you gain nothing. When many users rush to the website, you would need more system resources to serve them and since these are shared by all web apps the second installation will be in as bad situation as the first one.
To properly cluster a web application you need more servers. You install Tomcat and your web application in each one and then use a load balancer to share the traffic. This is usually implemented with Apache Web Server and mod_proxy or mod_jk. Of course you need to pay for the extra server. One solution would be to deploy your app in a cloud environment (like Amazon EC2) and start the second server only when needed.
Another solution is to scale up, that is use a more powerful machine.