gitea wants to unlink uds on startup #428

Closed
opened 2025-11-02 03:23:08 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @philfry on GitHub (Mar 6, 2017).

  • Gitea version (or commit ref): 1.0.2
  • Git version: 2.12.0
  • Operating system: Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When configuring gitea to listen on a UDS gitea tries to unlink the socket file on startup.
If that socket file does not exist, gitea bails out.
see cmd/web.go

681     case setting.UnixSocket:
682         if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
683             log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)                                                                                                      
684         }
Originally created by @philfry on GitHub (Mar 6, 2017). - Gitea version (or commit ref): 1.0.2 - Git version: 2.12.0 - Operating system: Linux - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When configuring gitea to listen on a UDS gitea tries to unlink the socket file on startup. If that socket file does not exist, gitea bails out. see `cmd/web.go` ``` go 681 case setting.UnixSocket: 682 if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) { 683 log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err) 684 } ```
GiteaMirror added the type/bug label 2025-11-02 03:23:08 -06:00
Author
Owner

@lunny commented on GitHub (Mar 6, 2017):

if the err is not os.IsNotExist, then it failed. could you paste your log here?

@lunny commented on GitHub (Mar 6, 2017): if the err is not os.IsNotExist, then it failed. could you paste your log here?
Author
Owner

@philfry commented on GitHub (Mar 6, 2017):

Sure, here it is:

2017/03/06 15:34:19 [....io/gitea/cmd/web.go:613 runWeb()] [E] Fail to remove unix socket directory /var/lib/gitea/socket: remove /var/lib/gitea/socket: no such file or directory
@philfry commented on GitHub (Mar 6, 2017): Sure, here it is: ``` 2017/03/06 15:34:19 [....io/gitea/cmd/web.go:613 runWeb()] [E] Fail to remove unix socket directory /var/lib/gitea/socket: remove /var/lib/gitea/socket: no such file or directory ```
Author
Owner

@lunny commented on GitHub (Mar 7, 2017):

This bug has been fixed on master and we will release v1.1 soon.

@lunny commented on GitHub (Mar 7, 2017): This bug has been fixed on master and we will release v1.1 soon.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#428