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

Mirror repo: no such file or directory <path>/git-daemon-export-ok #17241

Closed
somera opened this issue Oct 6, 2021 · 3 comments · Fixed by #17243
Closed

Mirror repo: no such file or directory <path>/git-daemon-export-ok #17241

somera opened this issue Oct 6, 2021 · 3 comments · Fixed by #17243
Labels
Milestone

Comments

@somera
Copy link

somera commented Oct 6, 2021

Gitea Version

1.15.3

Git Version

2.25.1

Operating System

Ubuntu 20.04.3

How are you running Gitea?

I'm running official build: gitea-1.15.3-linux-amd64

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

When I start a new mirror I see every time this

2021/10/06 20:26:58 models/repo.go:1159:CreateRepository() [E] Failed to create /var/lib/gitea/repositories/m66b/xprivacylua.git/git-daemon-export-ok: open /var/lib/gitea/repositories/m66b/xprivacylua.git/git-daemon-export-ok: no such file or directory
        /source/models/repo.go:1159 (0x143dc90)
        /source/modules/repository/create.go:58 (0x1583304)
        /source/models/context.go:53 (0x139cd04)
        /source/modules/repository/create.go:57 (0x156d349)
        /source/modules/task/task.go:107 (0x202a73a)
        /source/modules/task/task.go:61 (0x202a177)
        /source/routers/web/repo/migrate.go:235 (0x20cb3b7)
        /source/modules/web/route.go:64 (0x202f83b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16f49ea)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/web/route.go:103 (0x202ff16)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/web/route.go:103 (0x202ff16)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/web/route.go:103 (0x202ff16)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x20531a1)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/web/route.go:103 (0x202ff16)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/context/context.go:776 (0x17156e9)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16f254a)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16f893b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16f49ea)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/routers/web/base.go:186 (0x2265b50)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x14ff88e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/modules/public/public.go:42 (0x167640e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x16f254a)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x16f893b)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x16f49ea)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/routers/common/middleware.go:72 (0x2057c7d)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/routers/common/logger.go:23 (0x2056ebb)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x2053aa7)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x204f10e)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/routers/common/middleware.go:25 (0x20577bc)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x16f22d0)
        /source/modules/web/route.go:318 (0x202ed73)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x120bbb3)
        /usr/local/go/src/net/http/server.go:2049 (0x7bd183)
        /usr/local/go/src/net/http/server.go:2867 (0x7c0742)
        /usr/local/go/src/net/http/server.go:1932 (0x7bbc6c)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47aa40)

stacktrace in the gitea.log.

$ zgrep git-daemon-export-ok gitea.log* | wc -l
712

The mirror process is working.

Screenshots

No response

@flamechair
Copy link

I have the same issue when creating a new repository via migration

@somera somera changed the title Mirror repo: no such file or directory Mirror repo: no such file or directory <path>/git-daemon-export-ok Oct 6, 2021
@zeripath
Copy link
Contributor

zeripath commented Oct 6, 2021

In general STACKTRACE_LEVEL should be left unset. It's not generally helpful.


This error is mostly harmless - but it does indicate that the daemon-export-ok file is not being created for these repos.


This appears to have been caused by #16508 but looking at the current state of 1.15 and master the related code requires that the repo is present but the function it is currently in assumes and requires the opposite.

@KN4CK3R
Copy link
Member

KN4CK3R commented Oct 6, 2021

I have this error too but it does not have consequences 🤷‍♂️

2021/10/06 08:20:07 Started POST /repo/create for 127.0.0.1:39278
2021/10/06 08:20:07 models/repo.go:1153:CreateRepository() [E] Failed to create /src/data/gitea-repositories/kn4ck3r/test.git/git-daemon-export-ok: open /src/data/gitea-repositories/kn4ck3r/test.git/git-daemon-export-ok: no such file or directory
2021/10/06 08:20:08 Completed POST /repo/create 302 Found in 172.54231ms

zeripath added a commit to zeripath/gitea that referenced this issue Oct 6, 2021
There is an issue with go-gitea#16508 where it appears that create repo requires that the
repo does not exist. This causes go-gitea#17241 where an error is reported because of this.

This PR fixes this and also runs update-server-info for mirrors and generated repos.

Fix go-gitea#17241

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.15.4 milestone Oct 6, 2021
@techknowlogick techknowlogick modified the milestones: 1.15.4, 1.15.5 Oct 8, 2021
zeripath added a commit that referenced this issue Oct 13, 2021
* Ensure that git daemon export ok is created for mirrors

There is an issue with #16508 where it appears that create repo requires that the
repo does not exist. This causes #17241 where an error is reported because of this.

This PR fixes this and also runs update-server-info for mirrors and generated repos.

Fix #17241

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Oct 14, 2021
Backport go-gitea#17243

There is an issue with go-gitea#16508 where it appears that create repo requires that the
repo does not exist. This causes go-gitea#17241 where an error is reported because of this.

This PR fixes this and also runs update-server-info for mirrors and generated repos.

Fix go-gitea#17241

Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 pushed a commit that referenced this issue Oct 14, 2021
)

Backport #17243

There is an issue with #16508 where it appears that create repo requires that the
repo does not exist. This causes #17241 where an error is reported because of this.

This PR fixes this and also runs update-server-info for mirrors and generated repos.

Fix #17241

Signed-off-by: Andrew Thornton <art27@cantab.net>
Chianina pushed a commit to Chianina/gitea that referenced this issue Oct 15, 2021
* Ensure that git daemon export ok is created for mirrors

There is an issue with go-gitea#16508 where it appears that create repo requires that the
repo does not exist. This causes go-gitea#17241 where an error is reported because of this.

This PR fixes this and also runs update-server-info for mirrors and generated repos.

Fix go-gitea#17241

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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