Lissy93 / dashy

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
https://dashy.to
MIT License
17.12k stars 1.31k forks source link

[BUG] My Dashy Docker container keeps looping and not starting #1617

Closed EliasGagnef closed 3 months ago

EliasGagnef commented 3 months ago

Environment

Self-Hosted (Docker)

System

Debian Latest with Portainer 20.10.24 I think

Version

V-3.1.1

Describe the problem

When I start the container it never actually starts, I will attach the logs, I think it keeps looping after building, but i'm not sure lol, it worked before, but I had my storage space full for a few months without realizing it, so I think that I was on an old version and now when it finally updated the looping happens, I tried to delete the entire container and remake it with my compose file, but it still happens, sorry for the bad explanation lol

Additional info

_Dashy_logs.txt

Please tick the boxes

CrazyWolf13 commented 3 months ago

Hi From your log I can read, that your port 8080 is already in use ->

Unable to start Dashy's Node server
 Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

Please share your docker compose file, if the issues persists after changing the port on the host side, but not on the docker side, (like 8090;8080)

Also have you tried re-pulling the latest image and rebuilding? (Make sure the conf.yml is mapped as bind volume beforehand.)

EliasGagnef commented 3 months ago

Hi From your log I can read, that your port 8080 is already in use ->

Unable to start Dashy's Node server
 Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

Please share your docker compose file, if the issues persists after changing the port on the host side, but not on the docker side, (like 8090;8080)

Also have you tried re-pulling the latest image and rebuilding? (Make sure the conf.yml is mapped as bind volume beforehand.)

Thank you for the reply :D I do have Qbittorrent on 8080, but I thought I had remapped Dashy correctly to 2121.... I guess not lol, not sure how to fix it as I'm using Gluetun, the weirdest thing if that it worked before I updated... here's my config: (I guess I maybe don't need Dashy on a VPN anyway? I'm pretty bad at this lol sorry)

`version: "3" services: gluetun: image: qmcgaw/gluetun container_name: gluetun cap_add:

CrazyWolf13 commented 3 months ago

Oh I think I spotted the issue, since dashy V3, the port changed from 80 to 8080, a non-root port.

I think the most bottom line of the ports needs to be changed from 80 to 8080.

But to be honest I'm a bit confused of why you are running all those services inside a single stack.

Here an example for dashy:

version: '3'

services:
  dashy:
    image: lissy93/dashy:latest
    container_name: dashyr
    restart: unless-stopped  
    ports:
      - "4000:8080"  # Mapping any port to port 8080
    volumes:
      - ./user-data:/app/user-data  # Mounting the host directory to the container's user-data directory
    environment:
      - NODE_ENV=production  # Setting the environment to production
EliasGagnef commented 3 months ago

ports:

  • "4000:8080" # Mapping any port to port 8080

THANK YOU SO MUCH it worked :D

I am still super new to Docker, should I separate all of the containers into their own stacks? I thought the best way to Docker was to just have everything in a single file lol

CrazyWolf13 commented 3 months ago

Awesome! 🎉

To be honest if you are new to Docker, I'd rather suggest something like portainer, but if you feel comfortable with docker compose, then it's definitely a good choice, as it gives much more freedom.

Generally speaking docker containers are used to isolate specific aplications.

So generally most people put things like frontend, a database and possibly a backend into the same stack, and then just open up the frontend, this way the backend stays protected and the frontend is accessible. So it's not really a good idea to put all into one single docker compose, as if you need to change something, all services will go down, and that file will get messy once more services are added.

But those are only some ideas/suggestions, feel free to do what you like :)

EliasGagnef commented 3 months ago

Thank you again :D

I tried moving it back to using Gluetun so my vpn widget would work, but I keep getting this "Unauthorized" screen :/ maybe I did it wrong though lol, heres what the log says

`Unable to start Dashy's Node server

Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

at Server.setupListenHandle [as _listen2] (node:net:1872:16)

at listenInCluster (node:net:1920:12)

at doListen (node:net:2075:7)

at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {

code: 'EADDRINUSE',

errno: -98,

syscall: 'listen',

address: '0.0.0.0',

`

bild

CrazyWolf13 commented 3 months ago

Hi According to your log there is still an issue with the port ->

Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

I really think there's still a problem between your vpn or dashy occupying the port.

For a vpn I could strongly recommend things like tailscale or twingate, if you're new, you basically install the client on your phone/laptop and on the server , auth with your account and they both get an internal ip where you can reach them.

This will then automatically enable the full functionality as if you'd be right at home, without messing with that docker compose that much.

EliasGagnef commented 3 months ago

Thank you :) I think it's because qbittorrent and Dashy both have 8080 now... If there's no way to change one of the ports I may just have to skip the VPN widget I have in Dashy, since if I bind both to Gluetun they clash :/

Thank you for the Tailscale suggestion, but I only use Gluetun with Private Internet Access, I only access my server at home anyway :D

EliasGagnef commented 3 months ago

Nevermind, completely solved it!!!! I accidently put "" around the port, so the formatting broke it, thank yu so much again :)

CrazyWolf13 commented 3 months ago

Oh awesome 😁