# Docker container | VCHI initialization failed

**URL:** <https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844>\
**Category:** Telegraf\
**Tags:** influxdb, grafana, docker, raspberry\
**Created:** [December 22, 2022, 6:35pm UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844 "2022-12-22T18:35:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takeru](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/takeru/32/11687_2.png) [@Takeru](https://community.influxdata.com/u/Takeru)\
**Post date:** [December 22, 2022, 6:35pm UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844/1 "2022-12-22T18:35:44Z")

</div>

Hey everyone.  
I’m currently in the process of setting up Telegraf, InfluxDB and Grafana within Docker using Portainer.  
Everything is working fine, except for Telegraf which is causing me some issues.

This is my docker-compose file for it

```auto
services:
  telegraf:
    hostname: raspberrypi3b
    container_name: git_telegraf
    image: telegraf:latest

    volumes:
    - /home/pi/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
    - /var/run/docker.sock:/var/run/docker.sock:ro

    - /usr/bin/vcgencmd:/usr/bin/vcgencmd
    - /usr/lib/arm-linux-gnueabihf/libvcos.so.0:/usr/lib/arm-linux-gnueabihf/libvcos.so.0
    - /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0:/usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0
            
    devices:    
    - "/dev/vchiq"
    ports:
    - '8125:8125/udp'

```

The issues is that I keep getting VCHI initialization failed and so far the only way of fixing this is to connect to the docker container and execute the following command: `chmod 766 /dev/vchiq`  
So it seems that it’s some sort of permission issue but I have no clue what to do against it at this point.  
I’ve tried the following things by adding them to the docker-compose file:  
`user: root`  
`privileged: true`

```auto
group_add:
      - video

```

None of which have worked at all.  
Does anybody have any suggestions? I would greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [January 3, 2023, 3:44pm UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844/2 "2023-01-03T15:44:02Z")

</div>

> [@Takeru](#):
>
> VCHI initialization failed

Make sure the user is in the `video` group. You can test this by running `vcgencmd version` as the user.

---

<div class="post-metadata">

**Author:** ![Takeru](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/takeru/32/11687_2.png) [@Takeru](https://community.influxdata.com/u/Takeru)\
**Post date:** [January 13, 2023, 11:59am UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844/3 "2023-01-13T11:59:58Z")

</div>

Sorry for the late reply.  
I checked and the user isn’t inside the group.  
I tried adding the user to the group within the docker compose file with

```auto
group_add:
      - video

```

but that doesn’t seem to work.

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [January 13, 2023, 1:39pm UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844/4 "2023-01-13T13:39:00Z")

</div>

Have you tried logging into the container and ensuring that the command outside of telegraf works (e.g. `run the `vcgencmd` version as the user).

---

<div class="post-metadata">

**Author:** ![Takeru](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/takeru/32/11687_2.png) [@Takeru](https://community.influxdata.com/u/Takeru)\
**Post date:** [January 20, 2023, 5:55pm UTC](https://community.influxdata.com/t/docker-container-vchi-initialization-failed/27844/5 "2023-01-20T17:55:56Z")

</div>

I connected to the container and I’m able to run the `vcgencmd` command.  
Also I checked to see under which user the container is running and what groups it was part of, which showed me it was `telegraf (999)`.  
Even though I tried adding the user to the video group within the docker-compose it didn’t show that it was part of that group.  
However when I manually connected to the docker as the same user `telegraf (999)`, I was able to see that I am in the group `video`.  
I’m not sure what’s going on here…
