Check the Status of the UI Service
Check the Status of the UI Service in Unable to Access UI.
Check the Status of the UI Service#
As the UI is not functioning, verify the status (which should be running) of the UI service using the following steps:
i. Check the nomad status:
nomad status <service name>
For Example:
nomad status 192.0.2.2_UISERVICE_1
Expected Output:
ID = 192.0.2.2_UISERVICE_1
Name = 192.0.2.2_UISERVICE_1
Submit Date = 2023-08-05T14:48:04+05:30
Type = service
Priority = 50
Datacenters = dc1
Namespace = default
Status = running
Periodic = false
Parameterized = false
Summary
Task Group Queued Starting Running Failed Complete Lost Unknown
192.0.2.2_UISERVICE_1 0 0 1 0 0 0 0
Latest Deployment
ID = 823d144f
Status = successful
Description = Deployment completed successfully
Deployed
Task Group Desired Placed Healthy Unhealthy Progress Deadline
192.0.2.2_UISERVICE_1 1 1 1 0 2023-08-05T15:00:09+05:30
Allocations
ID Node ID Task Group Version Desired Status Created Modified
80c9728a 5681f4b3 192.0.2.2_UISERVICE_1 0 run running 16d19h ago 16d19h ago
In the above output, check the following:
- Status should be running.
ii. Collect the allocation id and execute the below command:
nomad status <allocation id>
For Example:
nomad status 80c9728a
Expected Output:
ID = 80c9728a-ad42-e2bd-c4b0-099b3f112f64
Eval ID = 09935b89
Name = 192.0.2.2_UISERVICE_1.203.0.113.63_UISERVICE_1[0]
Node ID = 5681f4b3
Node Name = server2.example
Job ID = 192.0.2.2_UISERVICE_1
Job Version = 0
Client Status = running
Client Description = Tasks are running
Desired Status = run
Created = 16d19h ago
Modified = 16d19h ago
Deployment ID = 823d144f
Deployment Health = healthy
Allocation Addresses:
Label Dynamic Address
*jmx_port yes 192.0.2.17:11106 -> 11106
*ui_port yes 192.0.2.17:8990 -> 8990
Task "198.51.100.1_UISERVICE_1" is "running"
Task Resources:
CPU Memory Disk Addresses
11/500 MHz 387 MiB/1.0 GiB 300 MiB
Task Events:
Started At = 2023-08-05T09:19:53Z
Finished At = N/A
Total Restarts = 0
Last Restart = N/A
Recent Events:
Time Type Description
2023-08-05T14:49:53+05:30 Started Task started by client
2023-08-05T14:49:52+05:30 Task Setup Building Task Directory
2023-08-05T14:49:52+05:30 Received Task received by client
In the above output, check under the Recent events > Description section for any errors.
Inspect the HAProxy Service Status#
When accessing the User Interface through HAProxy, it is essential to monitor the HAProxy service status regularly. The process is as follows:
1. Execute the following command to inspect the status of the HAProxy service:
nomad status haproxy
Expected Output:
ID = haproxy
Name = haproxy
Submit Date = 2023-08-06T00:15:50+05:30
Type = service
Priority = 50
Datacenters = dc1
Namespace = default
Status = running
Periodic = false
Parameterized = false
Summary
Task Group Queued Starting Running Failed Complete Lost Unknown
haproxy-node1 0 0 1 0 0 0 0
Latest Deployment
ID = ee6cb851
Status = successful
Description = Deployment completed successfully
Deployed
Task Group Desired Placed Healthy Unhealthy Progress Deadline
haproxy-node1 1 1 1 0 2023-08-06T00:26:18+05:30
Allocations
ID Node ID Task Group Version Desired Status Created Modified
5d2632c2 fd797122 haproxy-node1 0 run running 2d10h ago 2d10h ago
2. Collect the allocation ID and execute the below command:
nomad status <haproxy-allocation-id>
For Example:
nomad status 5d2632c2
Expected Output:
ID = 5d2632c2-460e-9915-8da2-42a72c64f2d9
Eval ID = 93d9dd3f
Name = haproxy.haproxy-node1[0]
Node ID = fd797122
Node Name = server-01.example
Job ID = haproxy
Job Version = 0
Client Status = running
Client Description = Tasks are running
Desired Status = run
Created = 2d10h ago
Modified = 2d10h ago
Deployment ID = ee6cb851
Deployment Health = healthy
Allocation Addresses:
Label Dynamic Address
*haproxy_stats yes 192.0.2.18:9797 -> 9797
*haproxy_datarcvr yes 192.0.2.18:9998 -> 9998
*jaeger_port yes 192.0.2.18:9799 -> 9799
*haproxy_grafana yes 192.0.2.18:3001 -> 3001
Task "haproxy-node1" is "running"
Task Resources:
CPU Memory Disk Addresses
22/500 MHz 29 MiB/512 MiB 300 MiB
Task Events:
Started At = 2023-08-05T18:45:51Z
Finished At = N/A
Total Restarts = 0
Last Restart = N/A
Recent Events:
Time Type Description
2023-08-06T00:15:51+05:30 Started Task started by client
2023-08-06T00:15:51+05:30 Task Setup Building Task Directory
2023-08-06T00:15:51+05:30 Received Task received by client
Note: Ensure that the HAProxy service is running.
3. If the HAProxy service is not running, then start the service using the below command:
nomad run haproxy
4. To list the logs, execute the below command:
nomad logs -f <haproxy-allocation-id>
For Example:
nomad logs -f 5d2632c2
Expected Output:
Added group haproxy with gid 1239
Added user haproxy with uid 1239
Trying to start cron
Starting periodic command scheduler: cron.
rsyslog logging is disable)
5. If necessary, you can check the HAProxy logs (root-level) for more detailed information.
i. Check the status of the HAProxy logs by executing the below key-value pair command:
consul kv get --recurse | grep -i haproxy
Expected Output:
connector/grpc/address:haproxy.example
service/consul/http/url:haproxy-node1.example:8500
service/consul/https/url:haproxy-node1.example:8501
service/controlcenter/hostname:haproxy-node1.example
service/dask/ip:haproxy-node1.example
service/haproxy/grpc/port:9998
service/haproxy/ip:192.0.2.18
service/haproxy/log/level:err
service/haproxy/log/status:DISABLE
service/haproxy/node1/hostname:haproxy-node1.example
service/haproxy/node1/ip:192.0.2.18
service/haproxy/node1/port/grafana:3001
service/haproxy/node1/port/http:9998
ii. If the status is DISABLE, then ENABLE it by performing the below steps:
Note: Once the troubleshooting is complete, it's recommended to disable the HAProxy logs as they generate a significant amount of data, consuming storage space, and requiring manual clearing.
a. To update the status, execute the below command:
consul kv put service/haproxy/log/status ENABLE
Expected Output:
[root@server2 heal-redis-microservice]# consul kv put service/haproxy/log/status ENABLE
Success! Data written to: service/haproxy/log/status
b. Execute the same command to check the status:
consul kv get service/haproxy/log/status
Expected Output:
ENABLE
c. After enabling the HAProxy Log, restart the HAProxy:
nomad run haproxy
iii. The logs can be found in below directory:
cd <Installation path>/centralized_logs/haproxy-node<node number>
For Example:
cd /opt/Heal/centralized_logs/haproxy-node1
6. Use the following command to inspect the logs:
tail -f <Installation path>/haproxy.log
For Example:
tail -f /var/log/haproxy.log
If an error occurs, the output will include the error logs for further analysis.
7. Look for any recent activities performed from the client side. This could help you to troubleshoot the connection issue. To do this, you may need to analyze your network traffic or application logs, depending on your setup.