Starting and stopping the HCL AppScan Traffic Recorder

You can either start the traffic recorder, or run it as a service. You cannot do both in parallel.

Start the server

To start the HCL AppScan Traffic Recorder:
  • Run the command: node app.js [port]
    port = the post on which the traffic recorder listens for REST API requests.
    Note: If you do not define the port when starting the traffic recorder, the port set in the Settings.json file is used. If none is defined there, port 8383 is used.
    There is no need to stop the traffic recorder; you can leave it running permanently.

Start as a Windows service

You can run the HCL AppScan Traffic Recorder as a Windows service, using the service.js executable found in the Service folder. Service uses Local System privileges.
Note: All service commands must be run with administrator privileges ("Run as administrator").
To start the service:
  • Run the command:
    'node service.js --install'
    'node service.js --start'
    

Windows service commands

You can print this list by running:
'node service.js --help'
--start Start the service
--stop Stop the service
--install Install the service
--uninstall Stop and uninstall the service
--help Output usage information

Stop the Windows service

To uninstall the Traffic Recorder Windows Service:
  • Using the service.js executable found in the Service folder, run the command:
    'node service.js --uninstall'

Start as a Linux service using systemd

To start the service:
  1. Create a new file under systemd directory (usually: /etc/systemd/system)

    For example: sudo vim /etc/systemd/system/TrafficRecorder.service

    File content:
    [Unit]
    Description=Appscan TrafficRecorder
    After=multi-user.target
    
    [Service]
    ExecStart=[path to node here] [path to app.js here] 
    Restart=always
    RestartSec=10
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=TrafficRecorder
    
    [Install]
    WantedBy=multi-user.target
    
    Example for ExecStart:
    ExecStart= node /home/admin/Documents/TrafficRecorder.Linux.1.2.0/app.js
  2. Reload systemd files:
    sudo systemctl daemon-reload
  3. Start the service:
    sudo systemctl start TrafficRecorder.service
  4. Check status:
    sudo systemctl status TrafficRecorder.service
    Status should show as “Active: active (running)”.
  5. Enable the service:
    sudo systemctl enable TrafficRecorder.service

Stop the Linux service

To stop and disable the Traffic Recorder Linux service:
  1. Stop the service:
    sudo systemctl stop TrafficRecorder.service
  2. Disable the service:
    sudo systemctl disable TrafficRecorder.service

Automatic updates

Once started, the HCL AppScan Traffic Recorder keeps itself up-to-date automatically. However, if a proxy is needed for Internet connections, you must define your proxy using the conventional `http_proxy` and `https_proxy` environment variables in the operating system to allow the updates.