Updated from 4.0.0 RC2 to 4.0.0 and opencloud does not start anymore. user: unknown userid 1500
Describe the bug
Updated from 4.0.0 rc 2 to 4.0.0 and opencloud does not start anymore.
I'm getting this
opencloud | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55563e0cbc00)}' (4.999906 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1500","service":"service.SutureService{exec:(func(context.Context) error)(0x55563e0cbc00)}","supervisor":"opencloud","restarting":true,"failures":4.999905501470762,"threshold":5,"error":{},"time":"2025-12-01T19:22:41Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud | {"level":"warn","service":"opencloud","event":"opencloud: Entering the backoff state.","supervisor":"opencloud","time":"2025-12-01T19:22:41Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:402","message":"service backoff"}
opencloud | {"level":"fatal","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55563e0cbc00)}' (5.999864 failures of 5.000000), restarting: false, error: failed to create resource: error detecting resource: user: unknown userid 1500","service":"service.SutureService{exec:(func(context.Context) error)(0x55563e0cbc00)}","supervisor":"opencloud","restarting":false,"failures":5.999863786871946,"threshold":5,"error":{},"time":"2025-12-01T19:22:41Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud exited with code 1
opencloud_collaboration | failed to create resource: error detecting resource: user: unknown userid 1500
opencloud_collaboration exited with code 1
Steps to reproduce
- Update from RC2 to 4.0.0 and add missing config values
- See logs
Expected behavior
Upgrade Successfully
Actual behavior
Does not start anymore anf gives me errors
Setup
I am using a custom docker compose config with user: 1500:1500
Additional context
Did not happen on RC2
There was a change in the compose project https://github.com/opencloud-eu/opencloud-compose/pull/157
Maybe that is interfering with your setup?
It appears that opencloud does not start if the UID does not exist as a username?
There was a change in the compose project https://github.com/opencloud-eu/opencloud-compose/pull/157
Maybe that is interfering with your setup?
No I don't think so I am setting the User directive to 1500:1500 and it worked before.
It appears that opencloud does not start if the UID does not exist as a username?
That is also my assumption
It appears to originate from here: https://github.com/opencloud-eu/opencloud/pull/1918
Specifically https://github.com/opencloud-eu/opencloud/blob/986545da524b1fddba5d2cfb0c1264f8806a8b82/pkg/tracing/tracing.go#L110
This option is equivalent to calling WithProcessPID, WithProcessExecutableName, WithProcessExecutablePath, WithProcessCommandArgs, WithProcessOwner, WithProcessRuntimeName, WithProcessRuntimeVersion, and WithProcessRuntimeDescription. See each option function for information about what resource attributes each includes.
WithProcessOwner eventually calls LookupID, which will return an error in go (https://github.com/golang/go/blob/67851547d88dbe6d7ea3aa09dcc5fa5ba94696ed/src/os/user/lookup_unix.go#L181).
Ok. thanks for the analysis. Then this is a regression.
@butonic @dragotin This needs a backport and patch release.
Same on my case, i paste here my logs in case it helps you.
2025-12-02 12:59:23.729868+00:00{"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}' (1.000000 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 3002","service":"service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}","supervisor":"opencloud","restarting":true,"failures":1,"threshold":5,"error":{},"time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
2025-12-02 12:59:23.730873+00:00{"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}' (1.999973 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 3002","service":"service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}","supervisor":"opencloud","restarting":true,"failures":1.9999731997078734,"threshold":5,"error":{},"time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
2025-12-02 12:59:23.731610+00:00{"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}' (2.999927 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 3002","service":"service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}","supervisor":"opencloud","restarting":true,"failures":2.9999270698799427,"threshold":5,"error":{},"time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
2025-12-02 12:59:23.732177+00:00{"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}' (3.999883 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 3002","service":"service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}","supervisor":"opencloud","restarting":true,"failures":3.9998832106460944,"threshold":5,"error":{},"time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
2025-12-02 12:59:23.732654+00:00{"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}' (4.999837 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 3002","service":"service.SutureService{exec:(func(context.Context) error)(0x55f66ab7bc00)}","supervisor":"opencloud","restarting":true,"failures":4.999837495673635,"threshold":5,"error":{},"time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
2025-12-02 12:59:23.732963+00:00{"level":"warn","service":"opencloud","event":"opencloud: Entering the backoff state.","supervisor":"opencloud","time":"2025-12-02T12:59:23Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:402","message":"service backoff"}
I have a fresh setup and changed the UID and GID. My docker container loops with the following error:
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"Starting nats-server"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Version: 2.12.2"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Git: [986545d]"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Cluster: opencloud-cluster"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Name: NDOHDG76ZDKYL7WSRTL3S6HWF7DG4EGDWV6NKG7P5XHMVSQZIPASRSD3"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Node: 6gTToXjB"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" ID: NDOHDG76ZDKYL7WSRTL3S6HWF7DG4EGDWV6NKG7P5XHMVSQZIPASRSD3"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"Starting JetStream"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" _ ___ _____ ___ _____ ___ ___ _ __ __"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" _ | | __|_ _/ __|_ _| _ \\ __| /_\\ | \\/ |"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"| || | _| | | \\__ \\ | | | / _| / _ \\| |\\/| |"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" \\__/|___| |_| |___/ |_| |_|_\\___/_/ \\_\\_| |_|"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" https://docs.nats.io/jetstream"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"---------------- JETSTREAM ----------------"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Strict: true"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Max Memory: 2.87 GB"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Max Storage: 178.58 GB"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" Store Directory: \"/var/lib/opencloud/nats/jetstream\""}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":" API Level: 2"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"-------------------------------------------"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"Took 414.48µs to start JetStream"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"Listening for client connections on 127.0.0.1:9233"}
opencloud-1 | {"level":"info","service":"nats","time":"2025-12-03T23:13:26Z","line":"github.com/opencloud-eu/opencloud/services/nats/pkg/logging/nats.go:21","message":"Server is ready"}
opencloud-1 | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (1.000000 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":true,"failures":1,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (1.999993 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":true,"failures":1.999992931933864,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (2.999986 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":true,"failures":2.999986409036696,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (3.999979 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":true,"failures":3.999978614226202,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | {"level":"error","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (4.999967 failures of 5.000000), restarting: true, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":true,"failures":4.999966955847205,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | {"level":"warn","service":"opencloud","event":"opencloud: Entering the backoff state.","supervisor":"opencloud","time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:402","message":"service backoff"}
opencloud-1 | {"level":"fatal","service":"opencloud","event":"opencloud: Failed service 'service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}' (5.999948 failures of 5.000000), restarting: false, error: failed to create resource: error detecting resource: user: unknown userid 1001","service":"service.SutureService{exec:(func(context.Context) error)(0x596627aabc00)}","supervisor":"opencloud","restarting":false,"failures":5.999947644007483,"threshold":5,"error":{},"time":"2025-12-03T23:13:27Z","line":"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service/service.go:400","message":"service terminated"}
opencloud-1 | 2025/12/03 23:13:53 Could not create config: config file already exists, use --force-overwrite to overwrite or --diff to show diff
So it doesn't work even with fresh setups.
When can we expect a patch release?
I have currently shutdown the service.. should I rollback?
When can we expect a patch release?
The patch release is already available: OpenCloud 4.0.1
Thanks a lot for testing - much appreciated!
@ScharfViktor no patch on the rolling channel?
no patch on the rolling channel?
opencloud-rolling:4.1.0 contains this fix
I have been able to update from 4.0.0-rc2 to 4.1.0 and everything seems to work fine. Thank you.