-
Issue How to enable more logs for consul agent i.e. something similar to Why is this important ? Need to check how all the services are brought up while executing docker compose up -d. Description Currently below is my .yml configuration for consul : consul:
command:
- agent
- -ui
- -bootstrap
- -server
- -client
- 0.0.0.0
container_name: edgex-core-consul
environment:
WRITABLE_LOGLEVEL: TRACE
hostname: edgex-core-consul
image: hashicorp/consul:1.16.6
networks:
edgex-network: null
ports:
- mode: ingress
host_ip: 127.0.0.1
target: 8500
published: "8500"
protocol: tcp
read_only: true
restart: always
security_opt:
- no-new-privileges:true
user: root:root
volumes:
- type: volume
source: consul-config
target: /consul/config
volume: {}
- type: volume
source: consul-data
target: /consul/data
volume: {} Even though trace logs are enabled in the configuration through environment variable I do not see mpunix@LIN-MP22QN1X:~/edgex-foundry/edgex-compose-3.1.1-mqtt$ docker compose logs -f consul
edgex-core-consul | ==> Starting Consul agent...
edgex-core-consul | Version: '1.16.6'
edgex-core-consul | Build Date: '2024-02-13 18:30:24 +0000 UTC'
edgex-core-consul | Node ID: 'da18f415-0bd6-3727-9466-f599fc9b400b'
edgex-core-consul | Node name: 'edgex-core-consul'
edgex-core-consul | Datacenter: 'dc1' (Segment: '<all>')
edgex-core-consul | Server: true (Bootstrap: true)
edgex-core-consul | Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: -1, gRPC-TLS: 8503, DNS: 8600)
edgex-core-consul | Cluster Addr: 172.18.0.4 (LAN: 8301, WAN: 8302)
edgex-core-consul | Gossip Encryption: false
edgex-core-consul | Auto-Encrypt-TLS: false
edgex-core-consul | ACL Enabled: false
edgex-core-consul | Reporting Enabled: false
edgex-core-consul | ACL Default Policy: allow
edgex-core-consul | HTTPS TLS: Verify Incoming: false, Verify Outgoing: false, Min Version: TLSv1_2
edgex-core-consul | gRPC TLS: Verify Incoming: false, Min Version: TLSv1_2
edgex-core-consul | Internal RPC TLS: Verify Incoming: false, Verify Outgoing: false (Verify Hostname: false), Min Version: TLSv1_2
edgex-core-consul |
edgex-core-consul | ==> Log data will now stream in as it occurs:
edgex-core-consul |
edgex-core-consul | 2024-07-19T12:22:16.232Z [WARN] agent: bootstrap = true: do not enable unless necessary
edgex-core-consul | 2024-07-19T12:22:16.245Z [WARN] agent.auto_config: bootstrap = true: do not enable unless necessary
edgex-core-consul | 2024-07-19T12:22:16.274Z [INFO] agent.server.raft: initial configuration: index=1 servers="[{Suffrage:Voter ID:da18f415-0bd6-3727-9466-f599fc9b400b Address:172.18.0.4:8300}]"
edgex-core-consul | 2024-07-19T12:22:16.275Z [INFO] agent.server.raft: entering follower state: follower="Node at 172.18.0.4:8300 [Follower]" leader-address= leader-id=
edgex-core-consul | 2024-07-19T12:22:16.276Z [INFO] agent.server.serf.wan: serf: EventMemberJoin: edgex-core-consul.dc1 172.18.0.4
edgex-core-consul | 2024-07-19T12:22:16.277Z [INFO] agent.server.serf.lan: serf: EventMemberJoin: edgex-core-consul 172.18.0.4
edgex-core-consul | 2024-07-19T12:22:16.277Z [INFO] agent.router: Initializing LAN area manager
edgex-core-consul | 2024-07-19T12:22:16.278Z [INFO] agent.server: Handled event for server in area: event=member-join server=edgex-core-consul.dc1 area=wan
edgex-core-consul | 2024-07-19T12:22:16.278Z [INFO] agent.server: Adding LAN server: server="edgex-core-consul (Addr: tcp/172.18.0.4:8300) (DC: dc1)"
edgex-core-consul | 2024-07-19T12:22:16.281Z [INFO] agent.server.autopilot: reconciliation now disabled
edgex-core-consul | 2024-07-19T12:22:16.285Z [INFO] agent.server.cert-manager: initialized server certificate management
edgex-core-consul | 2024-07-19T12:22:16.286Z [INFO] agent: Started DNS server: address=0.0.0.0:8600 network=udp
edgex-core-consul | 2024-07-19T12:22:16.286Z [INFO] agent: Started DNS server: address=0.0.0.0:8600 network=tcp
edgex-core-consul | 2024-07-19T12:22:16.286Z [INFO] agent: Starting server: address=[::]:8500 network=tcp protocol=http
edgex-core-consul | 2024-07-19T12:22:16.286Z [INFO] agent: Started gRPC listeners: port_name=grpc_tls address=[::]:8503 network=tcp
edgex-core-consul | 2024-07-19T12:22:16.287Z [INFO] agent: started state syncer
edgex-core-consul | 2024-07-19T12:22:16.287Z [INFO] agent: Consul agent running!
edgex-core-consul | 2024-07-19T12:22:22.247Z [WARN] agent.server.raft: heartbeat timeout reached, starting election: last-leader-addr= last-leader-id=
edgex-core-consul | 2024-07-19T12:22:22.247Z [INFO] agent.server.raft: entering candidate state: node="Node at 172.18.0.4:8300 [Candidate]" term=2
edgex-core-consul | 2024-07-19T12:22:22.260Z [INFO] agent.server.raft: election won: term=2 tally=1
edgex-core-consul | 2024-07-19T12:22:22.261Z [INFO] agent.server.raft: entering leader state: leader="Node at 172.18.0.4:8300 [Leader]"
edgex-core-consul | 2024-07-19T12:22:22.261Z [INFO] agent.server: cluster leadership acquired
edgex-core-consul | 2024-07-19T12:22:22.261Z [INFO] agent.server: New leader elected: payload=edgex-core-consul
edgex-core-consul | 2024-07-19T12:22:22.273Z [INFO] agent.server.autopilot: reconciliation now enabled
edgex-core-consul | 2024-07-19T12:22:22.274Z [INFO] agent.leader: started routine: routine="federation state anti-entropy"
edgex-core-consul | 2024-07-19T12:22:22.274Z [INFO] agent.leader: started routine: routine="federation state pruning"
edgex-core-consul | 2024-07-19T12:22:22.274Z [INFO] agent.leader: started routine: routine="streaming peering resources"
edgex-core-consul | 2024-07-19T12:22:22.274Z [INFO] agent.leader: started routine: routine="metrics for streaming peering resources"
edgex-core-consul | 2024-07-19T12:22:22.274Z [INFO] agent.leader: started routine: routine="peering deferred deletion"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] connect.ca: updated root certificates from primary datacenter
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] connect.ca: initialized primary datacenter CA with provider: provider=consul
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="intermediate cert renew watch"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="CA root pruning"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="CA root expiration metric"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="CA signing expiration metric"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="virtual IP version check"
edgex-core-consul | 2024-07-19T12:22:22.300Z [INFO] agent.leader: started routine: routine="config entry controllers"
edgex-core-consul | 2024-07-19T12:22:22.304Z [INFO] agent.server: member joined, marking health alive: member=edgex-core-consul partition=default
edgex-core-consul | 2024-07-19T12:22:22.318Z [INFO] agent.leader: stopping routine: routine="virtual IP version check"
edgex-core-consul | 2024-07-19T12:22:22.318Z [INFO] agent.leader: stopped routine: routine="virtual IP version check"
edgex-core-consul | 2024-07-19T12:22:22.718Z [INFO] agent.server: federation state anti-entropy synced
edgex-core-consul | 2024-07-19T12:22:24.347Z [INFO] agent: Synced node info
edgex-core-consul | 2024-07-19T12:22:33.538Z [INFO] agent: Synced service: service=core-data
edgex-core-consul | 2024-07-19T12:22:33.553Z [INFO] agent: Synced check: check=core-data I need to see when docker compose up -d is done then how is the flow of bringing up all these services ? does consul communicate with any service and then register other service ? this information is needed.Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Please let me know if any further information is needed. Thanks |
Beta Was this translation helpful? Give feedback.
-
Consul is not an EdgeX service. Please check the Consul community for any configuration questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response: I checked consul's documentation and used the following command to enable trace logs in consul: $ consul agent -ui -bootstrap -server -client 127.0.0.1 -bind 127.0.0.1 -advertise 127.0.0.1 -data-dir=tmp/consul -log-level=trace Supporting logs: ==> Starting Consul agent...
Version: '1.19.1'
Build Date: '2024-07-11 14:47:27 +0000 UTC'
Node ID: 'bf15faa9-808c-e1f8-ad6b-206f4583cb8c'
Node name: 'LIN-MP22QN1X'
Datacenter: 'dc1' (Segment: '<all>')
Server: true (Bootstrap: true)
Client Addr: [127.0.0.1] (HTTP: 8500, HTTPS: -1, gRPC: -1, gRPC-TLS: 8503, DNS: 8600)
Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
Gossip Encryption: false
Auto-Encrypt-TLS: false
ACL Enabled: false
Reporting Enabled: false
ACL Default Policy: allow
HTTPS TLS: Verify Incoming: false, Verify Outgoing: false, Min Version: TLSv1_2
gRPC TLS: Verify Incoming: false, Min Version: TLSv1_2
Internal RPC TLS: Verify Incoming: false, Verify Outgoing: false (Verify Hostname: false), Min Version: TLSv1_2
==> Log data will now stream in as it occurs:
2024-07-27T19:13:39.967+0530 [WARN] agent: bootstrap = true: do not enable unless necessary
2024-07-27T19:13:39.971+0530 [TRACE] agent.tlsutil: Update: version=1
2024-07-27T19:13:39.973+0530 [TRACE] agent.tlsutil: OutgoingRPCWrapper: version=1
2024-07-27T19:13:39.973+0530 [TRACE] agent.tlsutil: OutgoingALPNRPCWrapper: version=1
2024-07-27T19:13:39.981+0530 [TRACE] agent: [core][Channel #1] Channel created
2024-07-27T19:13:39.983+0530 [TRACE] agent: [core][Channel #1] original dial target is: "consul://dc1.bf15faa9-808c-e1f8-ad6b-206f4583cb8c/server.dc1"
2024-07-27T19:13:39.983+0530 [TRACE] agent: [core][Channel #1] parsed dial target is: {URL:{Scheme:consul Opaque: User: Host:dc1.bf15faa9-808c-e1f8-ad6b-206f4583cb8c Path:/server.dc1 RawPath: OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}}
2024-07-27T19:13:39.983+0530 [TRACE] agent: [core][Channel #1] Channel authority set to "server.dc1"
2024-07-27T19:13:39.985+0530 [TRACE] agent: [core][Channel #1] Resolver state updated: {
"Addresses": null,
"Endpoints": [],
"ServiceConfig": null,
"Attributes": null
} () Thanks |
Beta Was this translation helpful? Give feedback.
Consul is not an EdgeX service. Please check the Consul community for any configuration questions.