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.
kubectl exec consul-consul-server-0 -n consul -- curl -sk https://localhost:8501/v1/connect/ca/roots | jq -r .Roots[0].RootCert
Could you please advise?
Hi, needed a bit of clarification around the below,
The service name registered in Consul will be set to the name of the Kubernetes service associated with the Pod. This can be customized with the consul.hashicorp.com/connect-service annotation. If using ACLs, this name must be the same as the Pod's ServiceAccount name.
Is it mandatory for the service name to be same as service account or is it only mandatory when we use the annotation consul.hashicorp.com/connect-service
?
local_app::default_priority::max_pending_requests::1024
local_app::default_priority::max_requests::1024
local_app::default_priority::max_retries::3
local_app::high_priority::max_connections::1024
local_app::high_priority::max_pending_requests::1024
local_app::high_priority::max_requests::1024
local_app::high_priority::max_retries::3
1.11.2 deb package does not ship with empty /etc/consul.d/consul.env
anymore which is used by consul.service:
[Service]
EnvironmentFile=/etc/consul.d/consul.env
...
this causes consul to fail on startup
Jan 14 10:47:39 REDACTED systemd[1]: consul.service: Failed to load environment files: No such file or directory
Hi all,
I got this error,
Error creating: Internal error occurred: failed calling webhook "consul-consul-connect-injector.consul.hashicorp.com": failed to call webhook: Post "https://consul-consul-connect-injector-svc.myconsulns.svc:443/mutate?timeout=10s": dial tcp 10.105.230.122:443: i/o timeout
while I was trying to deploy the Deployment.
My 3 Consul servers are outside Kubernetes.
I install Consul clients using Helm.
(All Consul v1.11.2)
when I use this command to see logs
"kubectl -n myconsulns logs -f pod/consul-consul-connect-injector-webhook-deployment-59d4d85bg79sk"
2022-01-18T05:58:32.603Z ERROR controller.endpoints failed to get service instances {"name": "consul-consul-connect-injector-svc", "error": "Get \"http://192.168.90.187:8500/v1/agent/services?filter=Meta%5B%22k8s-service-name%22%5D+%3D%3D+%22consul-consul-connect-injector-svc%22+and+Meta%5B%22k8s-namespace%22%5D+%3D%3D+%22myconsulns%22+and+Meta%5B%22managed-by%22%5D+%3D%3D+%22consul-k8s-endpoints-controller%22\": dial tcp 192.168.90.187:8500: i/o timeout"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
In Helm, if I set "connectInject.failurePolicy " to be "Fail", I got the above error.
(If I set "connectInject.failurePolicy " to be "Ignore", I will not get the above error. But there are no SlideCars when I see via "consul catalog services" command)
Could anyone suggest to me how to solve this issue, please.
consul-k8s
project and using it to sync k8s to consul. Looks like that services are synced to consul only on what is called fullSync
and on changes. From the comments in the code of the consul-k8s
it seems that it should sync changes when they happen and only on full sync (happens every 30 seconds by default). Have anyone else encountered this? is this on purpose?
Hello all, I am running a 3 node consul cluster (version v1.11.2), when i perform a DNS look up from consul cluster node 01,:
dig +short @localhost -p 8600 consul.service.us-west.consul SRV +tcp
1 1 8300 <REDACTED>-consul-server-01.node.us-west.consul.
1 1 8300 <REDACTED>-consul-server-02.node.us-west.consul.
1 1 8300 <REDACTED>-consul-server-03.node.us-west.consul.
However from consul cluster node 02 and 03, I don't get an authoritative answer for
dig +short @localhost -p 8600 consul.service.us-west.consul SRV +tcp
Any pointers to debug this is super appreciated
We have a setup with an ingress gateway in one datacenter and services that it routes to in other datacenters (using a failover block of a service-resolver) but it doesn't reflect in the topology view (running 1.9.7)
Is this something that is reflected in the topology in a newer version of consul? I wanted to ask before I submitted a feature request that has already been implemented
Hello, I've got Consul 1.9.7 installed with TLS. I used the built-in CA of Consul to generate the server and client certificates. I followed the Secure Consul Agent Communication with TLS Encryption tutorial. I now want to use the API and am getting some errors from curl
:
# curl -k https://localhost:8501/v1/agent/self
curl: (58) NSS: client certificate not found (nickname not specified)
What might be the issue here?
"verify_incoming": true,
in the configuration file. So from what I understand, I need to supply the relevant certificates with curl
curl
still fails# curl -vk https://localhost:8501/v1/agent/self --cacert /etc/consul/tls/<hidden>-agent-ca.pem --key /etc/consul/tls/<hidden>.pem --cert /etc/consul/tls/<hidden>-key.pem
* About to connect() to localhost port 8501 (#0)
* Trying ::1...
* Connected to localhost (::1) port 8501 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* unable to load client cert: -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
* NSS error -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
* Unknown PKCS #11 error.
* Closing connection 0
curl: (58) unable to load client cert: -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
# curl -vk https://localhost:8501/v1/agent/self --cacert ./<hidden>-agent-ca.pem --key ./<hidden>-key.pem --cert ./<hidden>.pem
* About to connect() to localhost port 8501 (#0)
* Trying ::1...
* Connected to localhost (::1) port 8501 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* unable to load client key: -8178 (SEC_ERROR_BAD_KEY)
* NSS error -8178 (SEC_ERROR_BAD_KEY)
* Peer's public key is invalid.
* Closing connection 0
curl: (58) unable to load client key: -8178 (SEC_ERROR_BAD_KEY)
curl
from source with OpenSSL
instead of the CentOS default of NSS
and that solved my issue. The question remains, how can I overcome this with a default curl
in my CentOS distro that is compiled with NSS
and while using the built-in Consul TLS creation tool?# ./curl/curl-7.67.0/src/curl -sk https://localhost:8501/v1/status/leader --key ./<hidden>-key.pem --cert ./<hidden>.pem | jq
"<hidden>.<hidden>.<hidden>.<hidden>:8300"
server.dc1.consul
need to have the server
prefix? For ex. server.eu.mydomain.com
or can it be hostname.eu.mydomain.com
? The tutorial isn't very informative on this matter (IMHO). What's the Consul internal usage for the word server
in this case?