-
Notifications
You must be signed in to change notification settings - Fork 98
How to capture all packets for issue resolution
Packet capture for issue resolution is made even easier in 6.0! Packet capture can be started from your current configuration or you can request that the app does a "reset" as if you were starting from a fresh place.
The first step in troubleshooting any problem is to make a backup
The output of the process is everything you need for submitting an issue. The final files will be stored in a directory under logs
with the date time. EG logs\2020-05-25_21-07-43
(May 25, 2020 9:07:43 pm).
In that directory will be the following:
- A zip file containing the 5 items below (see notes in each section below for easy access to this file)
- config.json
- poolConfig.json as it is at the end of the capture
- poolState.json as it is at the end of the capture
- packetLog(date).log with a record of all the incoming & outgoing packets and incoming API calls
- consoleLog(_date).log which is a record of all the messages displayed in the console (with full logging)
There are three ways to complete the process:
- -webClient
- Command line
- API
This method allows you to start, stop and download the file from a web browser.
- Click Edit on System Information
- Select either
Capture with Reset
orCapture without Reset
and click the button.Capture with Reset
will make a backup of yourpoolConfig.json/poolState.json
in the/data
directory.
Note: Capture with Reset has a small issue. Please use the 'Command line - with a clean configuration' option to start your app. You can still continue to step 3 after you load the app.
- Click stop when you have captured the information required to diagnose the issue.
The browser will automatically download a file called Replay.zip
that you can attach to the issue.
This method calls the same API's as the -webClient method but can be useful if you don't have the -webClient running.
Start the capture with either:
-
server:4200/app/config/startPacketCapture - this will call a "reset" of your poolController app. This method will make a backup of your
poolConfig.json/poolState.json
in the/data
directory.
Note: Capture with Reset has a small issue. Please use the 'Command line - with a clean configuration' option to start your app. You can still continue to step 3 after you load the app.
- server:4200/app/config/startPacketCaptureWithoutReset - starts a capture with your existing configuration.
Stop the capture with:
- server:4200/app/config/stopPacketCapture - This will stop the packet capture and download a zip file in your local browser with the name as the current date and a zip extension, eg 2020-05-25_21-09-43.zip.
To use this from the command line, set config.json
property {log: {app: {captureForReplay: true}}}
. This will capture the process from whatever state the app is in when you start it. EG if you have already initialized the pool controller it will start with your existing configuration files.
To start with a clean configuration, manually make a backup (or delete) your data\poolConfig.json
and data\poolState.json
files and start the app.
To stop the capture, do one of three things:
- Stop the application from the command line using Cmd-C or Ctrl-C (let it exit normally; do not kill the process).
- Use the stop method for the -webClient as listed above
- Use the stop method for the API's as listed above.
Starting with 5.2, there is a new capture/replay tool available for troubleshooting. This captures your logs, config file, incoming/outgoing packets, and URL actions. The only thing you need to manually capture are any errors that are logged in the console (in the event of an app crash).
- Start the app with
npm run start:capture {config.json}
- After you experience the error/behavior/bug stop the app. There will be three new files in the
replay
directory. Include those three files when communicating any issues.
- What version of the code are you using
- What is causing the error
- All three files from the
/replay
directory. - Any errors that are in the console
- Your pool equipment
In order to have a full picture of what is happening, and what is broken, it is necessary to see the full packet information that is output from the system.
- What version of the code are you using
- What is causing the error
- All output from the file log (See below)
- Any errors that are in the console
- Your
config.json
or in-use configuration file - Your pool equipment
In your config.json
, there are a number of sections that you should enable:
"log": {
"logLevel": "info",
"socketLogLevel": "info",
"fileLog": {
"enable": 1, // Turn on the file log
"fileLogLevel": "silly", // leave this on 'silly' to capture everything
"fileName": "output.log"
},
"logPumpMessages": 1, // set all log variables to 1 to capture everything
"logDuplicateMessages": 1,
"logConsoleNotDecoded": 1,
"logConfigMessages": 1,
"logMessageDecoding": 1,
"logChlorinator": 1,
"logIntellichem": 1,
"logPacketWrites": 1,
"logPumpTimers": 1,
"logReload": 01,
"logApi": 1
Once you have the above setup, restart the app, wait for it to finish the configuration process (i.e. with Intellitouch) and then replicate the error. Everything (except the error) should be captured in the logs.