Skip to content

Commit 190adfa

Browse files
authored
feat(docs): add troubleshooting content to Readme (#58)
Signed-off-by: Oleksander Piskun <[email protected]>
1 parent d008b10 commit 190adfa

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,63 @@ docker run \
388388
389389
> **Note:** Existing `appapi-harp` container will be removed.
390390
391+
## Troubleshooting
392+
393+
### Verify that HaRP can reach the Docker Engine
394+
395+
Use the Docker Engine `/_ping` endpoint via HaRP’s ExApps HTTP frontend to confirm connectivity:
396+
397+
```
398+
curl -fsS \
399+
-H "harp-shared-key: <HP_SHARED_KEY>" \
400+
-H "docker-engine-port: 24000" \
401+
http://127.0.0.1:8780/exapps/app_api/v1.41/_ping
402+
```
403+
404+
* `24000` is the **default** FRP remote port used by the HaRP container for the **built‑in/local** Docker Engine (enabled when `/var/run/docker.sock` is mounted).
405+
* If you have connected **additional** Docker Engines via FRP, replace `24000` with the corresponding `remotePort` you configured (typically `24001–24099`).
406+
* A response body of `OK` means the Docker Engine API is reachable from HaRP.
407+
408+
**Common outcomes**
409+
410+
* `OK` – Success: HaRP can reach the Docker Engine on the given port.
411+
* `401 Unauthorized` – The `harp-shared-key` header does not match `HP_SHARED_KEY`.
412+
* `503 Service Unavailable` / `504 Gateway Timeout` – Wrong docker-engine-port, FRP tunnel is down, or the Docker Engine is not reachable.
413+
* Connection errors – The address in `HP_EXAPPS_ADDRESS` (port `8780` by default) is not reachable from where you ran curl.
414+
415+
> **Note:** If you expose the ExApps frontend over HTTPS (via `HP_EXAPPS_HTTPS_ADDRESS` and a mounted `/certs/cert.pem`), use `https://...:8781` instead of `http://...:8780`.
416+
417+
#### Verify Docker Engines from inside the HaRP container
418+
419+
These checks run **inside the HaRP container** (e.g., `docker exec -it appapi-harp sh`).
420+
421+
**1) Local Docker Engine (mapped socket)**
422+
423+
Confirm the host’s Docker socket is correctly mounted and reachable:
424+
425+
```
426+
# Directly against the mounted UNIX socket
427+
curl -fsS --unix-socket /var/run/docker.sock http://localhost/_ping
428+
# Expected: OK
429+
```
430+
431+
You can also verify the FRP tunnel that HaRP exposes for the bundled local engine (port 24000):
432+
433+
```
434+
curl -fsS http://127.0.0.1:24000/_ping
435+
# Expected: OK
436+
```
437+
438+
**2) Remote Docker Engine over FRP**
439+
440+
For each external Docker Engine you connected via FRP (each with a unique `remotePort`, typically **24001–24099**), test the TCP port that FRP exposes **on the HaRP container**:
441+
442+
```
443+
# Replace 24001 with the remotePort you configured in that engine's frpc.toml
444+
curl -fsS http://127.0.0.1:24001/_ping
445+
# Expected: OK
446+
```
447+
391448
## Contributing
392449
393450
Contributions to HaRP are welcome. Feel free to open issues, discussions or submit pull requests with improvements, bug fixes, or new features.

0 commit comments

Comments
 (0)