Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions microservices/dlstreamer-pipeline-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ Refer [here](https://docs.openedgeplatform.intel.com/edge-ai-libraries/dlstreame
```
---

## Troubleshooting
- [Troubleshooting Guide](docs/user-guide/troubleshooting-guide.md)

---
## Learn More

- Understand the components, services, architecture, and data flow, in the [Overview](https://docs.openedgeplatform.intel.com/edge-ai-libraries/dlstreamer-pipeline-server/main/user-guide/Overview.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,5 @@ ntp
bitrate
kbps
kb
VA-API
VA-API
Troubleshooting
Original file line number Diff line number Diff line change
Expand Up @@ -111,96 +111,7 @@ For alternative ways to set up the microservice, see:
- [How to Deploy with Helm](./how-to-deploy-with-helm.md)

## Troubleshooting

- **Using REST API in Image Ingestor mode has low first inference latency**

This is an expected behavior observed only for the first inference. Subsequent inferences would be considerably faster.
For inference on GPU, the first inference might be even slower. Latency for up to 15 seconds have been observed for image requests inference on GPU.
When in `sync` mode, we suggest users to provide a `timeout` with a value to accommodate for the first inference latency to avoid request time out.
Read [here](./advanced-guide/detailed_usage/rest_api/restapi_reference_guide.md#post-pipelinesnameversioninstance_id) to learn more about the API.


- **Axis RTSP camera freezes or pipeline stops**

Restart the DL Streamer pipeline server container with the pipeline that has this rtsp source.


- **Deploying with Intel GPU K8S Extension on ITEP**

If you're deploying a GPU based pipeline (example: with VA-API elements like `vapostproc`, `vah264dec` etc., and/or with `device=GPU` in `gvadetect` in `dlstreamer_pipeline_server_config.json`) with Intel GPU k8s Extension on ITEP, ensure to set the below details in the file `helm/values.yaml` appropriately in order to utilize the underlying GPU.
```sh
gpu:
enabled: true
type: "gpu.intel.com/i915"
count: 1
```

- **Deploying without Intel GPU K8S Extension**

If you're deploying a GPU based pipeline (example: with VA-API elements like `vapostproc`, `vah264dec` etc., and/or with `device=GPU` in `gvadetect` in `dlstreamer_pipeline_server_config.json`) without Intel GPU k8s Extension, ensure to set the below details in the file `helm/values.yaml` appropriately in order to utilize the underlying GPU.
```sh
privileged_access_required: true
```

- **Using RTSP/WebRTC streaming, S3_write or MQTT fails with GPU elements in pipeline**

If you are using GPU elements in the pipeline, RTSP/WebRTC streaming, S3_write and MQTT will not work because these are expects CPU buffer. \
Add `vapostproc ! video/x-raw` before appsink element or `jpegenc` element(in case you are using S3_write) in the GPU pipeline.
```sh
# Sample pipeline

"pipeline": "{auto_source} name=source ! parsebin ! vah264dec ! vapostproc ! video/x-raw(memory:VAMemory) ! gvadetect name=detection model-instance-id=inst0 ! queue ! gvafpscounter ! gvametaconvert add-empty-results=true name=metaconvert ! gvametapublish name=destination ! vapostproc ! video/x-raw ! appsink name=appsink"
```

- **RTSP streaming fails if you are using udfloader**

If you are using udfloader<link> pipeline RTSP streaming will not work because RTSP pipeline does not support RGB, BGR or Mono format.
If you are using `udfloader pipeline` or `RGB, BGR or GRAY8` format in the pipeline, add `videoconvert ! video/x-raw, format=(string)NV12` before `appsink` element in pipeline.
```sh
# Sample pipeline

"pipeline": "{auto_source} name=source ! decodebin ! videoconvert ! video/x-raw,format=RGB ! udfloader name=udfloader ! gvametaconvert add-empty-results=true name=metaconvert ! gvametapublish name=destination ! videoconvert ! video/x-raw, format=(string)NV12 ! appsink name=appsink"
```

- **Resolving Time Sync Issues in Prometheus**

If you see the following warning in Prometheus, it indicates a time sync issue.

**Warning: Error fetching server time: Detected xxx.xxx seconds time difference between your browser and the server.**

You can following the below steps to synchronize system time using NTP.
1. **Install systemd-timesyncd** if not already installed:
```bash
sudo apt install systemd-timesyncd
```

2. **Check service status**:
```bash
systemctl status systemd-timesyncd
```

3. **Configure an NTP server** (if behind a corporate proxy):
```bash
sudo nano /etc/systemd/timesyncd.conf
```
Add:
```ini
[Time]
NTP=corp.intel.com
```
Replace `corp.intel.com` with a different ntp server that is supported on your network.

4. **Restart the service**:
```bash
sudo systemctl restart systemd-timesyncd
```

5. **Verify the status**:
```bash
systemctl status systemd-timesyncd
```

This should resolve the time discrepancy in Prometheus.
- [Troubleshooting Guide](./troubleshooting-guide.md)

## Known Issues

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@
Refer to tutorials such as <https://adamtheautomator.com/install-kubernetes-ubuntu> and many other
online tutorials to setup kubernetes cluster on the web with host OS as ubuntu 22.04.
- For helm installation, refer to [helm website](https://helm.sh/docs/intro/install/)
- Clone the Edge-AI-Libraries repository from open edge platform and change to the docker directory inside DL Streamer Pipeline Server project.

```sh
cd [WORKDIR]
git clone https://github.com/open-edge-platform/edge-ai-libraries.git
cd edge-ai-libraries/microservices/dlstreamer-pipeline-server/helm
```

## Quick try out
Follow the steps in this section to quickly pull the latest pre-built DL Streamer Pipeline Server helm charts followed by running a sample usecase.

### Pull the helm chart
### Pull the helm chart (Optional)

- Note: The helm chart should be downloaded when you are not using the helm chart provided in `edge-ai-libraries/microservices/dlstreamer-pipeline-server/helm`

- Download helm chart with the following command

Expand Down Expand Up @@ -46,10 +55,11 @@ Update the below fields in `values.yaml` file in the helm chart

### Run default sample

Once the pods are up, we will send a pipeline request to DL Streamer Pipeline Server to run a detection model on a warehouse video. Both the model and video are provided as default sample in the docker image.
Once the pods are up, we will send a pipeline request to DL Streamer Pipeline Server to run a detection model on a warehouse video.
The resources such as video and model are copied into `dlstreamer-pipeline-server` pod by `initContainers`.

We will send the below curl request to run the inference.
It comprises of a source file path which is `warehouse.avi`, a destination, with metadata directed to a json fine in `/tmp/resuts.jsonl` and frames streamed over RTSP with id `pallet_defect_detection`. Additionally, we will also provide the GETi model path that would be used for detecting defective boxes on the video file.
It comprises of a source file path which is `warehouse.avi`, a destination, with metadata directed to a json file in `/tmp/resuts.jsonl` and frames streamed over RTSP with id `pallet_defect_detection`. Additionally, we will also provide the GETi model path that would be used for detecting defective boxes on the video file.

Open another terminal and send the following curl request
```sh
Expand Down Expand Up @@ -108,6 +118,8 @@ To check the pipeline status and stop the pipeline send the following requests,

Now you have successfully run the DL Streamer Pipeline Server container, sent a curl request to start a pipeline within the microservice which runs the Geti based pallet defect detection model on a sample warehouse video. Then, you have also looked into the status of the pipeline to see if everything worked as expected and eventually stopped the pipeline as well.

## Troubleshooting
- [Troubleshooting Guide](./troubleshooting-guide.md)

## Summary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
overview-architecture
system-requirements
get-started
troubleshooting-guide

.. toctree::
:caption: How to
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Troubleshooting

## Using REST API in Image Ingestor mode has low first inference latency

This is an expected behavior observed only for the first inference. Subsequent inferences would be considerably faster.
For inference on GPU, the first inference might be even slower. Latency for up to 15 seconds have been observed for image requests inference on GPU.
When in `sync` mode, we suggest users to provide a `timeout` with a value to accommodate for the first inference latency to avoid request time out.
Read [here](./advanced-guide/detailed_usage/rest_api/restapi_reference_guide.md#post-pipelinesnameversioninstance_id) to learn more about the API.


## Axis RTSP camera freezes or pipeline stops

Restart the DL Streamer pipeline server container with the pipeline that has this rtsp source.


## Deploying with Intel GPU K8S Extension

If you're deploying a GPU based pipeline (example: with VA-API elements like `vapostproc`, `vah264dec` etc., and/or with `device=GPU` in `gvadetect` in `dlstreamer_pipeline_server_config.json`) with Intel GPU k8s Extension, ensure to set the below details in the file `helm/values.yaml` appropriately in order to utilize the underlying GPU.
```sh
gpu:
enabled: true
type: "gpu.intel.com/i915"
count: 1
```

## Deploying without Intel GPU K8S Extension

If you're deploying a GPU based pipeline (example: with VA-API elements like `vapostproc`, `vah264dec` etc., and/or with `device=GPU` in `gvadetect` in `dlstreamer_pipeline_server_config.json`) without Intel GPU k8s Extension, ensure to set the below details in the file `helm/values.yaml` appropriately in order to utilize the underlying GPU.
```sh
privileged_access_required: true
```

## Using RTSP/WebRTC streaming, S3_write or MQTT fails with GPU elements in pipeline

If you are using GPU elements in the pipeline, RTSP/WebRTC streaming, S3_write and MQTT will not work because these are expects CPU buffer. \
Add `vapostproc ! video/x-raw` before appsink element or `jpegenc` element(in case you are using S3_write) in the GPU pipeline.
```sh
# Sample pipeline

"pipeline": "{auto_source} name=source ! parsebin ! vah264dec ! vapostproc ! video/x-raw(memory:VAMemory) ! gvadetect name=detection model-instance-id=inst0 ! queue ! gvafpscounter ! gvametaconvert add-empty-results=true name=metaconvert ! gvametapublish name=destination ! vapostproc ! video/x-raw ! appsink name=appsink"
```

## RTSP streaming fails if you are using udfloader

If you are using udfloader<link> pipeline RTSP streaming will not work because RTSP pipeline does not support RGB, BGR or Mono format.
If you are using `udfloader pipeline` or `RGB, BGR or GRAY8` format in the pipeline, add `videoconvert ! video/x-raw, format=(string)NV12` before `appsink` element in pipeline.
```sh
# Sample pipeline

"pipeline": "{auto_source} name=source ! decodebin ! videoconvert ! video/x-raw,format=RGB ! udfloader name=udfloader ! gvametaconvert add-empty-results=true name=metaconvert ! gvametapublish name=destination ! videoconvert ! video/x-raw, format=(string)NV12 ! appsink name=appsink"
```

## Resolving Time Sync Issues in Prometheus

If you see the following warning in Prometheus, it indicates a time sync issue.

**Warning: Error fetching server time: Detected xxx.xxx seconds time difference between your browser and the server.**

You can following the below steps to synchronize system time using NTP.
1. **Install systemd-timesyncd** if not already installed:
```bash
sudo apt install systemd-timesyncd
```

2. **Check service status**:
```bash
systemctl status systemd-timesyncd
```

3. **Configure an NTP server** (if behind a corporate proxy):
```bash
sudo nano /etc/systemd/timesyncd.conf
```
Add:
```ini
[Time]
NTP=corp.intel.com
```
Replace `corp.intel.com` with a different ntp server that is supported on your network.

4. **Restart the service**:
```bash
sudo systemctl restart systemd-timesyncd
```

5. **Verify the status**:
```bash
systemctl status systemd-timesyncd
```

This should resolve the time discrepancy in Prometheus.

## WebRTC Stream on web browser
The firewall may prevent you from viewing the video stream on web browser. Please disable the firewall using this command.
```sh
sudo ufw disable
```

## Error Logs

View the container logs using this command.
```sh
docker logs -f <CONTAINER_NAME>
```
5 changes: 4 additions & 1 deletion microservices/dlstreamer-pipeline-server/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Steps to deploy the helm chart:

- Note: Incase you do not have a k8s cluster, then please follow the steps mentioned in 'Setup k8s cluster' below before deploying the helm chart.
- Get into the helm directory
- Get into the helm directory (where this README.md exists)
`cd helm`
- Update the below fields in `values.yaml` file in the helm chart
``` sh
Expand All @@ -14,6 +14,7 @@
`helm install dlsps . -n apps --create-namespace`
- Check if Deep Learning Streamer Pipeline Server is running fine
`kubectl get pods --namespace apps`and monitor its logs using `kubectl logs -f <pod_name> -n apps`
- The resources such as video and model are copied into `dlstreamer-pipeline-server` pod by `initContainers`.
- Send the curl command to start the pallet defect detection pipeline
``` sh
curl http://localhost:30007/pipelines/user_defined_pipelines/pallet_defect_detection -X POST -H 'Content-Type: application/json' -d '{
Expand Down Expand Up @@ -42,6 +43,8 @@
```
- Open VLC media player on your windows system. Cick on Media -> Open Network Stream -> Enter `rtsp://<Host_IP_where_Deep_Learning_Streamer_Pipeline_Server_is_running>:30025/pallet-defect-detection` in network URL tab and hit Play to see the visualization.

## Troubleshooting
- [Troubleshooting Guide](../docs/user-guide/troubleshooting-guide.md)

## Setup k8s cluster

Expand Down
Loading
Loading