Troubleshooting
Diagnose and resolve common build, startup, configuration, port binding, and HTTP proxy errors.
CMake Version Errors
CMakeLists.txt specifies cmake_minimum_required(VERSION 3.28.3). Older Linux LTS distributions (such as Ubuntu 22.04 with CMake 3.22) will fail at configure time unless a newer CMake is installed from Kitware APT or official binaries.
Startup & Port Binding Errors
| Symptom / Message | Cause | Resolution |
|---|---|---|
| [CONFIG] Unable to load 'config.json' | Running vsi_ngine with no flags from a directory without config.json. | Run from the directory containing config.json or pass -c /path/to/config.json. |
| [CONFIG] Port conflict detected | Two enabled endpoints (forwardProxy, reverseProxy mappings, metrics) overlap on the same port and IP/0.0.0.0. | Assign distinct listen_port values or bind non-overlapping specific IPv4 addresses. |
| [CONFIG] No services are enabled | Both forwardProxy.enabled and reverseProxy.enabled are false. | Set "enabled": true on at least one service in config.json. |
| [TRANSPORT] Socket bind failed: Permission denied | Binding a privileged port (< 1024, e.g. 80) as an unprivileged user. | Use ports >= 1024 (e.g. 8081, 8085) or grant CAP_NET_BIND_SERVICE. |
| [TRANSPORT] Socket bind failed: Address already in use | Another process is already listening on the configured IP:port. | Inspect with ss -tulpn | grep <port> and stop the conflicting process or change the port. |
Runtime HTTP Status Codes
- 400 Bad Request: Returned when parse_http_1_0() rejects malformed request syntax or invalid Content-Length / Transfer-Encoding headers.
- 431 Request Header Fields Too Large: Returned when request headers exceed HTTP1_HEADER_BUFFER_SIZE (16 KB) without a \r\n\r\n terminator.
- 502 Bad Gateway (Reverse Proxy): Returned when getaddrinfo() fails to resolve target_host or outbound_connect_tcp() cannot reach the configured backend.