Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage docker container not showing statistics of containers #162

Open
YamiYukiSenpai opened this issue May 22, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@YamiYukiSenpai
Copy link

I'm setting up this thing called Homepage

I'm following these documentations to setup a form of Docker statistics view:
https://gethomepage.dev/main/configs/services/#docker-integration
https://gethomepage.dev/main/configs/docker/

However, my Jellyfin docker container only shows "API Error"
image|690x248

Docker logs:

[2024-05-01T03:18:59.940Z] error: <dockerStatusService> TypeError: Cannot read properties of null (reading 'conn')
    at handler (/app/.next/server/pages/api/docker/status/[...service].js:89:86)
    at Object.apiResolver (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/api-utils/node.js:366:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:481:9)
    at async Object.fn (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:741:37)
    at async Router.execute (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/router.js:252:36)
    at async NextNodeServer.run (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:365:29)
    at async NextNodeServer.handleRequest (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:303:20)
    at async Server.<anonymous> (/app/server.js:19:5)
[2024-05-01T03:18:59.941Z] error: <dockerStatsService> TypeError: Cannot read properties of null (reading 'conn')
    at handler (/app/.next/server/pages/api/docker/stats/[...service].js:89:86)
    at Object.apiResolver (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/api-utils/node.js:366:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:481:9)
    at async Object.fn (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:741:37)
    at async Router.execute (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/router.js:252:36)
    at async NextNodeServer.run (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:365:29)
    at async NextNodeServer.handleRequest (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:303:20)
    at async Server.<anonymous> (/app/server.js:19:5)
[2024-05-01T03:18:59.969Z] error: <service-helpers> Error getting services from Docker server 'my-docker': Error: connect ECONNREFUSED 127.0.0.1:2375
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 2375
}

docker-compose.yml

version: "3.3"
services:
  homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    ports:
      - 3000:3000
    volumes:
      - /home/docker/homepage/config:/app/config # Make sure your local config directory exists
      - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations

  dockerproxy:
    image: ghcr.io/tecnativa/docker-socket-proxy:latest
    container_name: dockerproxy
    environment:
      - CONTAINERS=1 # Allow access to viewing containers
      - SERVICES=1 # Allow access to viewing services (necessary when using Docker Swarm)
      - TASKS=1 # Allow access to viewing tasks (necessary when using Docker Swarm)
      - POST=0 # Disallow any POST operations (effectively read-only)
    ports:
      - 127.0.0.1:2375:2375
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro # Mounted as read-only
    restart: unless-stopped

config/docker.yaml

---
# For configuration options and examples, please see:
# https://gethomepage.dev/latest/configs/docker/

my-docker:
  host: 127.0.0.1
  port: 2375

# my-docker:
#   socket: /var/run/docker.sock

config/services.yaml

- Media:
    - Jellyfin:
        href: http://192.168.100.14:8096/
        server: 192.168.100.14
        container: jellyfin
        siteMonitor: http://192.168.100.14:8096
        showStats: true
        widget:
          type: jellyfin
          url: http://192.168.100.14:8096
          enableBlocks: true
          enableNowPlaying: false
          key: xxxxxxxxxxxxxxxxxx
$ snap info docker
...
installed:          24.0.5              (2915) 136MB -

$ snap connections docker
Interface         Plug                     Slot                                 Notes
content           -                        docker:docker-executables            -
content           -                        docker:docker-registry-certificates  -
content           docker:graphics-core22   -                                    -
docker            docker:docker-cli        docker:docker-daemon                 -
docker-support    docker:privileged        :docker-support                      -
docker-support    docker:support           :docker-support                      -
firewall-control  docker:firewall-control  :firewall-control                    -
home              docker:home              :home                                -
log-observe       docker:log-observe       -                                    -
network           docker:network           :network                             -
network-bind      docker:network-bind      :network-bind                        -
network-control   docker:network-control   :network-control                     -
opengl            docker:opengl            :opengl                              -
removable-media   docker:removable-media   -                                    -

Any suggestions?

@locnnil
Copy link
Contributor

locnnil commented Oct 14, 2024

Sorry for the delay.

What is your host operating system? And what version of snapd are you using:

Could you please run:

snap version

@locnnil locnnil added the question Further information is requested label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants