Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos Space] How to collect error log files



Article ID: KB17407 KB Last Updated: 09 Apr 2020Version: 11.0

This article provides information on how to collect error log files in Junos Space for troubleshooting purposes.


Collecting Junos Space Error Logs

You can collect Junos Space error logs using the Web UI or CLI.

Note: Capture existing Junos Space troubleshooting logs prior to enabling the DEBUG logging level. That way you will not inadvertently purge data that might be needed for JTAC analysis.

To change the default logging level from WARN to DEBUG, see "Changing the Logging Level," below.

Changing the Logging Level

Web UI

From Junos Space versions 16.1 and above, you can change the logging level for the logs from the WebUI.

  1. Follow the path:  Network Application Platform > Administration > Space Troubleshooting > Log Configuration
  2. This will take you to JBoss Logs section. 
  3. Select the file for which you wish to change the logging level and choose the Log Level from the drop-down:
  4. In case you wish to change the logging level for OpenNMS, navigate to "OpenNMS Logs" tab.
        5. Click on Save and Update. No service needs to be restarted after this change.    


For Junos Space versions 13.1 and below:

The logging level can be changed by editing the /usr/local/jboss/server/all/conf/jboss-log4j.xml file.  In this file, change the logging level from WARN to DEBUG for the section below:

Note: Searching for 'root' (case sensitive) is the fastest way to find the area to edit.

<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->

<!--ROOT Logger-->
<category name="org.apache.solr">
<priority value="WARN"/> <<<<< Do not change this value.
<priority value="WARN"/> <<<<< Change only this value.

For Junos Space versions 13.2 and above:

Logging parameters are managed via the JBoss Web application server CLI. Note: Pay attention to text wraparound. Each line contains only one command.

  1. Run:
    /usr/local/jboss/bin/ --connect --controller=jmp-CLUSTER:9999
    /usr/local/jboss/bin/ --connect --user=admin --password=juniper_123 --controller=jmp-CLUSTER
  2. Enter:  connect
  3. Enter:  /profile=full-ha/subsystem=logging/root-logger=ROOT:write-attribute(name="level", value="WARN")
  4. Enter:  /profile=full-ha/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="level", value="WARN")
  5. (OPTIONAL) To modify SD logging (SD 13.3 and later):





  6. (OPTIONAL) To modify Network Director logging and enable monitor.log and collector.log (ND 13.3 and later):
    cd /profile=full-ha/subsystem=logging


    ./, value=DEBUG)

    ./size-rotating-file-handler=Monitoring:add(level=DEBUG, file={"relative-to"=>"jboss.server.log.dir", "path"=>"monitoring.log"}, append=true, autoflush=true, max-backup-index=15)

    ./size-rotating-file-handler=NDCollectorLog:add(level=DEBUG, file={"relative-to"=>"jboss.server.log.dir", "path"=>"collector.log"}, append=true, autoflush=true, max-backup-index=15)
    Note: For steps 3, 4 and 5, enter FATAL, ERROR, WARN, INFO, or DEBUG, depending on the logging verbosity needed (shown from lowest to highest, above). WARN is the default. DEBUG is used for JTAC debugging.

  7. Sometimes it is necessary to increase the number of files and/or file sizes during DEBUG collection to increase the time span contained in the logs. To increase the number of files and/or file sizes during DEBUG collection, perform the following:
    1. Enter: /profile=full-ha/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="rotate-size", value="50m")
    2. Enter: /profile=full-ha/subsystem=logging/size-rotating-file-handler=FILE:write-attribute(name="max-backup-index", value="10")

  8. To exit the JBoss CLI, enter: quit


  • Increase the 50m and 10, accordingly.
  • FILE corresponds to server.log. Other valid options include HORNETQ, SERVICENOW_LOG, SERVICEINSIGHT_LOG, SERVICENOW_OSSJ_LOG, and SD_LOG. These options correspond to hornetQ.log, serviceNow.log, serviceInsight.log, serviceNow_OSSJ.log, and SD.log, respectively.
  • The rotate-size default value is 50m for all the logs above.
  • The max-backup-index default values are 10 for server.log and hornetQ.log, and 15 for the others.

   Note: You do not have to restart JBoss if you are only changing the logging level (for example, WARN to DEBUG). This change takes effect dynamically. However, you MUST restart the JBoss service if you change the rotate-size or max-backup-index values (e.g., #service jboss restart).

Modification History:

2020-04-09: Added a section for opennms logging change with screenshot.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search