Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting oCIS can fail with nats connection error #7838

Closed
nirajacharya2 opened this issue Nov 29, 2023 · 4 comments
Closed

Starting oCIS can fail with nats connection error #7838

nirajacharya2 opened this issue Nov 29, 2023 · 4 comments
Labels
Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced Type:Bug

Comments

@nirajacharya2
Copy link
Contributor

nirajacharya2 commented Nov 29, 2023

Describe the bug

While starting ocis server, some services fail with Failed to connect to NATS Server: nats: no servers available for connection error and ocis exists. ociswrapper then tries to restart the ocis but the search service could not start properly (error: unexpected end of JSON input)

+ /drone/src/tests/ociswrapper/bin/ociswrapper serve --bin ocis/bin/ocis --url https://ocis-server:9200
2023/11/30 00:57:32 [ociswrapper] Starting ociswrapper on port 5200...
{"level":"info","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating spaces directory structure..."}
{"level":"info","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating space types indexes..."}
{"level":"info","root":"/root/.ocis/storage/users","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating to messagepack metadata backend..."}
{"level":"info","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"warn","error":"open /root/.ocis/storage/users/indexes/by-user-id: no such file or directory","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"error listing user indexes"}
{"level":"warn","error":"open /root/.ocis/storage/users/indexes/by-group-id: no such file or directory","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"error listing group indexes"}
{"level":"info","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"info","time":"2023-11-30T00:57:34Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"error","service":"invitations","error":"Failed to connect to NATS Server: nats: no servers available for connection","transport":"http","time":"2023-11-30T00:57:34Z","message":"Shutting down server"}
2023/11/30 00:57:34 [ociswrapper] oCIS server exited with code 1
2023/11/30 00:57:34 [ociswrapper] Retry starting oCIS server... (retry 1)
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:36Z","message":"Error initializing search service"}
{"level":"info","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating spaces directory structure..."}
{"level":"info","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating space types indexes..."}
{"level":"info","root":"/root/.ocis/storage/metadata","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"Migrating to messagepack metadata backend..."}
{"level":"info","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"warn","error":"open /root/.ocis/storage/metadata/indexes/by-user-id: no such file or directory","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"error listing user indexes"}
{"level":"warn","error":"open /root/.ocis/storage/metadata/indexes/by-group-id: no such file or directory","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"error listing group indexes"}
{"level":"info","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"info","time":"2023-11-30T00:57:36Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:170","message":"done."}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:39Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:40Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:40Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:40Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:40Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:40Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2023-11-30T00:57:43Z","message":"Error initializing search service"}

Builds:
https://drone.owncloud.com/owncloud/ocis/29404/37/6
https://drone.owncloud.com/owncloud/ocis/29423/58/9
https://drone.owncloud.com/owncloud/ocis/29427/36/3
https://drone.owncloud.com/owncloud/ocis/29460/31/3

@saw-jan
Copy link
Member

saw-jan commented Nov 30, 2023

ociswrapper is failing to restart. if it fails it should try to restart it self 5 times but dose not.

looks like there are some error logs but ocis didn't exit so the wrapper won't restart.

@saw-jan saw-jan changed the title ociswrapper not restarting Starting oCIS can fail with nats connection error Nov 30, 2023
@saw-jan saw-jan added Type:Bug and removed QA:team labels Nov 30, 2023
@saw-jan
Copy link
Member

saw-jan commented Dec 1, 2023

@saw-jan saw-jan added the Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced label Dec 5, 2023
@saw-jan
Copy link
Member

saw-jan commented Jan 31, 2024

Similar error: "error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n"
Build: https://drone.owncloud.com/owncloud/ocis/31448/11/5

{"level":"error","service":"app-provider","error":"unable to register services: rgrpc: grpc service appprovider could not be started,: Get \"http://fakeoffice:8080/hosting/discovery\": readLoopPeekFailLocked: %!w(<nil>)","time":"2024-01-31T01:22:07Z","message":"error starting the grpc server"}
2024/01/31 01:22:07 [ociswrapper] oCIS server exited with code 1
2024/01/31 01:22:07 [ociswrapper] Retry starting oCIS server... (retry 1)
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating spaces directory structure..."}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating space types indexes..."}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating spaces directory structure..."}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating space types indexes..."}
{"level":"info","root":"/root/.ocis/storage/metadata","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating to messagepack metadata backend..."}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"done."}
{"level":"warn","error":"open /root/.ocis/storage/metadata/indexes/by-user-id: no such file or directory","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"error listing user indexes"}
{"level":"warn","error":"open /root/.ocis/storage/metadata/indexes/by-group-id: no such file or directory","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"error listing group indexes"}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"done."}
{"level":"info","root":"/root/.ocis/storage/users","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"Migrating to messagepack metadata backend..."}
{"level":"info","time":"2024-01-31T01:22:14Z","caller":"/drone/src/vendor/github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/decomposedfs.go:195","message":"done."}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2024-01-31T01:22:14Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2024-01-31T01:22:14Z","message":"Error initializing search service"}
{"level":"error","service":"search","error":"error parsing mapping JSON: unexpected end of JSON input\nmapping contents:\n","time":"2024-01-31T01:22:14Z","message":"Error initializing search service"}

@saw-jan
Copy link
Member

saw-jan commented May 14, 2024

Haven't seen similar failures for months. There were a couple of nats fixes.
So closing for now

@saw-jan saw-jan closed this as completed May 14, 2024
@github-project-automation github-project-automation bot moved this from Qualification to Done in Infinite Scale Team Board May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Interaction:Needs-help Asking some hints to engineering when the issue can't be reproduced Type:Bug
Projects
Archived in project
Development

No branches or pull requests

2 participants