-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61e4ead
commit 4d22740
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
layout: commands | ||
page_title: 'Commands: Troubleshoot Ports' | ||
description: >- | ||
The `consul troubleshoot ports` Helps troubleshoot TCP ports by printing if they are open or closed. | ||
--- | ||
|
||
# Consul Troubleshoot Upstreams | ||
|
||
Command: `consul troubleshoot ports` | ||
|
||
The `troubleshoot ports` Helps troubleshoot TCP ports by printing if they are open or closed. | ||
|
||
## Usage | ||
|
||
Usage: `consul troubleshoot ports [options]` | ||
|
||
#### Command Options | ||
|
||
- `-host=<value>` - Host name to troubleshoot TCP ports for. Host can also be set by environment variable `CONSUL_HTTP_ADDR` | ||
- `-ports=<value>` - Custom ports to troubleshoot (comma-seperated). | ||
|
||
## Examples | ||
|
||
Checks for TCP connectivity of default ports of consul in case -ports is not passed as arguments. | ||
Default ports are listed [here](/consul/docs/install/ports) | ||
|
||
```shell-session | ||
$ export CONSUL_HTTP_ADDR=localhost | ||
$ consul troubleshoot ports | ||
TCP: Port 8501 on localhost is open. | ||
TCP: Port 8502 on localhost is open. | ||
TCP: Port 8503 on localhost is open. | ||
TCP: Port 8302 on localhost is open. | ||
TCP: Port 8300 on localhost is open. | ||
TCP: Port 8600 on localhost is open. | ||
TCP: Port 8301 on localhost is open. | ||
TCP: Port 8500 on localhost is open. | ||
``` | ||
|
||
```shell-session | ||
$ consul troubleshoot ports -host hashicorp.com -ports 80 | ||
TCP: Port 80 on hashicorp.com is open. | ||
``` |