opencloud icon indicating copy to clipboard operation
opencloud copied to clipboard

Updated from 4.0.0 RC2 to 4.0.0 and opencloud does not start anymore. user: unknown userid 1500

Open Blacks-Army opened this issue 4 weeks ago • 10 comments

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

  1. Update from RC2 to 4.0.0 and add missing config values
  2. 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

Blacks-Army avatar Dec 01 '25 19:12 Blacks-Army

There was a change in the compose project https://github.com/opencloud-eu/opencloud-compose/pull/157

Maybe that is interfering with your setup?

micbar avatar Dec 01 '25 20:12 micbar

It appears that opencloud does not start if the UID does not exist as a username?

stavros-k avatar Dec 01 '25 20:12 stavros-k

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.

Blacks-Army avatar Dec 01 '25 21:12 Blacks-Army

It appears that opencloud does not start if the UID does not exist as a username?

That is also my assumption

Blacks-Army avatar Dec 01 '25 21:12 Blacks-Army

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).

stavros-k avatar Dec 01 '25 21:12 stavros-k

Ok. thanks for the analysis. Then this is a regression.

micbar avatar Dec 01 '25 22:12 micbar

@butonic @dragotin This needs a backport and patch release.

micbar avatar Dec 01 '25 22:12 micbar

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"}

JGeek00 avatar Dec 02 '25 13:12 JGeek00

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.

sevi-kun avatar Dec 03 '25 23:12 sevi-kun

When can we expect a patch release?

I have currently shutdown the service.. should I rollback?

Blacks-Army avatar Dec 04 '25 16:12 Blacks-Army

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 avatar Dec 15 '25 15:12 ScharfViktor

@ScharfViktor no patch on the rolling channel?

JGeek00 avatar Dec 15 '25 18:12 JGeek00

no patch on the rolling channel?

opencloud-rolling:4.1.0 contains this fix

ScharfViktor avatar Dec 15 '25 19:12 ScharfViktor

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.

JGeek00 avatar Dec 15 '25 22:12 JGeek00