For complex issues please use https://discuss.hashicorp.com/c/consul/, https://github.com/hashicorp/consul/issues or https://groups.google.com/forum/#!forum/consul-tool.
consul_config_entry
syntax with terraform? I have hundreds of consul intentions and changing all these by hand is toing to take forever.# This was correct in version 2.10.0
resource "consul_intention" "database" {
source_name = "api"
destination_name = "db"
action = "allow"
}
# This is now the correct configuration starting version 2.11.0
resource "consul_config_entry" "database" {
name = "db"
kind = "service-intentions"
config_json = jsonencode({
Sources = [{
Action = "allow"
Name = "api"
Precedence = 9
Type = "consul"
}]
})
}
# From consul agent on the host (log level is trace):
agent.envoy.xds: Incremental xDS v3: xdsVersion=v3 direction=request protobuf="{ "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster"
agent.envoy.xds: subscribing to type: xdsVersion=v3 typeUrl=type.googleapis.com/envoy.config.cluster.v3.Cluster
agent.envoy.xds: watching proxy, pending initial proxycfg snapshot for xDS: service_id=_nomad-task-6227f408-bee9-77fa-529f-924164f42b80-group-api-count-api-9001-sidecar-proxy xdsVersion=v3
agent.envoy.xds: Got initial config snapshot: service_id=_nomad-task-6227f408-bee9-77fa-529f-924164f42b80-group-api-count-api-9001-sidecar-proxy xdsVersion=v3
agent.envoy: Error handling ADS delta stream: xdsVersion=v3 error="rpc error: code = PermissionDenied desc = permission denied"
# From envoy stderr in the envoy sidecar container (log level is trace):
DeltaAggregatedResources gRPC config stream closed: 7, permission denied
gRPC update for type.googleapis.com/envoy.config.cluster.v3.Cluster failed
gRPC update for type.googleapis.com/envoy.config.listener.v3.Listener failed
hello. I have a working mesh gateway with wan federation. from both datacenters I can curl /v1/catalog/services?dc=<other-dc> and see the services running there and "consul members -wan" shows servers in both dcs
however, services themselves (e.g. the socat example) cannot connect between the DCs
The only errors I see in the consul logs are on the secondary DC where there are lots of warnings:
Err :connection error: desc = "transport: Error while dialing dial tcp <internal ip of server in primary dc>:8300: i/o timeout"
I outlined the issue here https://discuss.hashicorp.com/t/unable-to-connect-services-between-datacenters-despite-working-mesh-gateways/28721
I would really appreciate any help as I'm completely stuck
blockquote Node Address Status Type Build Protocol DC Segment
jake.no-dns.co.uk 10.11.216.234:8301 alive server 1.10.1 2 bathstable <all>
nog.no-dns.co.uk 10.11.216.182:8301 alive server 1.10.1 2 bathstable <all>
wesley.no-dns.co.uk 10.11.216.81:8301 alive server 1.10.1 2 bathstable <all>
anton.no-dns.co.uk 10.11.216.165:8301 alive client 1.10.1 2 bathstable <default>
archer.no-dns.co.uk 127.0.0.1:8301 alive client 1.10.1 2 bathstable <default>
c8test2.no-dns.co.uk 10.11.216.207:8301 alive client 1.10.1 2 bathstable <default>
dukat.no-dns.co.uk 10.11.216.194:8301 alive client 1.10.1 2 bathstable <default>
garak.no-dns.co.uk 10.11.216.160:8301 alive client 1.10.1 2 bathstable <default>
janeway.no-dns.co.uk 10.11.216.116:8301 alive client 1.10.1 2 bathstable <default>
jarvis.no-dns.co.uk 10.11.216.4:8301 alive client 1.10.1 2 bathstable <default>
lcars.no-dns.co.uk 10.11.216.2:8301 alive client 1.10.1 2 bathstable <default>
lemon.no-dns.co.uk 10.11.216.5:8301 alive client 1.9.6 2 bathstable <default>
paris.no-dns.co.uk 10.11.216.64:8301 alive client 1.10.1 2 bathstable <default>
riker.no-dns.co.uk 10.11.216.6:8301 alive client 1.10.1 2 bathstable <default>
ro.no-dns.co.uk 10.11.216.78:8301 alive client 1.10.1 2 bathstable <default>
router.no-dns.co.uk 10.11.216.1:8301 alive client 1.10.1 2 bathstable <default>
tpol.no-dns.co.uk 10.11.216.192:8301 alive client 1.10.1 2 bathstable <default>
Aug 27 17:22:07 archer consul[1726]: 2021-08-27T17:22:07.419Z [WARN] agent.client.memberlist.lan: memberlist: Was able to connect to ro.no-dns.co.uk but other probes failed, network may be misconfigured
Aug 27 17:22:08 archer consul[1726]: 2021-08-27T17:22:08.419Z [WARN] agent.client.memberlist.lan: memberlist: Was able to connect to riker.no-dns.co.uk but other probes failed, network may be misconfigured
Aug 27 17:22:08 archer consul[1726]: 2021-08-27T17:22:08.969Z [WARN] agent.client.memberlist.lan: memberlist: Refuting a suspect message (from: archer.no-dns.co.uk)
Aug 27 17:22:09 archer consul[1726]: 2021-08-27T17:22:09.420Z [WARN] agent.client.memberlist.lan: memberlist: Was able to connect to router.no-dns.co.uk but other probes failed, network may be misconfigured
Aug 27 17:22:10 archer consul[1726]: 2021-08-27T17:22:10.421Z [WARN] agent.client.memberlist.lan: memberlist: Was able to connect to dukat.no-dns.co.uk but other probes failed, network may be misconfigured