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

cache: unknown adapter 'memcache'(forgot to import?) #31102

Closed
somera opened this issue May 27, 2024 · 16 comments · Fixed by #31105
Closed

cache: unknown adapter 'memcache'(forgot to import?) #31102

somera opened this issue May 27, 2024 · 16 comments · Fixed by #31105
Labels
Milestone

Comments

@somera
Copy link

somera commented May 27, 2024

Description

I can't start gitea 1.22.0

$ GITEA_WORK_DIR=/var/lib/gitea/ /home/git/bin/gitea web -c /etc/gitea/app.ini
2024/05/27 13:14:59 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 2906
2024/05/27 13:14:59 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.0 built with GNU Make 4.3, go1.22.3 : bindata, sqlite, sqlite_unlock_notify
2024/05/27 13:14:59 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
2024/05/27 13:14:59 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /home/git/bin/gitea
2024/05/27 13:14:59 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea
2024/05/27 13:14:59 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom
2024/05/27 13:14:59 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini
2024/05/27 13:14:59 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server
2024/05/27 13:14:59 routers/init.go:116:InitWebInstalled() [I] Git version: 2.45.1 (home: /var/lib/gitea/data/home)

Log:

2024/05/27 13:15:00 routers/init.go:64:mustInit() [F] code.gitea.io/gitea/modules/cache.Init failed: cache: unknown adapter 'memcache'(forgot to import?)
        /source/routers/init.go:64 (0x28837ba)
        /source/routers/init.go:128 (0x2883e71)
        /source/cmd/web.go:194 (0x2986f0b)
        /source/cmd/web.go:262 (0x29874eb)
        /source/cmd/main.go:111 (0x297df82)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 (0x1c71d3c)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:272 (0x1c71f76)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 (0x1c6e5ca)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311 (0x297ea98)
        /source/cmd/main.go:172 (0x297ea7c)
        /source/main.go:46 (0x29c3638)
        /usr/local/go/src/runtime/proc.go:271 (0x442b3c)
                main: }
        /usr/local/go/src/runtime/asm_amd64.s:1695 (0x47b080)
                goexit: // Save the registers clobbered by the fast path. This is slightly

I downloaded gitea-1.22.0-linux-amd64.

Same config like for 1.21.11:

[cache]
ENABLED = true
; Either "memory", "redis", or "memcache", default is "memory"
ADAPTER = memcache
; For "memory" only, GC interval in seconds, default is 60
INTERVAL = 240
; For "redis" and "memcache", connection host address
; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
; memcache: `127.0.0.1:11211`
HOST = 192.168.178.34:11211
; Time to keep items in cache if not used, default is 16 hours.
; Setting it to 0 disables caching
ITEM_TTL = 16h

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.45.1

Operating System

Ubuntu 22.04.4 LTS

How are you running Gitea?

Downloaded gitea-1.22.0-linux-amd64

Database

PostgreSQL

@wxiaoguang
Copy link
Contributor

wxiaoguang commented May 27, 2024

I can't start gitea 1.22.0

I will propose a following up fix to import the "memcache" client.

As a workaround, could you try to use ADAPTER = memory? There should be no much difference IMO.

@wxiaoguang
Copy link
Contributor

-> Fix missing memcache import #31105

@wxiaoguang
Copy link
Contributor

1.22-nightly is ready, could you try it? Thank you for reporting the issue and sorry for the inconvenience

@somera
Copy link
Author

somera commented May 27, 2024

@wxiaoguang no problem. I set up extra an test environment before I upgrade to 1.22.0. ;)

Where can I download the nightly release?

@somera
Copy link
Author

somera commented May 27, 2024

@somera
Copy link
Author

somera commented May 27, 2024

1.22-nightly is ready, could you try it? Thank you for reporting the issue and sorry for the inconvenience

Looks good.

2024/05/27 20:22:55 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 1981
2024/05/27 20:22:55 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.0+3-g7ecb1d63bb built with GNU Make 4.3, go1.22.3 : bindata, sqlite, sqlite_unlock_notify
2024/05/27 20:22:55 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
2024/05/27 20:22:55 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /home/git/bin/gitea-1.22-nightly-linux-amd64
2024/05/27 20:22:55 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea
2024/05/27 20:22:55 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom
2024/05/27 20:22:55 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini
2024/05/27 20:22:55 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server
2024/05/27 20:22:55 routers/init.go:116:InitWebInstalled() [I] Git version: 2.45.1 (home: /var/lib/gitea/data/home)

image

@somera
Copy link
Author

somera commented Jun 23, 2024

@wxiaoguang when will be 1.22.1 released?

@wxiaoguang
Copy link
Contributor

@wxiaoguang when will be 1.22.1 released?

@lunny

@pi3ch
Copy link

pi3ch commented Jun 29, 2024

@wxiaoguang when will be 1.22.1 released?

Any timeframe on this?

@wxiaoguang
Copy link
Contributor

@lunny

@somera
Copy link
Author

somera commented Jun 29, 2024

See the answer here

@techknowlogick
Copy link
Member

We have it scheduled for Tuesday.

@somera
Copy link
Author

somera commented Jul 3, 2024

@techknowlogick now we have Wednesday.

@techknowlogick
Copy link
Member

@somera some last minute testing came up due to the recently released opensshd security report. We needed to investigate if we were affected or not prior to releasing and thankfully we are not.
The changelog has been created, I marked it as ready for review, and the reviews are coming in.

@somera
Copy link
Author

somera commented Jul 4, 2024

Works fine now on my instance witn 1.22.1. Thx.

@lunny
Copy link
Member

lunny commented Jul 4, 2024

@lunny

Sorry, I have missed so many messages because of traveling.

@lunny lunny added this to the 1.22.1 milestone Aug 1, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants