Reset Search
 

 

Article

How to enable Wildfly debugging on Extreme Management Server (XMC)

« Go Back

Information

 
TitleHow to enable Wildfly debugging on Extreme Management Server (XMC)
Objective
To enable WildFly debugging at support or engineerings request only
Environment
  • XMC
  • Extreme Management Center
  • WildFly
Procedure
This will require a restart of the XMC server
Be prudent doing during production. Resetting the server will drop current data collection and take any NAC/Access Control Portal offline.


This will configure the WildFly Access Log. This is a persistent change.
 
  1. Log into the linux shell on the xmc server.
  2. cd /usr/local/Extreme_Networks/NetSight/wildfly/bin
  3. Ensure that jboss-cli.sh is executable if it is not already, with this command:
 
chmod a+x jboss-cli.sh
 
  1. Ensure that JAVA_HOME is defined in the shell if it is not already, with this command: 
export JAVA_HOME=/usr/local/Extreme_Networks/NetSight/java/
  1. Run this to start the CLI (note: two dashes in ‘--connect', DO NOT CUT AND PASTE the below the dashes wll not PASTE reliably.
./jboss-cli.sh –-connect
 
  1. At the WildFly CLI prompt, enter these commands:
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=record-request-start-time,value=true)
/subsystem=undertow/server=default-server/https-listener=default-https/:write-attribute(name=record-request-start-time,value=true)
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern="|%I| %a \"%r\" %s %T", use-server-log=true)
 
  1. All of the above commands should produce "outcome" => "success".
  2. Enter quit to exit the WildFly CLI.
  3. Restart the XMC server.  
  4. service nsserver restart

     

This will enable logging for the Access Log in server.log. This will only last until restart.
If you restart the server, you will need to do this again.
 
  1. In the UI, Go to Administration > Diagnostics > Server > Server Diagnostics.
  2. In the dropdown menu next to “Load Custom Packages”, select  "View/Edit Custom Logging/Properties File".
  3. At the bottom, add this line:
 
log4j.category.io.undertow.accesslog=ALL
 
  1. Click OK.
  2. Click “Load Custom Packages”, then OK.
  3. No restart is required.
You should start seeing log messages for the access log in the server.log in short order. They look like this:
 
cat /usr/local/Extreme_Networks/Netsight/appdata/logs/server.log


2019-06-12 13:51:22,404 INFO  [io.undertow.accesslog] |default task-230| 134.141.61.32 "POST /axis/services/NACEndSystemWebService HTTP/1.1" 200 0.012
2019-06-12 13:51:38,644 INFO  [io.undertow.accesslog] |default task-233| 0:0:0:0:0:0:0:1 "GET /index.jsp HTTP/2.0" 200 0.192
2019-06-12 13:51:53,956 INFO  [io.undertow.accesslog] |default task-235| 0:0:0:0:0:0:0:1 "POST /dwr/call/plaincall/AlarmDwr.getServerAlarms.dwr HTTP/2.0" 200 0.015


You can disable logging by the Access Log when you no longer want the server.log filling up with web request messages.
 
  1. In the UI, Go to Administration > Diagnostics > Server > Server Diagnostics.
  2. In the dropdown menu next to “Load Custom Packages”, select  "View/Edit Custom Logging/Properties File".
  3. At the bottom, change the line added above to this:
 
log4j.category.io.undertow.accesslog=OFF


4.  Click OK.
5.  Click “Load Custom Packages”, then OK.
    No restart is required.

You can undo the Access Log configuration if you should want to. The Access Log only adds a very slight amount of overhead.
 
  1. Log into the linux shell on the xmc server.
  2. cd /usr/local/Extreme_Networks/Netsight/wildfly/bin
  3. Ensure that jboss-cli.sh is executable if it is not already, with this command:
 
chmod a+x jboss-cli.sh
 
  1. Ensure that JAVA_HOME is defined in the shell if it is not already, with this command:
export JAVA_HOME=/usr/local/Extreme_Networks/NetSight/java/
 
  1. Run this to start the CLI (note: two dashes in ‘--connect', DO NOT CUT AND PASTE the below the dashes wll not PASTE reliably
./jboss-cli.sh –-connect
 
  1. At the WildFly CLI prompt, enter these commands:
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:remove
/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=record-request-start-time,value=false)
/subsystem=undertow/server=default-server/https-listener=default-https/:write-attribute(name=record-request-start-time,value=false)
 
  1. All of the above commands should produce "outcome" => "success".
  2. Enter quit to exit the WildFly CLI.
  3. There is no need to restart the XMC server.
The output of this will be need to be gathered via the server.log. This can be exported as part of a show support, or gathering from the directory
usr/local/Extreme_Networks/Netsight/appdata/logs/server.log


 
Additional notes

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255