soulseek-docker icon indicating copy to clipboard operation
soulseek-docker copied to clipboard

[Errno 13] Permission denied: '/dev/stdout'

Open dr3nch opened this issue 9 months ago • 34 comments

After pulling the last image I can't start my soulseek container. It always exits with [Errno 13] Permission denied: '/dev/stdout'. A container deployed 4 days ago on another host works just fine. Presumably it's related to 90871ed71b576dc0faa287f3f61d1a9f33bd7fcc

I'd pull a previous version, but there is only latest image on Docker Hub

docker-compose.yml

---
version: "2.1"
services:
  soulseek:
    image: realies/soulseek
    container_name: soulseek
    environment:
      - PUID=1000
      - PGID=1000
    volumes:      
      - /persistent/soulseek/appdata:/data/.SoulseekQt
      - /persistent/soulseek/downloads:/data/Soulseek Downloads
      - /persistent/soulseek/logs:/data/Soulseek Chat Logs
      - /persistent/soulseek/shared:/data/Soulseek Shared Folder
    ports:
      - 6080:6080
    restart: unless-stopped

docker compose up

[+] Running 1/2
 ✔ Network 42_default  Created                                                                                                                                     0.1s 
 ⠋ Container soulseek  Created                                                                                                                                     0.1s 
Attaching to soulseek
soulseek  | Traceback (most recent call last):
soulseek  |   File "/usr/bin/supervisord", line 33, in <module>
soulseek  |     sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
soulseek  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
soulseek  |     go(options)
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go
soulseek  |     d.main()
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
soulseek  |     self.options.make_logger()
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
soulseek  |     loggers.handle_file(
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
soulseek  |     handler = FileHandler(filename)
soulseek  |               ^^^^^^^^^^^^^^^^^^^^^
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
soulseek  |     self.stream = open(filename, mode)
soulseek  |                   ^^^^^^^^^^^^^^^^^^^^
soulseek  | PermissionError: [Errno 13] Permission denied: '/dev/stdout'
soulseek exited with code 0

dr3nch avatar Apr 28 '24 11:04 dr3nch

Same here

c-hri-s avatar Apr 28 '24 12:04 c-hri-s

what os are you trying this on?

realies avatar Apr 28 '24 13:04 realies

Running it as a container on a Synology NAS, 1821+ in my case. I get the exact same error as @dr3nch

c-hri-s avatar Apr 28 '24 13:04 c-hri-s

Docker 26.0.1 @ Debian 12.5

dr3nch avatar Apr 28 '24 13:04 dr3nch

Same here using docker 26.1.0 under Ubuntu Server 22.04

daviddoji avatar Apr 28 '24 15:04 daviddoji

Is the latest update from https://github.com/realies/soulseek-docker/commit/f299da8985c12a410e2acae76808d6ff487cbb3d fixing this? I can't recreate the issue on Ubuntu 24.04 with Docker 26.1.0.

realies avatar Apr 28 '24 16:04 realies

Doesn't seem to for me - I pulled :latest and got the same errors/crash:

Traceback (most recent call last):
  File "/usr/bin/supervisord", line 33, in <module>
    sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
    go(options)
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go

    d.main()
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
    self.options.make_logger()
  File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
    loggers.handle_file(
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
    handler = FileHandler(filename)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
    self.stream = open(filename, mode)
                  ^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dev/stdout'

c-hri-s avatar Apr 28 '24 17:04 c-hri-s

@c-hri-s, are you sure this is latest? It should be writing to /proc/self/fd/1 instead of /dev/stdout now.

realies avatar Apr 28 '24 17:04 realies

Still can't start the container. The error is different, though

Apparently the supervisor is running under an unprivileged user while trying to access root-restricted areas inside the container (or using unchanged UID / GID because it doesn't have the rights to do so). I run docker service as root and synology DSM does the same, as far as I remember.

soulseek  | Traceback (most recent call last):
soulseek  |   File "/usr/bin/supervisord", line 33, in <module>
soulseek  |     sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
soulseek  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
soulseek  |     go(options)
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go
soulseek  |     d.main()
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
soulseek  |     self.options.make_logger()
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
soulseek  |     loggers.handle_file(
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
soulseek  |     handler = FileHandler(filename)
soulseek  |               ^^^^^^^^^^^^^^^^^^^^^
soulseek  |   File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
soulseek  |     self.stream = open(filename, mode)
soulseek  |                   ^^^^^^^^^^^^^^^^^^^^
soulseek  | PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'
soulseek exited with code 0

dr3nch avatar Apr 28 '24 17:04 dr3nch

Does it fail the same way if you run the container with PUID=0 and PGID=0, @dr3nch?

realies avatar Apr 28 '24 17:04 realies

Does it fail the same way if you run the container with PUID=0 and PGID=0, @dr3nch?

Hello! With PUID=0 and PGID=0 works without problem.

With PUID=1000 and PGID=1000, now, the error its:

PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'

Thanks!

Edit1: I said this in Ubuntu 24.04

R4di04kt1v3 avatar Apr 28 '24 19:04 R4di04kt1v3

Works for me on Synology with :latest and PUID=0 and PGID=0 also

c-hri-s avatar Apr 28 '24 19:04 c-hri-s

Running everything inside the container as root (PUID/PGID 0) is suboptimal for security. It would also change the ownership of all files mounted to root. I don't have access to a Synology setup to test what works best there but I wonder if it now works on Debian without elevating to root, @dr3nch?

realies avatar Apr 28 '24 20:04 realies

@R4di04kt1v3, works fine on 24.04 over here. Just tested on a different VPS:

$ docker run --rm -p 6080:6080 realies/soulseek:latest
Unable to find image 'realies/soulseek:latest' locally
latest: Pulling from realies/soulseek
fdcaa7e87498: Pull complete 
59464f50eafb: Pull complete 
b28dcfe7449a: Pull complete 
985fc081820a: Pull complete 
c732949de61d: Pull complete 
a4eb6eff4ce5: Pull complete 
Digest: sha256:df32a5369f8a3f147ad95a44ff32afd0fb110f2a360c8a6b8c9782619f3de8bb
Status: Downloaded newer image for realies/soulseek:latest
2024-04-28 20:22:51,523 INFO Set uid to user 0 succeeded
2024-04-28 20:22:51,523 INFO Set uid to user 0 succeeded
2024-04-28 20:22:51,529 INFO supervisord started with pid 1
2024-04-28 20:22:51,529 INFO supervisord started with pid 1
2024-04-28 20:22:52,533 INFO spawned: 'tigervnc' with pid 12
2024-04-28 20:22:52,533 INFO spawned: 'tigervnc' with pid 12
2024-04-28 20:22:52,536 INFO spawned: 'openbox' with pid 13
2024-04-28 20:22:52,536 INFO spawned: 'openbox' with pid 13
2024-04-28 20:22:52,543 INFO spawned: 'novnc' with pid 14
2024-04-28 20:22:52,543 INFO spawned: 'novnc' with pid 14
2024-04-28 20:22:52,546 INFO spawned: 'soulseek' with pid 15
2024-04-28 20:22:52,546 INFO spawned: 'soulseek' with pid 15
Warning: could not find self.pem
Using local websockify at /usr/share/novnc/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
Openbox-Message: Failed to open the display from the DISPLAY environment variable.

Xvnc TigerVNC 1.13.1 - built 2024-04-01 08:26
Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101011


Sun Apr 28 20:22:52 2024
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5900
 vncext:      created VNC server for screen 0
2024-04-28 20:22:52,713 WARN exited: openbox (exit status 1; not expected)
2024-04-28 20:22:52,713 WARN exited: openbox (exit status 1; not expected)
2024-04-28 20:22:53,716 INFO success: tigervnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,716 INFO success: tigervnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,738 INFO spawned: 'openbox' with pid 31
2024-04-28 20:22:53,738 INFO spawned: 'openbox' with pid 31
2024-04-28 20:22:53,739 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: soulseek entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: soulseek entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)


Navigate to this URL:

    http://19946e88d37c:6080/vnc.html?host=19946e88d37c&port=6080

Press Ctrl-C to exit


WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /usr/share/novnc
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
[mi] mieq: warning: overriding existing handler (nil) with 0x560b8b789580 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x560b8b789580 for event 3
2024-04-28 20:22:55,188 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:55,188 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
x.x.x.x - - [28/Apr/2024 20:24:47] code 404, message File not found
x.x.x.x - - [28/Apr/2024 20:24:48] code 404, message File not found
x.x.x.x - - [28/Apr/2024 20:24:48] x.x.x.x: Plain non-SSL (ws://) WebSocket connection
x.x.x.x - - [28/Apr/2024 20:24:48] x.x.x.x: Path: '/websockify'
x.x.x.x - - [28/Apr/2024 20:24:48] connecting to: localhost:5900

Sun Apr 28 20:24:48 2024
 Connections: accepted: 127.0.0.1::37016
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type None(1)
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888

Sun Apr 28 20:24:49 2024
 VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

realies avatar Apr 28 '24 20:04 realies

@R4di04kt1v3, works fine on 24.04 over here. Just tested on a different VPS:

$ docker run --rm -p 6080:6080 realies/soulseek:latest
Unable to find image 'realies/soulseek:latest' locally
latest: Pulling from realies/soulseek
fdcaa7e87498: Pull complete 
59464f50eafb: Pull complete 
b28dcfe7449a: Pull complete 
985fc081820a: Pull complete 
c732949de61d: Pull complete 
a4eb6eff4ce5: Pull complete 
Digest: sha256:df32a5369f8a3f147ad95a44ff32afd0fb110f2a360c8a6b8c9782619f3de8bb
Status: Downloaded newer image for realies/soulseek:latest
2024-04-28 20:22:51,523 INFO Set uid to user 0 succeeded
2024-04-28 20:22:51,523 INFO Set uid to user 0 succeeded
2024-04-28 20:22:51,529 INFO supervisord started with pid 1
2024-04-28 20:22:51,529 INFO supervisord started with pid 1
2024-04-28 20:22:52,533 INFO spawned: 'tigervnc' with pid 12
2024-04-28 20:22:52,533 INFO spawned: 'tigervnc' with pid 12
2024-04-28 20:22:52,536 INFO spawned: 'openbox' with pid 13
2024-04-28 20:22:52,536 INFO spawned: 'openbox' with pid 13
2024-04-28 20:22:52,543 INFO spawned: 'novnc' with pid 14
2024-04-28 20:22:52,543 INFO spawned: 'novnc' with pid 14
2024-04-28 20:22:52,546 INFO spawned: 'soulseek' with pid 15
2024-04-28 20:22:52,546 INFO spawned: 'soulseek' with pid 15
Warning: could not find self.pem
Using local websockify at /usr/share/novnc/utils/websockify/run
Starting webserver and WebSockets proxy on port 6080
Openbox-Message: Failed to open the display from the DISPLAY environment variable.

Xvnc TigerVNC 1.13.1 - built 2024-04-01 08:26
Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12101011


Sun Apr 28 20:22:52 2024
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5900
 vncext:      created VNC server for screen 0
2024-04-28 20:22:52,713 WARN exited: openbox (exit status 1; not expected)
2024-04-28 20:22:52,713 WARN exited: openbox (exit status 1; not expected)
2024-04-28 20:22:53,716 INFO success: tigervnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,716 INFO success: tigervnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,738 INFO spawned: 'openbox' with pid 31
2024-04-28 20:22:53,738 INFO spawned: 'openbox' with pid 31
2024-04-28 20:22:53,739 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: soulseek entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:53,739 INFO success: soulseek entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)


Navigate to this URL:

    http://19946e88d37c:6080/vnc.html?host=19946e88d37c&port=6080

Press Ctrl-C to exit


WebSocket server settings:
  - Listen on :6080
  - Web server. Web root: /usr/share/novnc
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement
> Warning:          Could not resolve keysym XF86PreviousElement
> Warning:          Could not resolve keysym XF86AutopilotEngageToggle
> Warning:          Could not resolve keysym XF86MarkWaypoint
> Warning:          Could not resolve keysym XF86Sos
> Warning:          Could not resolve keysym XF86NavChart
> Warning:          Could not resolve keysym XF86FishingChart
> Warning:          Could not resolve keysym XF86SingleRangeRadar
> Warning:          Could not resolve keysym XF86DualRangeRadar
> Warning:          Could not resolve keysym XF86RadarOverlay
> Warning:          Could not resolve keysym XF86TraditionalSonar
> Warning:          Could not resolve keysym XF86ClearvuSonar
> Warning:          Could not resolve keysym XF86SidevuSonar
> Warning:          Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server
[mi] mieq: warning: overriding existing handler (nil) with 0x560b8b789580 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x560b8b789580 for event 3
2024-04-28 20:22:55,188 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-28 20:22:55,188 INFO success: openbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
x.x.x.x - - [28/Apr/2024 20:24:47] code 404, message File not found
x.x.x.x - - [28/Apr/2024 20:24:48] code 404, message File not found
x.x.x.x - - [28/Apr/2024 20:24:48] x.x.x.x: Plain non-SSL (ws://) WebSocket connection
x.x.x.x - - [28/Apr/2024 20:24:48] x.x.x.x: Path: '/websockify'
x.x.x.x - - [28/Apr/2024 20:24:48] connecting to: localhost:5900

Sun Apr 28 20:24:48 2024
 Connections: accepted: 127.0.0.1::37016
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type None(1)
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888

Sun Apr 28 20:24:49 2024
 VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian bgr888
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)

With PUID-PGID 0 works without problem. With PUID-PGID 1000 not, at least for now... since the last update... You are with PUID-PGID 1000 ?

R4di04kt1v3 avatar Apr 28 '24 20:04 R4di04kt1v3

OK, not sure why I assumed the default PUID/PGID are 1000, this is how it fails:

$ docker run --name soulseek -e PUID=1000 -e PGID=1000 -p 6080:6080 soulseek:latest
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 33, in <module>
    sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
    go(options)
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go
    d.main()
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
    self.options.make_logger()
  File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
    loggers.handle_file(
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
    handler = FileHandler(filename)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
    self.stream = open(filename, mode)
                  ^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'

realies avatar Apr 28 '24 20:04 realies

OK, not sure why I assumed the default PUID/PGID are 1000, this is how it fails:

$ docker run --name soulseek -e PUID=1000 -e PGID=1000 -p 6080:6080 soulseek:latest
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 33, in <module>
    sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
    go(options)
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go
    d.main()
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
    self.options.make_logger()
  File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
    loggers.handle_file(
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
    handler = FileHandler(filename)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
    self.stream = open(filename, mode)
                  ^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'

Yeah, same error here... The problem its PUID/PGID 1000 in the last update...

R4di04kt1v3 avatar Apr 28 '24 20:04 R4di04kt1v3

Also seeing this issue in the latest tag.

PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 33, in <module>
    sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main
    go(options)
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go
    d.main()
  File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main
    self.options.make_logger()
  File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger
    loggers.handle_file(
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file
    handler = FileHandler(filename)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__
    self.stream = open(filename, mode)

A bit annoying, the docker hub does not seem to use different tags, so once we update to :latest, we're stuck :(

cohenchris avatar Apr 30 '24 01:04 cohenchris

..but I wonder if it now works on Debian without elevating to root

Debian 11 user (latest packages + Docker version 20.10.5+dfsg1, build 55c4c88) here, it does not in fact work with PGID/PUID 1000

PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'  Traceback (most recent call last):                                  File "/usr/bin/supervisord", line 33, in <module>                   sys.exit(load_entry_point('supervisor==4.2.5', 'console_scripts', 'supervisord')())                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 359, in main                                                    go(options)                                                     File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 369, in go                                                      d.main()                                                        File "/usr/lib/python3/dist-packages/supervisor/supervisord.py", line 72, in main                                                     self.options.make_logger()                                      File "/usr/lib/python3/dist-packages/supervisor/options.py", line 1488, in make_logger                                                loggers.handle_file(                                            File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 417, in handle_file                                                 handler = FileHandler(filename)                                             ^^^^^^^^^^^^^^^^^^^^^                                 File "/usr/lib/python3/dist-packages/supervisor/loggers.py", line 160, in __init__                                                    self.stream = open(filename, mode)                                              ^^^^^^^^^^^^^^^^^^^^                            PermissionError: [Errno 13] Permission denied: '/proc/self/fd/1'

Thanks for the feedback. An update is in the works, in the meantime running as PUID=0 and PGID=0 should get it going.

realies avatar Apr 30 '24 11:04 realies

@realies cheers / thank you

ianhundere avatar May 01 '24 01:05 ianhundere

Also experiencing this on manjaro (arch-based).

Sidenote: please add a donation link/button to your profile @realies I use your containers pretty much every day and would like to make a small donation :)

TristanK27 avatar May 03 '24 16:05 TristanK27

Can you check if the latest build runs fine without PUID=0 and PGID=0?

There's also a support me button on my profile page now :)

realies avatar May 05 '24 01:05 realies

Can you check if the latest build runs fine without PUID=0 and PGID=0?

There's also a support me button on my profile page now :)

Yep, it works :tada: Thanks a lot @realies for your quick fix!

daviddoji avatar May 05 '24 06:05 daviddoji

Now works like a charm! Thanks a lot @realies !!

R4di04kt1v3 avatar May 05 '24 08:05 R4di04kt1v3

Can you check if the latest build runs fine without PUID=0 and PGID=0?

There's also a support me button on my profile page now :)

It works! But now the shared folder isn't accessible by soulseek. Anyone else also experiencing this? Will do some more testing in a few hours to make sure it isn't something on my end.

TristanK27 avatar May 05 '24 11:05 TristanK27

Can you check if the latest build runs fine without PUID=0 and PGID=0?

There's also a support me button on my profile page now :)

It works! But now the shared folder isn't accessible by soulseek. Anyone else also experiencing this? Will do some more testing in a few hours to make sure it isn't something on my end.

Hello! In my case, shared folder it's working with last update and 1000:1000 permission

R4di04kt1v3 avatar May 05 '24 12:05 R4di04kt1v3

Can you check if the latest build runs fine without PUID=0 and PGID=0? There's also a support me button on my profile page now :)

It works! But now the shared folder isn't accessible by soulseek. Anyone else also experiencing this? Will do some more testing in a few hours to make sure it isn't something on my end.

Did some more testing and downloading is also not working for me. I use a separate user and group for my docker containers. . It seems to me like the container has read/write permission issues to the linked host folder. Testing with puid and guid 1000 or 0 didn't make a difference for me.

My docker compose file (didn't include gluetun config because it's not relevant):

services:
  soulseek:
    image: realies/soulseek
    container_name: soulseek
    depends_on:
      - gluetun
    environment:
      - PUID=${idOfDockerUser}
      - PGID=${idOfDockerGroup}
    volumes:
      - ./config/soulseek/appdata:/data/.SoulseekQt
      - ./config/soulseek/logs:/data/Soulseek Chat Logs
      - /mnt/external_ssd/music/shared:/data/Soulseek Shared Folder
      - /mnt/external_ssd/music:/data/Soulseek Downloads
    network_mode: "service:gluetun"
    restart: unless-stopped

Error log (transfer queue) from soulseek:

[Sun May 5 13:16:17 2024] File connection created by user 666-Soul.Hunter-666 for req 2346160
[Sun May 5 13:16:17 2024] Error downloading 10 - Public Enemy.flac from 666-Soul.Hunter-666. Writing to file at /data/Soulseek Downloads/downloading/666-Soul.Hunter-666/AmerAcal/10 - Public Enemy.flac failed. Error string: Permission denied

File permissions of host folder /mnt/external_ssd/music :

drwxr-xr-x   5    dockeruser     dockergroup     4096  5 mei 15:13 .
drwxrwxr-x   8  someuser        somegroup       4096  4 mei 02:55 ..
drwxrw-r-- 119 dockeruser     dockergroup      4096 18 apr 03:32 complete
drwxrw-r--   8   dockeruser     dockergroup      4096 18 apr 03:40 downloading
drwxrw-r--   4   dockeruser     dockergroup      4096  4 mei 03:01 shared

Same permissions for all child folders. The docker container itself reports no problems in its logs.

Am I missing something here? This container always worked fine for me in the past. Including the creation of files with the correct user and permissions.

TristanK27 avatar May 05 '24 13:05 TristanK27

Can you check if the latest build runs fine without PUID=0 and PGID=0?

There's also a support me button on my profile page now :)

ditto, works here too.

edit: @TristanK27 not having that issue here, must be isolated to your setup/config.

ianhundere avatar May 05 '24 13:05 ianhundere

@TristanK27, I wonder if it's somehow related to the way the external disk is mounted. Can you double check you can't create files here docker exec -it --user soulseek --workdir '/data/Soulseek Downloads' soulseek bash?

I think you can try changing the permissions of your folders from drwxrw-r-- to drwxr-xr-x and for files to -rw-r--r-- :

docker exec -it --user root --workdir '/data' soulseek bash -c "find . -type d -exec chmod 755 {} +"
docker exec -it --user root --workdir '/data' soulseek bash -c "find . -type f -exec chmod 644 {} +"

Edit: another possibility is a strange behaviour with the default umask value.

realies avatar May 05 '24 14:05 realies