I have a Spring Boot app which I use to run some Controllers and a Scheduled task. I start the app from the command line (I'm on windows) and it runs there for a couple of days, and then stops responding. There are no errors, the output to the console just stops. I have to hit CTRL+C to stop the app and restart it to start getting responses from it again.
The command line is stuck on the last line of output from the program. The computer is a desktop, does not sleep or hibernate. It's as if Spring Boot stopped accepting requests and stopped the Scheduled task.
Any help debugging this problem would be greatly appreciated.
Related
I created a jhipster application and many entities, but the problem is when starting the application, it remains stuck for 6 min, the last message in the console is "started swagger", then continues the startup. is there a solution to this problem please?
I have written a service to host NServiceBus and for some reason NServiceBus is shutting down almost immediately after starting the service. If I run the executable manually everything works exactly as it should but as a service it decides to shutdown without an error being logged. Below is an example of the log files:
Selected active license from C:\ProgramData\ParticularSoftware\license.xml
Security warnings are reported due to opening up some of the security for testing purposes
Initiating shutdown.
Shutdown complete.
All of this takes place in 0.48 seconds.
This is a .net 4.6.1 application as my organization doesn't allow .net core at this point.
I have finally figured out the answer, I had 2 separate ways of closing the connection with NServiceBus, one was supposed to be used in the case that it was being ran as a console app, while the other was for when a service was running. The problem was that the one for the console app was also being hit by the service before it was supposed to, I have now resolved that issue.
Currently, my jenkinsfile is able to compile, deploy, and start the application on my CI box. But I've no window into if the app started correctly. Technically someone can add code that compiles but doesn't start; ie code was added to reference a config, but the person never updated the config file. I want to catch those types of issues that prevents the app from starting and send an email to the person.
How can I accomplish this?
Current app takes about ~3 minutes to start. When everything successfully starts, it'll output: Started Application in 166.125 seconds (JVM running for 175.714)
I am running a listener program on a JMS queue hosted in Sun Java System Application Server 9.1_02 (build b08-p03)
After receiving a message I will extract and log some details in to a log file.
I observed that when running listener for really long hours, it stops receiving messages. I had to manually stop the program and start it again. Then it receives some 200-300 message and then stops again. I had to restart it to retrieve another set of messages.
Why is this weird behavior? Can someone throw light on this?
Thank you
Chaitanya
I found the issue myself. I am running the listener as Load Runner Java Vuser script. One negative thing about LR is that it does not show any exceptions. The script appears to be running but it actually does nothing. I found this when I ported the script to Eclipse and found that the script is throwing exceptions. This is essentially because I am not checking for a certain condition.
Happy that I demystified at last!
Thanks.
A consultant setup a windows service to run a application. The application is supposed to run every 15 minutes. The application is not running at all and the service appears to be running fine.
I am not familiar with how an application will run at a standard interval when running as a service.
The service uses the SRVANY.EXE tool.
Any 'consultant' that sets up a service to run using SRVANY.EXE should be fired. SRVANY is an unfortunate hack that should have been retired a decade ago; it should never be used in a production environment.
If the only purpose for the service is to run the app on a schedule then it shouldn't exist at all. Run the app as a Scheduled Task. If it has other functionality then rewrite it as a real service. If it is reasonably well written it should be a fairly easy conversion.
There are many potential issues with your application.
SRVANY.EXE turns any application into a Windows Service. If that application ever asks for user input, it will hang. You will want to confirm that the application running as a service does nothing more than start the other application.
You should also be able to run the "starter" application manually, outside the Windows Service. If it still doesn't work as it should you know it's not related to being run as a service.
To add to the other answers: see KB137890 on what SRVANY.EXE actually does and how to find out what application it is running.
It seems to me that you would be better off (if you can) setting up a scheduled task that runs every the application every 15 minutes if you can.
I'm not sure if this is correct, but I believe one way of a serivce running an application is merely to have a thread within OnStart and set it to run the application on an invertal of 15 minutes.