Initial installation hangs forever #13325

Closed
opened 2025-11-02 10:38:35 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @justinhelmer on GitHub (Jul 24, 2024).

Description

I am able to load the installation page and confirm that it is able to connect to the local running db. I know it can connect to the db, because if the db is down or misconfigured, an error message is displayed.

However when I hit the "Install Gitea" button, the webpage hangs forever.

A single log message appears:

2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299

There is no other output after this point in time. Here is the complete log output:

justin@iris:/volume1/gitea$ docker-compose logs server --tail 100
gitea  | 2024/07/23 21:40:30 ...nvironment-to-ini.go:103:runEnvironmentToIni() [I] Settings saved to: "/data/gitea/conf/app.ini"
gitea  | Server listening on :: port 22.
gitea  | Server listening on 0.0.0.0 port 22.
gitea  | 2024/07/23 21:40:31 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 19
gitea  | 2024/07/23 21:40:31 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.1 built with GNU Make 4.4.1, go1.22.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
gitea  | 2024/07/23 21:40:31 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
gitea  | 2024/07/23 21:40:31 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini
gitea  | 2024/07/23 21:40:31 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page
gitea  | 2024/07/23 21:40:32 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000
gitea  | 2024/07/23 21:40:32 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/
gitea  | 2024/07/23 21:40:32 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 19
gitea  | 2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299
justin@iris:/volume1/gitea$ docker-compose logs server --tail 1000
gitea  | 2024/07/23 21:40:30 ...nvironment-to-ini.go:103:runEnvironmentToIni() [I] Settings saved to: "/data/gitea/conf/app.ini"
gitea  | Server listening on :: port 22.
gitea  | Server listening on 0.0.0.0 port 22.
gitea  | 2024/07/23 21:40:31 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 19
gitea  | 2024/07/23 21:40:31 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.1 built with GNU Make 4.4.1, go1.22.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
gitea  | 2024/07/23 21:40:31 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
gitea  | 2024/07/23 21:40:31 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea
gitea  | 2024/07/23 21:40:31 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini
gitea  | 2024/07/23 21:40:31 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page
gitea  | 2024/07/23 21:40:32 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000
gitea  | 2024/07/23 21:40:32 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/
gitea  | 2024/07/23 21:40:32 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 19
gitea  | 2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.45.2

Operating System

Synology DSM 7.2.1-69057 Update 5

How are you running Gitea?

Using the docker installation.

Here is the docker-compose.yml file:

version: "3"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:latest
    container_name: gitea
    environment:
      - USER_UID=1028
      - USER_GID=100
      - GITEA__database__DB_TYPE=mysql
      - GITEA__database__HOST=db:3306
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
    restart: always
    networks:
      - gitea
    volumes:
      - ./gitea:/data
      - /etc/TZ:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3333:3000"
      - "2222:22"
    depends_on:
      - db

  db:
    image: mysql:8
    restart: always
    user: 1028:100
    environment:
      - MYSQL_ROOT_PASSWORD=gitea
      - MYSQL_USER=gitea
      - MYSQL_PASSWORD=gitea
      - MYSQL_DATABASE=gitea
    networks:
      - gitea
    volumes:
      - ./mysql:/var/lib/mysql

Database

MySQL/MariaDB

Originally created by @justinhelmer on GitHub (Jul 24, 2024). ### Description I am able to load the installation page and confirm that it is able to connect to the local running db. I know it can connect to the db, because if the db is down or misconfigured, an error message is displayed. However when I hit the "Install Gitea" button, the webpage hangs forever. A single log message appears: > 2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299 There is no other output after this point in time. Here is the complete log output: ``` justin@iris:/volume1/gitea$ docker-compose logs server --tail 100 gitea | 2024/07/23 21:40:30 ...nvironment-to-ini.go:103:runEnvironmentToIni() [I] Settings saved to: "/data/gitea/conf/app.ini" gitea | Server listening on :: port 22. gitea | Server listening on 0.0.0.0 port 22. gitea | 2024/07/23 21:40:31 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 19 gitea | 2024/07/23 21:40:31 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.1 built with GNU Make 4.4.1, go1.22.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify gitea | 2024/07/23 21:40:31 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod gitea | 2024/07/23 21:40:31 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini gitea | 2024/07/23 21:40:31 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page gitea | 2024/07/23 21:40:32 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000 gitea | 2024/07/23 21:40:32 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/ gitea | 2024/07/23 21:40:32 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 19 gitea | 2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299 justin@iris:/volume1/gitea$ docker-compose logs server --tail 1000 gitea | 2024/07/23 21:40:30 ...nvironment-to-ini.go:103:runEnvironmentToIni() [I] Settings saved to: "/data/gitea/conf/app.ini" gitea | Server listening on :: port 22. gitea | Server listening on 0.0.0.0 port 22. gitea | 2024/07/23 21:40:31 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 19 gitea | 2024/07/23 21:40:31 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.1 built with GNU Make 4.4.1, go1.22.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify gitea | 2024/07/23 21:40:31 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod gitea | 2024/07/23 21:40:31 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea gitea | 2024/07/23 21:40:31 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini gitea | 2024/07/23 21:40:31 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page gitea | 2024/07/23 21:40:32 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000 gitea | 2024/07/23 21:40:32 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/ gitea | 2024/07/23 21:40:32 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 19 gitea | 2024/07/23 21:43:04 ...s/install/install.go:228:checkDatabase() [I] Gitea will be installed in a database with: hasPostInstallationUser=false, dbMigrationVersion=299 ``` ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.45.2 ### Operating System Synology DSM 7.2.1-69057 Update 5 ### How are you running Gitea? Using the [docker installation](https://docs.gitea.com/installation/install-with-docker). Here is the `docker-compose.yml` file: ```yml version: "3" networks: gitea: external: false services: server: image: gitea/gitea:latest container_name: gitea environment: - USER_UID=1028 - USER_GID=100 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=db:3306 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=gitea restart: always networks: - gitea volumes: - ./gitea:/data - /etc/TZ:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3333:3000" - "2222:22" depends_on: - db db: image: mysql:8 restart: always user: 1028:100 environment: - MYSQL_ROOT_PASSWORD=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=gitea - MYSQL_DATABASE=gitea networks: - gitea volumes: - ./mysql:/var/lib/mysql ``` ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:38:35 -06:00
Author
Owner

@justinhelmer commented on GitHub (Jul 24, 2024):

Turns out I just needed to give it a full 20m to populate the DB. Not sure if this is normal; if so, it probably should be documented somewhere. Might be specific to BTRFS

@justinhelmer commented on GitHub (Jul 24, 2024): Turns out I just needed to give it a full 20m to populate the DB. Not sure if this is normal; if so, it probably should be documented somewhere. Might be specific to BTRFS
Author
Owner

@nathang21 commented on GitHub (Oct 2, 2024):

+1 I ran into this as well on my Synology NAS. It kept failing when going through my reverse proxy with 504 timeouts, so I had to complete the initial install via localhost, and I thought it was the same issue but it appears it was attempting to do something in the background. I had to delete the .db file to retry.

I feel like the logs should show SOME sort of progress, perhaps this could be re-opened.

@nathang21 commented on GitHub (Oct 2, 2024): +1 I ran into this as well on my Synology NAS. It kept failing when going through my reverse proxy with 504 timeouts, so I had to complete the initial install via localhost, and I thought it was the same issue but it appears it was attempting to do something in the background. I had to delete the `.db` file to retry. I feel like the logs should show SOME sort of progress, perhaps this could be re-opened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13325