owncloud / owncloud/ocis

ocis crashes when started with a wrong OCIS_URL

Open
#6,685 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug

ocis crashes when I try to add a redis server to my existing instance

## Steps to reproduce

Steps to reproduce the behavior:

1. start ocis with `docker run --name ocis -p 9200:9200 --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-config,target=/etc/ocis --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-data,target=/var/lib/ocis --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-logs,target=/var/log/ocis -e OCIS_INSECURE=true -e PROXY_HTTP_ADDR=0.0.0.0:9200 -e OCIS_URL=https://ocis.in-nepal.de -e PROXY_TLS=false -e OCIS_LOG_FILE=/var/log/ocis/ocis.log -d --restart=always owncloud/ocis:latest`
2. use it for a while
3. start ocis with a wrong address `docker run --name ocis -p 9200:9200 --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-config,target=/etc/ocis --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-data,target=/var/lib/ocis --mount type=bind,source=/mnt/HC_Volume_32687865/ocis-logs,target=/var/log/ocis -e OCIS_INSECURE=true -e PROXY_HTTP_ADDR=0.0.0.0:9200 -e OCIS_URL=https://ocis.owncloud.test -e PROXY_TLS=false -e OCIS_LOG_FILE=/var/log/ocis/ocis.log --restart=always owncloud/ocis:latest`
4. try to login in the WebUI

## Expected behavior
Ocis should start

## Actual behavior
ocis crashes
```
{"level":"error","service":"storage-publiclink","pkg":"rgrpc","traceid":"00000000000000000000000000000000","time":"2023-06-30T12:09:53.29843838Z","message":"runtime error: invalid memory address or nil pointer dereference; stack: goroutine 729 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/recovery.recoveryFunc({0x444bff8, 0xc0014a9890}, {0x3ef7000, 0x5cbec70})\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/recovery/recovery.go:50 +0x5b\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.recoverFrom({0x444bff8?, 0xc0014a9890?}, {0x3ef7000?, 0x5cbec70?}, 0xc0026646a0?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:61 +0x36\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1.1()\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:29 +0x7b\npanic({0x3ef7000, 0x5cbec70})\n\truntime/panic.go:884 +0x213\ngithub.com/cs3org/reva/v2/pkg/auth/manager/publicshares.(*manager).Authenticate(0x444bff8?, {0x444bff8, 0xc0014a9a10}, {0xc000dc0780, 0xf}, {0xc0025424c0, 0x1a})\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/pkg/auth/manager/publicshares/publicshares.go:160 +0x8ff\ngithub.com/cs3org/reva/v2/internal/grpc/services/authprovider.(*service).Authenticate(0xc001c923a0, {0x444bff8, 0xc0014a9a10}, 0xc00245d900)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/services/authprovider/authprovider.go:138 +0xaf\ngithub.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1._ProviderAPI_Authenticate_Handler.func1({0x444bff8, 0xc0014a9a10}, {0x4240f00?, 0xc00245d900})\n\tgithub.com/cs3org/go-cs3apis@v0.0.0-20230516150832-730ac860c71d/cs3/auth/provider/v1beta1/provider_api.pb.go:263 +0x78\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1({0x444bff8, 0xc0014a9950}, {0x4240f00, 0xc00245d900}, 0xc0013d0ce0, 0xc00185ade0)\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.36.4/interceptor.go:341 +0x437\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9950?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/prometheus.interceptorFromConfig.func1({0x444bff8?, 0xc0014a9950?}, {0x4240f00?, 0xc00245d900?}, 0x3b3cdc0?, 0x90?)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/prometheus/prometheus.go:72 +0x43\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9950?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/auth.NewUnary.func2({0x444bff8, 0xc0014a9890}, {0x4240f00, 0xc00245d900}, 0xc0013d0ce0, 0xc0013d0d20)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/auth/auth.go:137 +0x651\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?}, 0xc00668b240?, 0x4965b7?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:33 +0xc4\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/log.NewUnary.func1({0x444bff8, 0xc0014a9890}, {0x4240f00, 0xc00245d900}, 0xc0013d0ce0, 0xc0013d0d60)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/log/log.go:39 +0x9a\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/useragent.NewUnary.func1({0x444bff8, 0xc0014a9890}, {0x4240f00, 0xc00245d900}, 0x0?, 0xc0013d0d80)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/useragent/useragent.go:38 +0xf4\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/token.NewUnary.func1({0x444bff8, 0xc0014a9890}, {0x4240f00, 0xc00245d900}, 0x5f7ba18?, 0xc0013d0da0)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/token/token.go:44 +0x16d\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9890?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/appctx.NewUnary.func1({0x444bff8, 0xc0014a9800}, {0x4240f00, 0xc00245d900}, 0x3fc5ae0?, 0xc0013d0de0)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/appctx/appctx.go:51 +0x73c\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc0014a9800?}, {0x4240f00?, 0xc00245d900?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x444bff8, 0xc0014a9800}, {0x4240f00, 0xc00245d900}, 0xc006691a58?, 0x3ef5bc0?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34 +0xbe\ngithub.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1._ProviderAPI_Authenticate_Handler({0x3feafc0?, 0xc001c923a0}, {0x444bff8, 0xc0014a9800}, 0xc0004d9500, 0xc001c7adb0)\n\tgithub.com/cs3org/go-cs3apis@v0.0.0-20230516150832-730ac860c71d/cs3/auth/provider/v1beta1/provider_api.pb.go:265 +0x138\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc0018e8000, {0x445eec0, 0xc0009f0d00}, 0xc0025daea0, 0xc001c7aff0, 0x5cc0e90, 0x0)\n\tgoogle.golang.org/grpc@v1.55.0/server.go:1337 +0xdf3\ngoogle.golang.org/grpc.(*Server).handleStream(0xc0018e8000, {0x445eec0, 0xc0009f0d00}, 0xc0025daea0, 0x0)\n\tgoogle.golang.org/grpc@v1.55.0/server.go:1714 +0xa36\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1()\n\tgoogle.golang.org/grpc@v1.55.0/server.go:959 +0x98\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\n\tgoogle.golang.org/grpc@v1.55.0/server.go:957 +0x18c\n"}
{"level":"error","service":"storage-publiclink","pkg":"rgrpc","traceid":"00000000000000000000000000000000","user-agent":"grpc-go/1.55.0","from":"tcp://127.0.0.1:33300","uri":"/cs3.auth.provider.v1beta1.ProviderAPI/Authenticate","start":"30/Jun/2023:12:09:53 +0000","end":"30/Jun/2023:12:09:53 +0000","time_ns":209311153,"code":"Internal","time":"2023-06-30T12:09:53.298651615Z","message":"unary"}
{"level":"error","service":"storage-publiclink","pkg":"rgrpc","traceid":"00000000000000000000000000000000","time":"2023-06-30T12:10:04.015190168Z","message":"runtime error: invalid memory address or nil pointer dereference; stack: goroutine 822 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/recovery.recoveryFunc({0x444bff8, 0xc000ca3560}, {0x3ef7000, 0x5cbec70})\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/recovery/recovery.go:50 +0x5b\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.recoverFrom({0x444bff8?, 0xc000ca3560?}, {0x3ef7000?, 0x5cbec70?}, 0xc00215c6a0?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:61 +0x36\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1.1()\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:29 +0x7b\npanic({0x3ef7000, 0x5cbec70})\n\truntime/panic.go:884 +0x213\ngithub.com/cs3org/reva/v2/pkg/auth/manager/publicshares.(*manager).Authenticate(0x444bff8?, {0x444bff8, 0xc000ca36e0}, {0xc0003b2ff0, 0xf}, {0xc001502be0, 0x1a})\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/pkg/auth/manager/publicshares/publicshares.go:160 +0x8ff\ngithub.com/cs3org/reva/v2/internal/grpc/services/authprovider.(*service).Authenticate(0xc001c923a0, {0x444bff8, 0xc000ca36e0}, 0xc001b30910)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/services/authprovider/authprovider.go:138 +0xaf\ngithub.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1._ProviderAPI_Authenticate_Handler.func1({0x444bff8, 0xc000ca36e0}, {0x4240f00?, 0xc001b30910})\n\tgithub.com/cs3org/go-cs3apis@v0.0.0-20230516150832-730ac860c71d/cs3/auth/provider/v1beta1/provider_api.pb.go:263 +0x78\ngo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.UnaryServerInterceptor.func1({0x444bff8, 0xc000ca35f0}, {0x4240f00, 0xc001b30910}, 0xc00072a340, 0xc000aed7b8)\n\tgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@v0.36.4/interceptor.go:341 +0x437\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca35f0?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/prometheus.interceptorFromConfig.func1({0x444bff8?, 0xc000ca35f0?}, {0x4240f00?, 0xc001b30910?}, 0x3b3cdc0?, 0xc0014fc300?)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/prometheus/prometheus.go:72 +0x43\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca35f0?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/auth.NewUnary.func2({0x444bff8, 0xc000ca3560}, {0x4240f00, 0xc001b30910}, 0xc00072a340, 0xc00072a380)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/auth/auth.go:137 +0x651\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?}, 0xc001cd7240?, 0x4965b7?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:33 +0xc4\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/log.NewUnary.func1({0x444bff8, 0xc000ca3560}, {0x4240f00, 0xc001b30910}, 0xc00072a340, 0xc00072a3c0)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/log/log.go:39 +0x9a\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/useragent.NewUnary.func1({0x444bff8, 0xc000ca3560}, {0x4240f00, 0xc001b30910}, 0x0?, 0xc00072a3e0)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/useragent/useragent.go:38 +0xf4\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/token.NewUnary.func1({0x444bff8, 0xc000ca3560}, {0x4240f00, 0xc001b30910}, 0x5f7ba18?, 0xc00072a400)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/token/token.go:44 +0x16d\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca3560?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/cs3org/reva/v2/internal/grpc/interceptors/appctx.NewUnary.func1({0x444bff8, 0xc000ca34d0}, {0x4240f00, 0xc001b30910}, 0x3fc5ae0?, 0xc00072a420)\n\tgithub.com/cs3org/reva/v2@v2.14.1-0.20230623085734-919a9585f147/internal/grpc/interceptors/appctx/appctx.go:51 +0x73c\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x444bff8?, 0xc000ca34d0?}, {0x4240f00?, 0xc001b30910?})\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x444bff8, 0xc000ca34d0}, {0x4240f00, 0xc001b30910}, 0xc001ce2a58?, 0x3ef5bc0?)\n\tgithub.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34 +0xbe\ngithub.com/cs3org/go-cs3apis/cs3/auth/provider/v1beta1._ProviderAPI_Authenticate_Handler({0x3feafc0?, 0xc001c923a0}, {0x444bff8, 0xc000ca34d0}, 0xc0008782a0, 0xc001c7adb0)\n\tgithub.com/cs3org/go-cs3apis@v0.0.0-20230516150832-730ac860c71d/cs3/auth/provider/v1beta1/provider_api.pb.go:265 +0x138\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc0018e8000, {0x445eec0, 0xc0009f0d00}, 0xc001a5c5a0, 0xc001c7aff0, 0x5cc0e90, 0x0)\n\tgoogle.golang.org/grpc@v1.55.0/server.go:1337 +0xdf3\ngoogle.golang.org/grpc.(*Server).handleStream(0xc0018e8000, {0x445eec0, 0xc0009f0d00}, 0xc001a5c5a0, 0x0)\n\tgoogle.golang.org/grpc@v1.55.0/server.go:1714 +0xa36\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1()\n\tgoogle.golang.org/grpc@v1.55.0/server.go:959 +0x98\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\n\tgoogle.golang.org/grpc@v1.55.0/server.go:957 +0x18c\n"}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.