gitea
gitea copied to clipboard
cache: unknown adapter 'memcache'(forgot to import?)
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
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.
-> Fix missing memcache import #31105
1.22-nightly is ready, could you try it? Thank you for reporting the issue and sorry for the inconvenience
@wxiaoguang no problem. I set up extra an test environment before I upgrade to 1.22.0. ;)
Where can I download the nightly release?
I get it: https://dl.gitea.com/gitea/1.22-nightly/
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)
@wxiaoguang when will be 1.22.1 released?
@wxiaoguang when will be 1.22.1 released?
@lunny
@wxiaoguang when will be 1.22.1 released?
Any timeframe on this?
@lunny
See the answer here
We have it scheduled for Tuesday.
@techknowlogick now we have Wednesday.
@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.
Works fine now on my instance witn 1.22.1. Thx.
@lunny
Sorry, I have missed so many messages because of traveling.