Why does my application show as offline, whilst the server shows online?

  • Updated

Question

Why does my application show as offline, whilst the server shows online?

Answer

An application will be marked as offline, if the Contrast UI does not receive agent activity from the application within 15 minutes.  This activity may be in the form of a heartbeat, application activity or application update agent reports.

The agent sends a heartbeat every 5 minutes, if that is not received for 50 minutes the server is marked as offline.

If the above doesn't explain the behaviour.  It is possible that the application has been archived in the Contrast UI - Archive and unarchive applications.  You can view archived applications on the Applications tab, by clicking the highlighted text next to the Applications title and selecting Archived. Check for the name of the application you're having issues with in this list.  You can then either Unarchive or fully Delete the Application through the icons on the far right of each entry.

The following exception will be present in the Contrast UI server's contrast.log file (EOP) where APPNAME is replaced with the name of your application.  SaaS customers should contact Contrast Support to check this log.

ContrastAppArchivedException - Archived Application received in: PUT /Contrast/api/ng/applications/create -> Application APPNAME is archived!

In the Contrast agent debug contrast.log, you may see output like the following in the event that an application has been archived (example from the Java agent):

[Contrast Application Updater b] DEBUG - == RECEIVED 409 after submitting APPCREATE-NG
[Contrast Application Updater b] DEBUG - == BODY OF RESPONSE: { "success" : false, "messages" : [ "Invalid archived application" ] } [Contrast Application Updater b] DEBUG - !LM!HttpMessage|APPCREATE-NG|size=138&rc=409&appName=APPNAME
[Contrast Application Updater c] INFO - TeamServer doesn't want app APPNAME - maybe its archived?
[Contrast Application Updater Application] DEBUG - App marked as unwanted on the server, it may have been archived

 

You may come across a situation where APPNAME is not archived.  However, you see another application named APPNAME (1).  This can occur if you've renamed the application in the Contrast UI at some stage, then launched an agent with an application of the same name, resulting in the creation of APPNAME (1) - See: Application shows up in the Contrast UI with (1) alongside it

The easiest way to make sure your application is named the way you want it, is setting it in the config.  Renaming it after, while it looks good in the UI, is hard to manage.  The agent is still using the old name and must continue to do so.  If you then try using the new name on the agent, it will create another application, as above.

The simplest process in this instance is as follows:

  • Archive and Delete both APPNAME and APPNAME (1)Archive and unarchive applications and Delete applications .  Note that when you delete an application, all of its existing associated findings - like, vulnerabilities and libraries - are removed permanently.
  • Optionally, add the application name to the agent configuration.
  • Restart the agent service on the application server.
  • You should now see the application successfully reporting and online.
  • If using Assess, ensure the application is licensed in order to be able to view its associated vulnerabilities and route coverage data (if applicable).

See Also

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request