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

[BUG] container won't start #1115

Open
greenspace10 opened this issue May 14, 2024 · 8 comments
Open

[BUG] container won't start #1115

greenspace10 opened this issue May 14, 2024 · 8 comments

Comments

@greenspace10
Copy link

Describe the bug
Installed with latest tag and the following env vars

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
UID: 1026
GID: 101
USER: youtube
NO_UPDATE_NOTIFIER: true
PM2_HOME: /app/pm2
ALLOW_CONFIG_MUTATIONS: true
npm_config_cache: /app/.npm
NODE_VERSION:  16.14.2
NVM_DIR: /usr/local/nvm
ytdl_mongodb_connection_string: mongodb://ytdl-mongo:27017
ytdl_use_local_db: false
write_ytdl_config: true

results in following errors.

[entrypoint] setup permission, this may take a while

> backend@1.0.0 start
> pm2-runtime --raw pm2.config.js

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /.npm
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 1026:101 "/.npm"

npm ERR! A complete log of this run can be found in:

I switched to the nightly tag with the same env vars.
results in the following errors.

[entrypoint] setup permission, this may take a while
error: exec: "npm": executable file not found in $PATH

any help on what I am doing wrong?

further details;
I am trying to install this on a Synology NAS (DSM 7.1.1-42962 Update 6) with docker installed, other containers are operating as expected.

@greenspace10 greenspace10 changed the title [BUG] [BUG] container won't start May 14, 2024
@spacecake
Copy link

I have the same issue with the latest docker-compose at start. 😢

[entrypoint] setup permission, this may take a while
backend@1.0.0 start
pm2-runtime --raw pm2.config.js
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /.npm
npm ERR! errno -13

npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.

@spreiter
Copy link

I also just installed it on DS918+ with DSM 7.1.1. With latest tag it does not work when using different UID/GID, but nightly was fine.

I only created the necessary folders in advance. Did you try without UID/GID?

Content of my docker-compose.yml:

version: "2"
services:
    ytdl_material:
        environment: 
            UID: 1025
            GID: 100
            ytdl_mongodb_connection_string: 'mongodb://ytdl-mongo-db:27017'
            ytdl_use_local_db: 'false'
            write_ytdl_config: 'true'
        restart: always
        depends_on:
            - ytdl-mongo-db
        volumes:
            - ./appdata:/app/appdata
            - ./audio:/app/audio
            - /volume1/Public/MusicVideos:/app/video
            - ./subscriptions:/app/subscriptions
            - ./users:/app/users
        ports:
            - "8998:17442"
        #image: tzahi12345/youtubedl-material:latest
        image: tzahi12345/youtubedl-material:nightly
    ytdl-mongo-db:
        image: mongo:4
        logging:
            driver: "none"          
        container_name: mongo-db
        restart: always
        volumes:
            - ./db/:/data/db

@Monoboy4ik
Copy link

after restart container i see this
image

@spreiter
Copy link

spreiter commented Jun 4, 2024

Error: listen EACCES: permission denied 0.0.0.0:443

Sounds like the container has a problem with the network setup. What settings are you using, @Monoboy4ik ? Are you running in privileged mode, maybe?

@Monoboy4ik
Copy link

Error: listen EACCES: permission denied 0.0.0.0:443

Sounds like the container has a problem with the network setup. What settings are you using, @Monoboy4ik ? Are you running in privileged mode, maybe?

I found out that if I change the port in the settings from 17442 to 443 (I use a reverse proxy), then the container does not start

services:
ytdl_material:
environment:
- ytdl_mongodb_connection_string=mongodb://ytdl-mongo-db:27017
- ytdl_use_local_db=false
- write_ytdl_config=true
- PUID=1026
- PGID=100
restart: always
depends_on:
- ytdl-mongo-db
volumes:
- /volume2/docker/ytdl/appdata:/app/appdata
- /volume2/docker/ytdl/audio:/app/audio
- /volume2/docker/ytdl/video:/app/video
- /volume2/docker/ytdl/subscriptions:/app/subscriptions
- /volume2/docker/ytdl/users:/app/users
- /volume2/downloads:/app/downloads
ports:
- 8998:17442
image: tzahi12345/youtubedl-material:nightly
ytdl-mongo-db:
# If you are using a Raspberry Pi, use mongo:4.4.18
image: mongo:4
logging:
driver: "none"
container_name: mongo-db
restart: always
volumes:
- /volume2/docker/ytdl/db/:/data/db

@spreiter
Copy link

spreiter commented Jun 4, 2024

I see. But the reverse proxy should allow to map any port to the "outside" world, right?
I guess port 443 is restricted and requires additional access rights inside the container. So only when the user would be root, it can work.

@Monoboy4ik
Copy link

you're right, I added "privileged: true" but it didn't help

@Monoboy4ik
Copy link

I thought that these settings only affect the formation of the correct link to the downloaded file, but it looks like another proxy is trying to rise inside the container...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants