routers/init.go:64:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: Endpoint: does not follow ip address or domain name standards. #13865

Closed
opened 2025-11-02 10:55:30 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @seepine on GitHub (Dec 20, 2024).

Description

app.ini


[storage]
STORAGE_TYPE = minio

MINIO_ENDPOINT = 192.168.2.5:9010
MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr
MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr
MINIO_BUCKET = gitea
MINIO_LOCATION = china-1

MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
SERVE_DIRECT = true


[lfs]
STORAGE_TYPE = minio

[picture]
AVATAR_STORAGE_TYPE = minio

[repo-archive]
STORAGE_TYPE = minio

[actions]
STORAGE_TYPE = minio

And restart gitea server got error log

2024/12/20 21:07:34 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 7

2024/12/20 21:07:34 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.6 built with GNU Make 4.4.1, go1.22.10 : bindata, timetzdata, sqlite, sqlite_unlock_notify

2024/12/20 21:07:34 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod

2024/12/20 21:07:34 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea

2024/12/20 21:07:34 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea

2024/12/20 21:07:34 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom

2024/12/20 21:07:34 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini

2024/12/20 21:07:34 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server

2024/12/20 21:07:34 routers/init.go:116:InitWebInstalled() [I] Git version: 2.45.2 (home: /var/lib/gitea/home)

2024/12/20 21:07:34 ...s/setting/session.go:77:loadSessionFrom() [I] Session Service Enabled

2024/12/20 21:07:34 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: minio

2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path attachments/

2024/12/20 21:07:34 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: minio

2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path avatars/

2024/12/20 21:07:34 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: minio

2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path repo-avatars/

2024/12/20 21:07:34 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: minio

2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at : with base path lfs/

2024/12/20 21:07:34 routers/init.go:64:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: Endpoint:  does not follow ip address or domain name standards.

Gitea Version

gitea/gitea:1.22.6-rootless

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker rootless

Database

PostgreSQL

Originally created by @seepine on GitHub (Dec 20, 2024). ### Description app.ini ```ini [storage] STORAGE_TYPE = minio MINIO_ENDPOINT = 192.168.2.5:9010 MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr MINIO_BUCKET = gitea MINIO_LOCATION = china-1 MINIO_USE_SSL = false MINIO_INSECURE_SKIP_VERIFY = true SERVE_DIRECT = true [lfs] STORAGE_TYPE = minio [picture] AVATAR_STORAGE_TYPE = minio [repo-archive] STORAGE_TYPE = minio [actions] STORAGE_TYPE = minio ``` And restart gitea server got error log ```log 2024/12/20 21:07:34 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 7 2024/12/20 21:07:34 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.6 built with GNU Make 4.4.1, go1.22.10 : bindata, timetzdata, sqlite, sqlite_unlock_notify 2024/12/20 21:07:34 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod 2024/12/20 21:07:34 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea 2024/12/20 21:07:34 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea 2024/12/20 21:07:34 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom 2024/12/20 21:07:34 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini 2024/12/20 21:07:34 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server 2024/12/20 21:07:34 routers/init.go:116:InitWebInstalled() [I] Git version: 2.45.2 (home: /var/lib/gitea/home) 2024/12/20 21:07:34 ...s/setting/session.go:77:loadSessionFrom() [I] Session Service Enabled 2024/12/20 21:07:34 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: minio 2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path attachments/ 2024/12/20 21:07:34 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: minio 2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path avatars/ 2024/12/20 21:07:34 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: minio 2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at 192.168.2.5:9010:gitea with base path repo-avatars/ 2024/12/20 21:07:34 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: minio 2024/12/20 21:07:34 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at : with base path lfs/ 2024/12/20 21:07:34 routers/init.go:64:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: Endpoint: does not follow ip address or domain name standards. ``` ### Gitea Version gitea/gitea:1.22.6-rootless ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker rootless ### Database PostgreSQL
GiteaMirror added the type/docstype/bug labels 2025-11-02 10:55:30 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Dec 20, 2024):

It is a bug, you could try to use [storage.lfs] instead to inherit

@wxiaoguang commented on GitHub (Dec 20, 2024): It is a bug, you could try to use `[storage.lfs]` instead to inherit
Author
Owner

@seepine commented on GitHub (Dec 20, 2024):

Yes, the [storage.minio] can work

image
@seepine commented on GitHub (Dec 20, 2024): Yes, the `[storage.minio]` can work <img width="1103" alt="image" src="https://github.com/user-attachments/assets/2ae1b104-7479-4a58-8849-8dc15a0eae63" />
Author
Owner

@lunny commented on GitHub (Dec 20, 2024):

I don't think it's a bug.
If you design like the below.

[storage]
STORAGE_TYPE = minio

MINIO_ENDPOINT = 192.168.2.5:9010
MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr
MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr
MINIO_BUCKET = gitea
MINIO_LOCATION = china-1

MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
SERVE_DIRECT = true

This is a default storage for all other storage sections, so you don't need to do anything in your other sections.

[lfs]
// just leave blank for STORAGE_TYPE

If you have multiple storage configurations, one is like below.

[storage.my_cfg]
STORAGE_TYPE = minio

MINIO_ENDPOINT = 192.168.2.5:9010
MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr
MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr
MINIO_BUCKET = gitea
MINIO_LOCATION = china-1

MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
SERVE_DIRECT = true
[lfs]
STORAGE_TYPE = my_cfg

You can not mix the two usages.

But I think the error message should be more friendly.

@lunny commented on GitHub (Dec 20, 2024): I don't think it's a bug. If you design like the below. ```ini [storage] STORAGE_TYPE = minio MINIO_ENDPOINT = 192.168.2.5:9010 MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr MINIO_BUCKET = gitea MINIO_LOCATION = china-1 MINIO_USE_SSL = false MINIO_INSECURE_SKIP_VERIFY = true SERVE_DIRECT = true ``` This is a default storage for all other storage sections, so you don't need to do anything in your other sections. ```ini [lfs] // just leave blank for STORAGE_TYPE ``` If you have multiple storage configurations, one is like below. ```ini [storage.my_cfg] STORAGE_TYPE = minio MINIO_ENDPOINT = 192.168.2.5:9010 MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr MINIO_BUCKET = gitea MINIO_LOCATION = china-1 MINIO_USE_SSL = false MINIO_INSECURE_SKIP_VERIFY = true SERVE_DIRECT = true ``` ```ini [lfs] STORAGE_TYPE = my_cfg ``` You can not mix the two usages. But I think the error message should be more friendly.
Author
Owner

@seepine commented on GitHub (Dec 21, 2024):

I don't think it's a bug. If you design like the below.

[storage]
STORAGE_TYPE = minio

MINIO_ENDPOINT = 192.168.2.5:9010
MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr
MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr
MINIO_BUCKET = gitea
MINIO_LOCATION = china-1

MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
SERVE_DIRECT = true

This is a default storage for all other storage sections, so you don't need to do anything in your other sections.

[lfs]
// just leave blank for STORAGE_TYPE

If you have multiple storage configurations, one is like below.

[storage.my_cfg]
STORAGE_TYPE = minio

MINIO_ENDPOINT = 192.168.2.5:9010
MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr
MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr
MINIO_BUCKET = gitea
MINIO_LOCATION = china-1

MINIO_USE_SSL = false
MINIO_INSECURE_SKIP_VERIFY = true
SERVE_DIRECT = true
[lfs]
STORAGE_TYPE = my_cfg

You can not mix the two usages.

But I think the error message should be more friendly.

Thanks, your configuration examples are very clear.
But the examples in the document are prone to cause misunderstanding.

image image
@seepine commented on GitHub (Dec 21, 2024): > I don't think it's a bug. If you design like the below. > > ```ini > [storage] > STORAGE_TYPE = minio > > MINIO_ENDPOINT = 192.168.2.5:9010 > MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr > MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr > MINIO_BUCKET = gitea > MINIO_LOCATION = china-1 > > MINIO_USE_SSL = false > MINIO_INSECURE_SKIP_VERIFY = true > SERVE_DIRECT = true > ``` > > This is a default storage for all other storage sections, so you don't need to do anything in your other sections. > > ```ini > [lfs] > // just leave blank for STORAGE_TYPE > ``` > > If you have multiple storage configurations, one is like below. > > ```ini > [storage.my_cfg] > STORAGE_TYPE = minio > > MINIO_ENDPOINT = 192.168.2.5:9010 > MINIO_ACCESS_KEY_ID = r3lyxxxxxxqCjRr > MINIO_SECRET_ACCESS_KEY = nEQ9xxxxxxxxiNfGr > MINIO_BUCKET = gitea > MINIO_LOCATION = china-1 > > MINIO_USE_SSL = false > MINIO_INSECURE_SKIP_VERIFY = true > SERVE_DIRECT = true > ``` > > ```ini > [lfs] > STORAGE_TYPE = my_cfg > ``` > > You can not mix the two usages. > > But I think the error message should be more friendly. Thanks, your configuration examples are very clear. But the examples in the document are prone to cause misunderstanding. <img width="587" alt="image" src="https://github.com/user-attachments/assets/74e8e431-674c-4c5b-b574-82a04178b86a" /> <img width="558" alt="image" src="https://github.com/user-attachments/assets/e7bab809-e31a-435e-b396-e21cb582f048" />
Author
Owner

@lunny commented on GitHub (Dec 22, 2024):

I sent https://gitea.com/gitea/docs/pulls/131 to update the related documentations.

@lunny commented on GitHub (Dec 22, 2024): I sent https://gitea.com/gitea/docs/pulls/131 to update the related documentations.
Author
Owner

@lunny commented on GitHub (Dec 28, 2024):

Closed as https://gitea.com/gitea/docs/pulls/131 merged.

@lunny commented on GitHub (Dec 28, 2024): Closed as https://gitea.com/gitea/docs/pulls/131 merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13865