Skip to content

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

Closed
@somera

Description

@somera

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions