Config File Visualization
Butler SOS can visualize its config file on a web page, using an internal web server.
This can be useful for troubleshooting and understanding how Butler SOS is configured.
The configuration can optionally be obfuscated to hide sensitive information.
What's This?
Butler SOS can visualize its config file on a web page, using an internal web server. This can be useful for troubleshooting and understanding how Butler SOS is configured.
If enabled, the web server will serve a web page on the IP address and port specified in the config file. The default IP address is localhost and the default port is 3100.
JSON and YAML
The web page will show the config file in both JSON and YAML format.
The JSON format is useful if you want to copy the config file and paste it into a JSON validator, for example. The YAML format is easier to read and understand for humans, and is also the format used in the config file.
Obfuscation
The configuration can optionally be obfuscated to hide sensitive information. This is useful if you need to share the config file with someone else, but don't want to share sensitive information like IP addresses, user names or passwords. Obfuscation is enabled/disabled in the config file.
For example, if asking for support on the Butler SOS forum, you can share the obfuscated config file without revealing sensitive information.
Disclaimer
Obfuscation is not foolproof, but it should be good enough for most use cases. Always check the obfuscated config file before sharing it.
No authentication
The config visualisation server does not require a password, token or any other credential. Anyone who can reach its port gets the page. Keep obfuscate set to true, leave the page disabled unless you are using it, and keep host at localhost. See Masking since 15.1.0.
Settings in Config File
Butler-SOS:
...
...
# Should Butler SOS start a web server that serves an obfuscated view of the Butler SOS config file?
configVisualisation:
enable: false # Default false. Only enable when you need it.
host: localhost # Hostname or IP address where the web server will listen. Should be localhost in most cases.
port: 3100 # Port where the web server will listen. Change if port 3100 is already in use.
obfuscate: true # Should the config file shown in the web UI be obfuscated?
...
...When the server cannot start
Changed in 15.5.0
Before Butler SOS 15.5.0, the error said null where the address should be.
This applies when the config visualisation web server is turned on, with Butler-SOS.configVisualisation.enable: true.
What was wrong before 15.5.0
When the config visualisation server could not start, for example because another program already used its port, Butler SOS logged an error that said null where the address should be, and then stopped:
error: CONFIG VIS: Could not set up config visualisation server on null. listen EADDRINUSE: address already in use 127.0.0.1:3100The address was only in the system's own message at the end of the line, so the error was easy to misread as a missing or empty setting.
What changed
The error now starts with the host and port from the config file, the ones Butler SOS tried to use. An IPv6 address is shown in brackets, as in [::1]:3100:
error: CONFIG VIS: Could not set up config visualisation server on localhost:3100. listen EADDRINUSE: address already in use 127.0.0.1:3100Butler SOS still stops with exit code 1, as before. Nothing else about the config visualisation server changes.
What to do
EADDRINUSE: address already in use means another program on the server already listens on that port. Either:
- give Butler SOS another port, with
Butler-SOS.configVisualisation.portin the config file; or - stop the other program, if it should not be running.
Two Butler SOS instances on one server, for example two Windows services, need a port each for the config visualisation server, as for every other server Butler SOS starts. The Windows service installation page lists the port settings to check.
On Windows, this PowerShell command shows which program uses a port, here 3100. It prints nothing when no program listens on the port:
Get-NetTCPConnection -LocalPort 3100 -State Listen -ErrorAction SilentlyContinue |
ForEach-Object { Get-Process -Id $_.OwningProcess }A port that Windows' own web server (HTTP.sys) holds for another program, as for the Qlik Sense services, shows as System, process ID 4. netsh http show servicestate lists which program registered it.
On Linux:
sudo ss -ltnp 'sport = :3100'