Knowledge Builders

what port does consul use

by Merritt Schoen Published 2 years ago Updated 2 years ago
image

Consul requires up to 6 different ports to work properly, some on TCP, UDP, or both protocols.
...
Ports Table.
UseDefault Ports
HTTP: The HTTP API (TCP Only)8500
HTTPS: The HTTPs APIdisabled (8501)*
gRPC: The gRPC APIdisabled (8502)*
LAN Serf: The Serf LAN port (TCP and UDP)8301
5 more rows

What is a serf LAN?

What is server RPC?

How many ports does Consul need?

About this website

image

Which port is used by HTTP interface by default in Consul?

HTTP API (Default 8500). This is used by clients to talk to the HTTP API. TCP only. DNS Interface (Default 8600).

What database does Consul use?

Consul, in its basic form, is simply a binary you download from Hashicorp. The latest installation procedures can be found on HashiCorp's learning portal. These instructions will get your Consul server up and running and configure the basics. Once you do this, you'll need to set up your database health check.

What is Consul client and server?

The servers and clients together form a single Consul cluster. The only difference between servers and clients are that servers are the only components that store and replicate data. Members of a Consul cluster automatically discover each other as long as they are given the address of at least one existing member.

How do you access the Consul UI?

You can view the output of Consul UI using the following command over any agent. The output would be as shown in the following screenshot. By default, you will observe the UI at http://localhost:8500/ui. The /ui part is same as the consul's HTTP API.

Where is Consul data stored?

The Consul KV datastore is located on the servers, but can be accessed by any agent (client or server). The natively integrated RPC functionality allows clients to forward requests to servers, including key/value reads and writes.

Is Consul a load balancer?

Consul has a built-in load balancing feature that allows services to communicate directly with one another. Consul also integrates with many popular load balancers such as NGINX, HAProxy, and F5, to automatically provide service updates, eliminating the need for manual processes.

How do I set up Consul?

Install & Configure Consul Agent On Client ModeStep 1: Update the package repositories and install unzip. ... Step 2: Head over to consul downloads page. ... Step 3: Download the consul binary to /opt directory. ... Step 4: Unzip consul binary. ... Step 5: Move consul executable to /usr/bin directory to be accessible system-wide.More items...•

What is Consul DNS?

One of the primary query interfaces for Consul is DNS. The DNS interface allows applications to make use of service discovery without any high-touch integration with Consul. For example, instead of making HTTP API requests to Consul, a host can use the DNS server directly via name lookups like redis. service.

Which is better Consul or Eureka?

Consul and Eureka can be categorized as "Open Source Service Discovery" tools. "Great service discovery infrastructure" is the primary reason why developers consider Consul over the competitors, whereas "Easy setup and integration with spring-cloud " was stated as the key factor in picking Eureka.

What is consul connect?

Consul Service Mesh provides service-to-service connection authorization and encryption using mutual Transport Layer Security (TLS). Consul Connect is used interchangeably with the name Consul Service Mesh and is what this document will use to refer to for Service Mesh functionality within Consul.

How does Hashicorp Consul work?

Consul is the control plane of the service mesh. Consul is a multi-networking tool that offers a fully-featured service mesh solution that solves the networking and security challenges of operating microservices and cloud infrastructure. Consul offers a software-driven approach to routing and segmentation.

What is Nomad UI?

The Nomad Web UI offers a web experience for inspecting a Nomad cluster. It's built into the Nomad binary and is served alongside the API. With zero additional configuration, you can use the Web UI instead of the CLI to inspect cluster state and submit and manage jobs.

What is Consul backend?

The Consul storage backend is used to persist Vault's data in Consul's key-value store. In addition to providing durable storage, inclusion of this backend will also register Vault as a service in Consul with a default health check. High Availability – the Consul storage backend supports high availability.

Is HashiCorp Consul open source?

Consul is a free and open-source service networking platform developed by HashiCorp.

How does HashiCorp Consul work?

HashiCorp Consul is an open source tool that solves these new complexities by providing service discovery, health checks, load balancing, a service graph, mutual TLS identity enforcement, and a configuration key-value store. These features make Consul an ideal control plane for a service mesh.

Is Consul a service mesh?

Consul is a service mesh solution that offers a software-driven approach to: Security (mTLS & ACLs) Observability. Traffic management.

powershell - Start Consul as windows service - Stack Overflow

How many of the services are starting actually? It happens when starting more than ~16 services. The first 16 will start successfully, and then the rest stays as in "Paused" state.

Consul with Containers | Consul - HashiCorp Learn

Since you started the container in detached mode, -d, the process will run in the background.You also set port mapping to your local machine as well as binding the client interface of our agent to 0.0.0.0.

Deployment Guide | Consul - HashiCorp Learn

For in-depth information about setting up gossip encryption, review the Secure Gossip Communication with Encryption tutorial. » Generate TLS certificates for RPC encryption Consul can use TLS to verify the authenticity of servers and clients.

What is a serf WAN?

Serf WAN (Default 8302). This is used by servers to gossip over the WAN to other servers. TCP and UDP.

What is server RPC?

Server RPC (Default 8300). This is used by servers to handle incoming requests from other agents. TCP only.

Does CLI use TCP?

So now the CLI uses TCP on 8500 like other clients.

What is MTR tool?

The mtr tool is a bit more sophisticated than ping and essentially combines traceroute with ping. It will trace the network route traffic is taking and will measure latency and packet loss at each network hop. This can be very helpful when trying to diagnose packet loss between datacenters where traffic is traversing the public internet – or in very large private networks.

How to test for packet loss?

One of the most basic ways to test for packet loss is to simply ping another server. If packet loss is detected, then it will be shown in the report displayed after ending the ping. To perform a quick test, you can run this command:

What is a security group policy?

Cloud service providers like AWS, Azure, and GCP apply a network security group policy to environments that can block or allow network traffic. Depending upon the environment and how your company performs cloud deployments, the default applied policy may block most inbound traffic. This is fine if your cluster is self-contained in a single VPC or private network, but if it spans networks or communicates over the public internet then you likely need to make rule adjustments.

Why is the Serf gossip protocol used in Consul?

The Serf gossip protocol is used to detect the health of Consul agents in the cluster and closed ports or network connectivity issues can result in server-side errors and even full cluster failure in some situations. As such, it's important that all Consul client agents and all Consul server agents can reach each other over the required ports. This document will explain some ways to check this as well as discuss some of the failure modes when ports aren't reachable.

Does Consul use UDP?

The gossip protocol that Consul uses to communicate cluster membership and availability occurs almost entirely over UDP. There are periodic syncs that happen over TCP, but the vast majority of the communication occurs over UDP. Given that UDP is a lossy protocol, if your network is suffering from packet loss, this can contribute to errors and other unexpected issues in a Consul deployment. Monitoring network latency and packet loss in your network – particularly between datacenters if you're running in different regions or availability zones – can be very helpful to identify potential issues here.

Can firewall rules block ports?

In scenarios like that, sometimes rules aren't configured in the hardware firewall. It can be easy to miss this as a potential problem if additional agents are added down the road where the traffic does actually traverse the firewall.

Can Netcat bind to UDP ports?

However, it does require stopping Consul on the receiving side so netcat can bind to the ports we want to test.

Why choose Consul?

As an Orleans Membership Provider, Consul is a good choice when you need to deliver an on-premise solution which does not require your potential customers to have existing infrastructure and a co-operative IT provider. Consul is a very lightweight single executable, has no dependencies, and as such can easily be built into your middleware solution.

Set up Consul

There is very extensive documentation available on Consul.io about setting up a stable Consul cluster and it doesn't make sense to repeat that here; however, for your convenience, we include this guide so you can very quickly get Orleans running with a standalone Consul agent.

Configure Orleans

There is currently a known issue with the "Custom" membership provider OrleansConfiguration.xml configuration file that will fail to parse correctly. For this reason, you have to provide a placeholder SystemStore in the XML and then configure the provider in code before starting the silo.

Client SDK

If you are interested in using Consul for your service discovery there are Client SDKs for most popular languages.

Implementation detail

The Membership Table Provider makes use of Consul's Key/Value store functionality with CAS.

Limitations

Consul KV currently does not support atomic updates. Therefore, the Orleans Consul Membership Provider only implements the Orleans basic membership protocol, as described in Cluster management in Orleans, and does not support the Extended Membership Protocol.

Potential future enhancements

Prove that the Consul KV replication project can support an Orleans cluster in a WAN environment between multiple Consul datacenters.

What is envoy_statsd_url?

envoy_statsd_url - A URL in the form udp://ip:port identifying a UDP StatsD listener that Envoy should deliver metrics to. For example, this may be udp://127.0.0.1:8125 if every host has a local StatsD listener. In this case users can configure this property once in the global proxy-defaults configuration entry for convenience. Currently, TCP is not supported.

What configuration is required for envoy proxies?

Envoy proxies require two types of configuration: an initial bootstrap configuration and a dynamic configuration that is discovered from a "management server", in this case Consul.

How to define a service's protocol?

One example is how users can define a service's protocol in a service-defaults configuration entry. Agents with enable_central_service_config set to true will automatically discover the protocol when configuring a proxy for a service. The proxy will discover the main protocol of the service it represents and use this to configure its main public listener. It will also discover the protocols defined for any of its upstream services and automatically configure its upstream listeners appropriately too as below.

What does http mean in envoy?

http - This specifies that the service speaks HTTP/1.x. Envoy will setup an http_connection_manager and will be able to load-balance requests individually to available upstream services. Envoy will also emit L7 metrics such as request rates broken down by HTTP response code family (2xx, 4xx, 5xx, etc).

What is connect_timeout_ms?

connect_timeout_ms - The number of milliseconds to allow when making upstream connections before timing out. Defaults to 5000 (5 seconds).

What does envoy_gateway_bind_tagged_addresses do?

envoy_gateway_bind_tagged_addresses - Indicates that the gateway services tagged addresses should be bound to listeners in addition to the default listener address.

What is Consul ACL token?

The Consul ACL token has the necessary permissions to read configuration for that service.

What is a serf LAN?

Serf LAN This is used to handle gossip in the LAN. Required by all agents.

What is server RPC?

Server RPC This is used by servers to handle incoming requests from other agents.

How many ports does Consul need?

Consul requires up to 6 different ports to work properly, some on TCP, UDP, or both protocols. Below we document the requirements for each port.

image

Table of Contents

See more on support.hashicorp.com

Potential Failure Modes

  • There's a variety of ways network communication between two or more agents can be disrupted. Some of the most common include: 1. Hardware firewall rules blocking required ports.This can be overlooked in some scenarios due to mistakenly believing network traffic isn't traversing the firewall when it actually is (so no network rules are configured to allow the traffic through). 2. So…
See more on support.hashicorp.com

Testing Network Connectivity Between Agents

  • There are a few ways you can check network connectivity. Depending upon the exact kind of issue, you might be able to discover problems with very basic checks. In other scenarios, more extensive testing may be required.
See more on support.hashicorp.com

Resolving The Underlying Cause

  • Once you've identified that traffic is being blocked, the next step is to determine what's blocking the traffic. As mentioned earlier, there are a variety of potential causes. We'll address them one-by-one here to help you identify the source of the issue.
See more on support.hashicorp.com

1.Required Ports | Consul by HashiCorp

Url:https://www.consul.io/docs/install/ports

10 hours ago 9 rows · As of Consul 0.8 the WAN join flooding feature requires the Serf WAN port (TCP/UDP) to be ...

2.Different ports used by consul - Stack Overflow

Url:https://stackoverflow.com/questions/30684262/different-ports-used-by-consul

31 hours ago  · Consul requires up to 4 different ports to work properly, some on TCP, UDP, or both protocols. Below we document the requirements for each port. Server RPC (Default 8300). This …

3.Checking Consul Network Connectivity – HashiCorp Help …

Url:https://support.hashicorp.com/hc/en-us/articles/1500011608961-Checking-Consul-Network-Connectivity

16 hours ago These ports have been selected as they're generally unused by other applications. Subsequently, question is, what port does consul use? 8301 . Likewise, people ask, which is default port for …

4.Use Consul as a membership provider | Microsoft Docs

Url:https://docs.microsoft.com/en-us/dotnet/orleans/deployment/consul-deployment

24 hours ago Enable ports 80 (HTTP) and 443 (HTTPS) By default, PaperCut NG/MF listens to ports 9191 and 9192 for HTTP and HTTPS communication respectively. These ports have been selected as …

5.Envoy Proxy Configuration | Service Mesh | Consul by …

Url:https://www.consul.io/docs/connect/proxies/envoy

16 hours ago  · Open a command prompt at C:\Consul and run the following command: Consul.exe agent -server -bootstrap -data-dir "C:\Consul\Data" -client=0.0.0.0 In the preceding …

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9