just-containers / s6-overlay

s6 overlay for containers (includes execline, s6-linux-utils & a custom init)
Other
3.63k stars 207 forks source link

s6 Not Running Service #579

Open MrTyton opened 1 month ago

MrTyton commented 1 month ago

Repo Dockerfile etc

Hi,

So I thought that I got s6 working again with my docker image, but it doesn't seem to be actually running the script. I used to have it in services.d, but that wasn't actually running anything, so then I tried updating it to the instructions for v3, but that still doesn't seem to actually run the service.

image

Everything runs except for the ffdl service, which is the thing that I actually want to run. I'm sure that there's something stupid that I'm missing, but not sure what. Any help would be appreciated.

Thanks.

skarnet commented 1 month ago

You renamed the user bundle to abc? That is certainly not going to work.

MrTyton commented 1 month ago

No, I initially had it as user, then after submitting the ticket I though "maybe they meant to have it be the user it's meant to be running as"... which did not work. I didn't bother reverting it.

skarnet commented 1 month ago

That's pretty weird. It should have worked with your service in /etc/services.d in the first place (was your run file executable when you had your service directory there?), and everything looks okay now. Can you try running the container with S6_VERBOSITY set to 3 and post the dump?

MrTyton commented 1 month ago
docker run
  -d
  --name='automated-ffdl'
  --net='bridge'
  -e TZ="America/Los_Angeles"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower"
  -e HOST_CONTAINERNAME="automated-ffdl"
  -e 'S6_VERBOSITY'='3'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://static.wikia.nocookie.net/logopedia/images/f/f6/FanFiction.Net2010Icon.png'
  -v '/mnt/user/appdata/ffdl/':'/config':'rw'
  -v '/mnt/user/TempCache/':'/tmp':'rw' 'mrtyton/automated-ffdl'
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /etc/s6-overlay/s6-rc.d/user
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /etc/s6-overlay/s6-rc.d/user2
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/base
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/fix-attrs
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/legacy-cont-init
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/legacy-services
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/top
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: making bundles for pipelines
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: resolving bundle names
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: resolving service names
stderr
05/28/2024
09:55:36 PM
s6-rc-compile: info: writing compiled information to /run/s6/db
stderr
05/28/2024
09:55:36 PM
s6-rc: info: bringing selected services up
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service s6rc-oneshot-runner: starting
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service s6rc-oneshot-runner successfully started
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service fix-attrs: starting
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service fix-attrs successfully started
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service legacy-cont-init: starting
stderr
05/28/2024
09:55:36 PM
cont-init: info: running /etc/cont-init.d/05-default-confs
stderr
05/28/2024
09:55:36 PM
cont-init: info: /etc/cont-init.d/05-default-confs exited 0
stderr
05/28/2024
09:55:36 PM
cont-init: info: running /etc/cont-init.d/90-user-permissions
stdout
05/28/2024
09:55:36 PM
usermod: no changes
stderr
05/28/2024
09:55:36 PM
cont-init: info: /etc/cont-init.d/90-user-permissions exited 0
stderr
05/28/2024
09:55:36 PM
cont-init: info: running /etc/cont-init.d/99-init.d-finish
stdout
05/28/2024
09:55:36 PM
stdout
05/28/2024
09:55:36 PM
UID/GID
stdout
05/28/2024
09:55:36 PM
---------------------------------------
stdout
05/28/2024
09:55:36 PM
User uid:  911
stdout
05/28/2024
09:55:36 PM
User gid:  911
stdout
05/28/2024
09:55:36 PM
---------------------------------------
stdout
05/28/2024
09:55:36 PM
stdout
05/28/2024
09:55:36 PM
Image Made By: MrTyton
stdout
05/28/2024
09:55:36 PM
stderr
05/28/2024
09:55:36 PM
cont-init: info: /etc/cont-init.d/99-init.d-finish exited 0
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service legacy-cont-init successfully started
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service legacy-services: starting
stderr
05/28/2024
09:55:36 PM
s6-rc: info: service legacy-services successfully started

Didn't seem to add any more information.

skarnet commented 1 month ago

Okay... please try with a verbosity set to 5. This should dump a lot of info from s6-rc-compile, and we'll see if your service is seen.

MrTyton commented 1 month ago
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from s6-rc-compile internals: adding identifier s6rc-oneshot-runner of type longrun
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from s6-rc-compile internals: adding identifier s6rc-fdholder of type longrun
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /etc/s6-overlay/s6-rc.d/user
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: user has type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /etc/s6-overlay/s6-rc.d: adding identifier user of type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /etc/s6-overlay/s6-rc.d/user2
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: user2 has type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /etc/s6-overlay/s6-rc.d: adding identifier user2 of type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/base
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: base has type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources: adding identifier base of type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from base: adding identifier fix-attrs of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from base: adding identifier legacy-cont-init of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/fix-attrs
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: fix-attrs has type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources: adding identifier fix-attrs of type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: previously encountered identifier fix-attrs now has type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from fix-attrs to s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/legacy-cont-init
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: legacy-cont-init has type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources: adding identifier legacy-cont-init of type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: previously encountered identifier legacy-cont-init now has type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from legacy-cont-init: adding identifier fix-attrs of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier fix-attrs was already declared with type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from legacy-cont-init to fix-attrs (50)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from legacy-cont-init to s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/legacy-services
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: legacy-services has type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources: adding identifier legacy-services of type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from legacy-services: adding identifier base of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier base was already declared with type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from legacy-services: adding identifier user of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier user was already declared with type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from legacy-services to base (45)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from legacy-services to user (34)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: dependency from legacy-services to s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: parsing /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources/top
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: top has type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from /package/admin/s6-overlay-3.1.6.2/etc/s6-rc/sources: adding identifier top of type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from top: adding identifier base of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier base was already declared with type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from top: adding identifier legacy-services of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier legacy-services was already declared with type oneshot
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from top: adding identifier user of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier user was already declared with type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: from top: adding identifier user2 of type unknown
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: identifier user2 was already declared with type bundle
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: making bundles for pipelines
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: resolving bundle names
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: converting bundle array
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: resolving service names
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: fix-attrs depends on longrun s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: legacy-cont-init depends on oneshot fix-attrs (2)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: legacy-cont-init depends on longrun s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: legacy-services depends on bundle base
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: legacy-services depends on bundle user
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: tracing: legacy-services depends on longrun s6rc-oneshot-runner (0)
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: converting service dependency array
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: checking database correctness
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: writing compiled information to /run/s6/db
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: writing /run/s6/db/n
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: writing /run/s6/db/resolve.cdb
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: writing /run/s6/db/db
stderr
05/28/2024
11:00:41 PM
s6-rc-compile: info: writing /run/s6/db/servicedirs
stderr
05/28/2024
11:00:41 PM
s6-rc: info: bringing selected services up
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service s6rc-oneshot-runner: starting
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service s6rc-oneshot-runner successfully started
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service fix-attrs: starting
stderr
05/28/2024
11:00:41 PM
s6-ipcclient: info: s6-ipcclient: connected to /run/s6-rc/servicedirs/s6rc-oneshot-runner/s
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service fix-attrs successfully started
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service legacy-cont-init: starting
stderr
05/28/2024
11:00:41 PM
s6-ipcclient: info: s6-ipcclient: connected to /run/s6-rc/servicedirs/s6rc-oneshot-runner/s
stderr
05/28/2024
11:00:41 PM
cont-init: info: running /etc/cont-init.d/05-default-confs
stderr
05/28/2024
11:00:41 PM
cont-init: info: /etc/cont-init.d/05-default-confs exited 0
stderr
05/28/2024
11:00:41 PM
cont-init: info: running /etc/cont-init.d/90-user-permissions
stdout
05/28/2024
11:00:41 PM
usermod: no changes
stderr
05/28/2024
11:00:41 PM
cont-init: info: /etc/cont-init.d/90-user-permissions exited 0
stderr
05/28/2024
11:00:41 PM
cont-init: info: running /etc/cont-init.d/99-init.d-finish
stderr
05/28/2024
11:00:41 PM
cont-init: info: /etc/cont-init.d/99-init.d-finish exited 0
stdout
05/28/2024
11:00:41 PM
stdout
05/28/2024
11:00:41 PM
UID/GID
stdout
05/28/2024
11:00:41 PM
---------------------------------------
stdout
05/28/2024
11:00:41 PM
User uid:  911
stdout
05/28/2024
11:00:41 PM
User gid:  911
stdout
05/28/2024
11:00:41 PM
---------------------------------------
stdout
05/28/2024
11:00:41 PM
stdout
05/28/2024
11:00:41 PM
Image Made By: MrTyton
stdout
05/28/2024
11:00:41 PM
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service legacy-cont-init successfully started
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service legacy-services: starting
stderr
05/28/2024
11:00:41 PM
s6-ipcclient: info: s6-ipcclient: connected to /run/s6-rc/servicedirs/s6rc-oneshot-runner/s
stderr
05/28/2024
11:00:41 PM
s6-rc: info: service legacy-services successfully started
MrTyton commented 1 month ago

So the initial reason was that I had set it up as s6-overlay/s6-ovleray/s6-rc.d, so it was an extra level deep.

Now it's running but the script being run isn't printing its output to stdout, when it used to when it was working with v2. Is there a flag that I'm missing?

skarnet commented 1 month ago

If S6_LOGGING is 0, 1, or unset, then your service's stdout should definitely appear on the container's stdout. Does stderr appear correctly?