#128 only restart base-server, got 409 Conflict panic: 409 Conflict

Closed
created 2 years ago by yiluxiangbei · 5 comments
release-v4.0.0 I think the panic method is not necessary. The log is ``` 2021/10/28 23:56:20 level=ERROR requestId= message=409 Conflict panic: 409 Conflict goroutine 1 [running]: server/base-server/internal/service/workspace.NewWorkspaceService(0xc0002dee00, 0x20fadd0, 0xc00000d0e0, 0xc0003977a0, 0x2127a58, 0xc00070bcb0) /app/server/base-server/internal/service/workspace/workspace.go:38 +0x391 server/base-server/internal/service.NewService(0x20fa388, 0xc00005c0b0, 0xc0002dee00, 0x20fadd0, 0xc00000d0e0, 0xc0003977a0, 0x0, 0x19d9470, 0xc0000d43d8) /app/server/base-server/internal/service/service.go:52 +0x536 main.initApp(0x20fa388, 0xc00005c0b0, 0xc0002dee00, 0x20fadd0, 0xc00000d0e0, 0x0, 0x0, 0x60, 0x7f5ca8a20108) /app/server/base-server/cmd/base-server/main.go:119 +0xbc main.main() /app/server/base-server/cmd/base-server/main.go:80 +0x2c5 ``` The code is ``` if err := data.Registry.CreateProject(&registry.ProjectReq{ProjectName: constant.SYSTEM_WORKSPACE_DEFAULT, Public: true}); err != nil { if !errors.IsError(errors.ErrorHarborProjectExists, err) { panic(err) } } ```
请你使用的harbor是什么版本的?
shamartor added the
help wanted
label 2 years ago
shamartor added this to the v4.0.1 milestone 2 years ago
shamartor self-assigned this 2 years ago
denglei was assigned by shamartor 2 years ago
denglei was unassigned by shamartor 2 years ago
yiluxiangbei commented 2 years ago
Poster
2.3.1
> 2.3.1 考虑只对harbor异常的时候`panic`,我看报错的错误是`409 Conflict`,按代码实现是不应该得到这个错误的,有修改过源码么?我这个对`harbor-2.3.1`调试,但并未发现问题,是否能提供其他可能的信息?
yiluxiangbei commented 2 years ago
Poster
If I delete the workspace, it can run successfully. I haven't change this code.
yiluxiangbei commented 2 years ago
Poster
![image](/attachments/ab6f5941-964d-4b5b-9417-6aa8726dcdd5)
yangxzh1 added the
已解决
label 2 years ago
yangxzh1 closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.