Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.69k stars 108 forks source link

mongo db doesn't start after reboot #170

Open kabelklaus opened 1 year ago

kabelklaus commented 1 year ago

Describe the bug

If I reboot my server, the service mongo doesn't start. I use docker compose. I try it with a change in the docker compose yml. I added "restart: unless-stopped"

Expected behavior

I want that the mongo service starts after reboot. Without this service, I don't have access to my account and data.

Additional context

version: "3"

services: server: image: yooooomi/your_spotify_server restart: unless-stopped ports:

Screenshots

If applicable, add screenshots to help explain your problem.

Shared link

If you don't mind, you can add a Shared link to this issue by clicking Share this page on your YourSpotify application so that I can identify the issue quicker.

Yooooomi commented 1 year ago

Hello, can you share the logs of your containers please?

vordenken commented 1 year ago

Is there a reason that "restart=unless-stopped" isn't added to mongo but to the other 2 containers in the docker-compose.yml? My mongo container had an error tonight and after investigating why it didn't restart automatically I found that this flag is missing...

megacorvega commented 1 year ago

FWIW It seems as though adding restart: unless-stopped to the mongo container fixes this issue for me. I was able to restart my server running docker and connect from two different clients to the web UI.

Is there a Spotify token timeout or something though? The first time this happened to me, I had unless-stopped added to the mongo db container, but I couldn't get to the login page to attach the account. running docker compose down and then bringing it back up again fixed the issue.

NightMean commented 10 months ago

I have the same issue for quite a while even though I have updated to latest 1.7.0, I'll try to add the restart: unless-stopped to the compose file.

Error:
image

Here are my logs but I don't see anything useful in here to be honest. _mongo_logs.txt

Docker compose: (I don't use mongo 6 due to missing AVX support.)

version: "3"

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      API_ENDPOINT: http://192.168.1.11:8080 # This MUST be included as a valid URL in the spotify dashboard (see below)
      CLIENT_ENDPOINT: http://192.168.1.11:3000
      SPOTIFY_PUBLIC: xyz
      SPOTIFY_SECRET: zxy
  mongo:
    container_name: mongo
    image: mongo:4.4
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3000:3000"
    environment:
      API_ENDPOINT: http://192.168.1.11:8080
sodalimes commented 4 months ago

I have the same issue, Docker shut down and Mongo didn't start up again.

2024-03-08 16:06:59 {"t":{"$date":"2024-03-08T23:06:59.678+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
error from daemon in stream: Error grabbing logs: invalid character '\x00' looking for beginning of value