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

[Docker] Gitea not running when data directory is mounted externally from VM #15450

Closed
1 of 6 tasks
dl-lim opened this issue Apr 13, 2021 · 7 comments
Closed
1 of 6 tasks
Labels
type/upstream This is an issue in one of Gitea's dependencies and should be reported there

Comments

@dl-lim
Copy link

dl-lim commented Apr 13, 2021

Description

I tried spinning up a docker container based on the official documentation, but I kept getting the error in logs (see Logs), in the Mariadb mysql container.

For further context, my docker host is a VM, with some volumes mounted to the host.

If you need more details of my hypervisor and volume drivers, let me know, but I think the issue here may be in gitea's code as I am able to run many applications on this set up.

Let /srv/ be the directory in the VM itself, and let /srvmnt/ be the directory where the external volume is mounted into the VM.

Here are my findings from testing:

data mysql Works?
srv srv ok
srv srvmnt ok
srvmnt srv error
srvmnt srvmnt error

"data" refers to the docker mounted directory for the gitea web app based on the docker-compose.yml file below
"mysql" refers to the docker mounted directory for the mysql container

Where it says "ok", everything works fine, as intended.
Where it says "error", what happened was when I spun up the container, navigated to the web host and port, gitea greeted me with the installation. When the installation is completed (using default settings), it crashes and I can't visit the same url anymore. 404. Upon inspecting the docker logs, you'll see what is shown in Logs below. Looks normal for the Gitea container, but the mariadb instance is throwing the error [Warning] Aborted connection 11 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),

However, as shown in my table above, it is not an error when mounting the mariadb instance on the external drive. Error occurs when mounting the gitea data directory externally.

docker-compose.yml:

version: '2'
services:
  web:
    container_name: gitea
    image: gitea/gitea:1.14
    volumes:
      - /[srv or srvmnt]/gitea/data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "222:22"
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA__database__TYPE=mysql
      - GITEA__database__HOST=db:3306
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
    depends_on:
      - db
    restart: unless-stopped
  db:
    container_name: gitea_db
    image: mariadb:10.4
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=gitea
      - MYSQL_DATABASE=gitea
      - MYSQL_USER=gitea
      - MYSQL_PASSWORD=gitea
    volumes:
      - /[srv or srvmnt]/gitea/mysql:/var/lib/mysql

Logs:

Mysql (Mariadb) Logs
2021-04-13 12:32:26+00:00 [Note] [Entrypoint]: Database files initialized,
2021-04-13 12:32:26+00:00 [Note] [Entrypoint]: Starting temporary server,
2021-04-13 12:32:26+00:00 [Note] [Entrypoint]: Waiting for server startup,
2021-04-13 12:32:26 0 [Note] mysqld (mysqld 10.4.14-MariaDB-1:10.4.14+maria~focal) starting as process 121 ...,
2021-04-13 12:32:26 0 [Note] InnoDB: Using Linux native AIO,
2021-04-13 12:32:26 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2021-04-13 12:32:26 0 [Note] InnoDB: Uses event mutexes,
2021-04-13 12:32:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2021-04-13 12:32:26 0 [Note] InnoDB: Number of pools: 1,
2021-04-13 12:32:26 0 [Note] InnoDB: Using generic crc32 instructions,
2021-04-13 12:32:26 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts),
2021-04-13 12:32:26 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M,
2021-04-13 12:32:26 0 [Note] InnoDB: Completed initialization of buffer pool,
2021-04-13 12:32:26 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2021-04-13 12:32:26 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2021-04-13 12:32:26 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2021-04-13 12:32:26 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2021-04-13 12:32:26 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2021-04-13 12:32:26 0 [Note] InnoDB: Waiting for purge to start,
2021-04-13 12:32:26 0 [Note] InnoDB: 10.4.14 started; log sequence number 60967; transaction id 21,
2021-04-13 12:32:26 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool,
2021-04-13 12:32:26 0 [Note] Plugin 'FEEDBACK' is disabled.,
2021-04-13 12:32:26 0 [Note] InnoDB: Buffer pool(s) load completed at 210413 12:32:26,
2021-04-13 12:32:26 0 [Warning] 'user' entry 'root@cc32671f015f' ignored in --skip-name-resolve mode.,
2021-04-13 12:32:26 0 [Warning] 'user' entry '@cc32671f015f' ignored in --skip-name-resolve mode.,
2021-04-13 12:32:26 0 [Warning] 'proxies_priv' entry '@% root@cc32671f015f' ignored in --skip-name-resolve mode.,
2021-04-13 12:32:26 0 [Note] Reading of all Master_info entries succeeded,
2021-04-13 12:32:26 0 [Note] Added new Master_info '' to hash table,
2021-04-13 12:32:26 0 [Note] mysqld: ready for connections.,
Version: '10.4.14-MariaDB-1:10.4.14+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution,
2021-04-13 12:32:27+00:00 [Note] [Entrypoint]: Temporary server started.,
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.,
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.,
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.,
2021-04-13 12:32:28 10 [Warning] 'proxies_priv' entry '@% root@cc32671f015f' ignored in --skip-name-resolve mode.,
2021-04-13 12:32:28+00:00 [Note] [Entrypoint]: Creating database gitea,
2021-04-13 12:32:28+00:00 [Note] [Entrypoint]: Creating user gitea,
2021-04-13 12:32:28+00:00 [Note] [Entrypoint]: Giving user gitea access to schema gitea,
2021-04-13 12:32:28 14 [Warning] 'proxies_priv' entry '@% root@cc32671f015f' ignored in --skip-name-resolve mode.,
,
2021-04-13 12:32:28+00:00 [Note] [Entrypoint]: Stopping temporary server,
2021-04-13 12:32:28 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown,
2021-04-13 12:32:28 0 [Note] Event Scheduler: Purging the queue. 0 events,
2021-04-13 12:32:28 0 [Note] InnoDB: FTS optimize thread exiting.,
2021-04-13 12:32:28 0 [Note] InnoDB: Starting shutdown...,
2021-04-13 12:32:28 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool,
2021-04-13 12:32:28 0 [Note] InnoDB: Buffer pool(s) dump completed at 210413 12:32:28,
2021-04-13 12:32:30 0 [Note] InnoDB: Shutdown completed; log sequence number 60976; transaction id 24,
2021-04-13 12:32:30 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1",
2021-04-13 12:32:30 0 [Note] mysqld: Shutdown complete,
,
2021-04-13 12:32:30+00:00 [Note] [Entrypoint]: Temporary server stopped,
,
2021-04-13 12:32:30+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.,
,
2021-04-13 12:32:30 0 [Note] mysqld (mysqld 10.4.14-MariaDB-1:10.4.14+maria~focal) starting as process 1 ...,
2021-04-13 12:32:30 0 [Note] InnoDB: Using Linux native AIO,
2021-04-13 12:32:30 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2021-04-13 12:32:30 0 [Note] InnoDB: Uses event mutexes,
2021-04-13 12:32:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2021-04-13 12:32:30 0 [Note] InnoDB: Number of pools: 1,
2021-04-13 12:32:30 0 [Note] InnoDB: Using generic crc32 instructions,
2021-04-13 12:32:30 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts),
2021-04-13 12:32:30 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M,
2021-04-13 12:32:30 0 [Note] InnoDB: Completed initialization of buffer pool,
2021-04-13 12:32:30 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2021-04-13 12:32:30 0 [Note] InnoDB: 128 out of 128 rollback segments are active.,
2021-04-13 12:32:30 0 [Note] InnoDB: Creating shared tablespace for temporary tables,
2021-04-13 12:32:30 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...,
2021-04-13 12:32:30 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.,
2021-04-13 12:32:30 0 [Note] InnoDB: Waiting for purge to start,
2021-04-13 12:32:30 0 [Note] InnoDB: 10.4.14 started; log sequence number 60976; transaction id 21,
2021-04-13 12:32:30 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool,
2021-04-13 12:32:30 0 [Note] Plugin 'FEEDBACK' is disabled.,
2021-04-13 12:32:30 0 [Note] Server socket created on IP: '::'.,
2021-04-13 12:32:30 0 [Warning] 'proxies_priv' entry '@% root@cc32671f015f' ignored in --skip-name-resolve mode.,
2021-04-13 12:32:30 0 [Note] InnoDB: Buffer pool(s) load completed at 210413 12:32:30,
2021-04-13 12:32:30 0 [Note] Reading of all Master_info entries succeeded,
2021-04-13 12:32:30 0 [Note] Added new Master_info '' to hash table,
2021-04-13 12:32:30 0 [Note] mysqld: ready for connections.,
Version: '10.4.14-MariaDB-1:10.4.14+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution,
2021-04-13 12:33:08 11 [Warning] Aborted connection 11 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:08 10 [Warning] Aborted connection 10 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:08 9 [Warning] Aborted connection 9 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:09 15 [Warning] Aborted connection 15 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:09 16 [Warning] Aborted connection 16 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:10 20 [Warning] Aborted connection 20 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:10 19 [Warning] Aborted connection 19 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:12 24 [Warning] Aborted connection 24 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:12 22 [Warning] Aborted connection 22 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:13 29 [Warning] Aborted connection 29 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:13 26 [Warning] Aborted connection 26 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:16 33 [Warning] Aborted connection 33 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:16 31 [Warning] Aborted connection 31 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:20 37 [Warning] Aborted connection 37 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:20 35 [Warning] Aborted connection 35 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:27 39 [Warning] Aborted connection 39 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:27 38 [Warning] Aborted connection 38 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:41 45 [Warning] Aborted connection 45 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
2021-04-13 12:33:41 43 [Warning] Aborted connection 43 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
Gitea Logs
2021/04/13 20:47:10 routers/init.go:135:GlobalInit() [T] AppWorkPath: /app/gitea,
2021/04/13 20:47:10 routers/init.go:136:GlobalInit() [T] Custom path: /data/gitea,
2021/04/13 20:47:10 routers/init.go:137:GlobalInit() [T] Log path: /data/gitea/log,
2021/04/13 20:47:10 routers/init.go:49:checkRunMode() [I] Run Mode: Prod,
2021/04/13 20:47:10 ...dules/setting/log.go:287:newLogService() [I] Gitea v1.14.0 built with GNU Make 4.3, go1.16.3 : bindata, timetzdata, sqlite, sqlite_unlock_notify,
2021/04/13 20:47:10 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Console(Console:info),
2021/04/13 20:47:10 ...dules/setting/log.go:250:generateNamedLogger() [I] Router Log: Console(console:info),
2021/04/13 20:47:10 ...les/setting/cache.go:73:newCacheService() [I] Cache Service Enabled,
2021/04/13 20:47:10 ...les/setting/cache.go:88:newCacheService() [I] Last Commit Cache Service Enabled,
2021/04/13 20:47:10 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled,
2021/04/13 20:47:10 ...s/storage/storage.go:158:initAttachments() [I] Initialising Attachment storage with type: ,
2021/04/13 20:47:10 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments,
2021/04/13 20:47:10 ...s/storage/storage.go:152:initAvatars() [I] Initialising Avatar storage with type: ,
2021/04/13 20:47:10 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars,
2021/04/13 20:47:10 ...s/storage/storage.go:170:initRepoAvatars() [I] Initialising Repository Avatar storage with type: ,
2021/04/13 20:47:10 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars,
2021/04/13 20:47:10 ...s/storage/storage.go:164:initLFS() [I] Initialising LFS storage with type: ,
2021/04/13 20:47:10 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs,
2021/04/13 20:47:10 routers/init.go:150:GlobalInit() [I] SQLite3 Supported,
2021/04/13 20:47:10 routers/init.go:68:initDBEngine() [I] Beginning ORM engine initialization.,
2021/04/13 20:47:10 routers/init.go:75:initDBEngine() [I] ORM engine initialization attempt #1/10...,
2021/04/13 20:47:10 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE mysql,
2021/04/13 20:47:10 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful!,
2021/04/13 20:47:10 ...er/issues/indexer.go:142:func2() [I] PID 15: Initializing Issue Indexer: bleve,
2021/04/13 20:47:10 ...er/issues/indexer.go:159:func2() [F] Unable to initialize Bleve Issue Indexer at path: /data/gitea/indexers/issues.bleve Error: invalid argument,
Received signal 15; terminating.
,
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory
,
Server listening on :: port 22.
,
Server listening on 0.0.0.0 port 22.
,
2021/04/13 20:48:11 cmd/web.go:82:runWeb() [I] Starting Gitea on PID: 17,
2021/04/13 20:48:11 ...dules/setting/git.go:101:newGit() [I] Git Version: 2.30.2, Wire Protocol Version 2 Enabled,
2021/04/13 20:48:11 cmd/web.go:126:runWeb() [I] Global init,
2021/04/13 20:48:11 ...dules/setting/git.go:101:newGit() [I] Git Version: 2.30.2, Wire Protocol Version 2 Enabled,
2021/04/13 20:48:11 routers/init.go:134:GlobalInit() [T] AppPath: /app/gitea/gitea,
2021/04/13 20:48:11 routers/init.go:135:GlobalInit() [T] AppWorkPath: /app/gitea,
2021/04/13 20:48:11 routers/init.go:136:GlobalInit() [T] Custom path: /data/gitea,
2021/04/13 20:48:11 routers/init.go:137:GlobalInit() [T] Log path: /data/gitea/log,
2021/04/13 20:48:11 routers/init.go:49:checkRunMode() [I] Run Mode: Prod,
2021/04/13 20:48:11 ...dules/setting/log.go:287:newLogService() [I] Gitea v1.14.0 built with GNU Make 4.3, go1.16.3 : bindata, timetzdata, sqlite, sqlite_unlock_notify,
2021/04/13 20:48:11 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Console(Console:info),
2021/04/13 20:48:11 ...dules/setting/log.go:250:generateNamedLogger() [I] Router Log: Console(console:info),
2021/04/13 20:48:11 ...les/setting/cache.go:73:newCacheService() [I] Cache Service Enabled,
2021/04/13 20:48:11 ...les/setting/cache.go:88:newCacheService() [I] Last Commit Cache Service Enabled,
2021/04/13 20:48:11 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled,
2021/04/13 20:48:11 ...s/storage/storage.go:158:initAttachments() [I] Initialising Attachment storage with type: ,
2021/04/13 20:48:11 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments,
2021/04/13 20:48:11 ...s/storage/storage.go:152:initAvatars() [I] Initialising Avatar storage with type: ,
2021/04/13 20:48:11 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars,
2021/04/13 20:48:11 ...s/storage/storage.go:170:initRepoAvatars() [I] Initialising Repository Avatar storage with type: ,
2021/04/13 20:48:11 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars,
2021/04/13 20:48:11 ...s/storage/storage.go:164:initLFS() [I] Initialising LFS storage with type: ,
2021/04/13 20:48:11 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs,
2021/04/13 20:48:11 routers/init.go:150:GlobalInit() [I] SQLite3 Supported,
2021/04/13 20:48:11 routers/init.go:68:initDBEngine() [I] Beginning ORM engine initialization.,
2021/04/13 20:48:11 routers/init.go:75:initDBEngine() [I] ORM engine initialization attempt #1/10...,
2021/04/13 20:48:11 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE mysql,
2021/04/13 20:48:11 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful!,
2021/04/13 20:48:11 ...er/issues/indexer.go:142:func2() [I] PID 17: Initializing Issue Indexer: bleve,
2021/04/13 20:48:11 ...er/issues/indexer.go:159:func2() [F] Unable to initialize Bleve Issue Indexer at path: /data/gitea/indexers/issues.bleve Error: invalid argument,
Received signal 15; terminating.
,
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory
,
Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory
,
Server listening on :: port 22.
,
Server listening on 0.0.0.0 port 22.
,
2021/04/13 20:49:12 cmd/web.go:82:runWeb() [I] Starting Gitea on PID: 16,
2021/04/13 20:49:12 ...dules/setting/git.go:101:newGit() [I] Git Version: 2.30.2, Wire Protocol Version 2 Enabled,
2021/04/13 20:49:12 cmd/web.go:126:runWeb() [I] Global init,
2021/04/13 20:49:12 ...dules/setting/git.go:101:newGit() [I] Git Version: 2.30.2, Wire Protocol Version 2 Enabled,
2021/04/13 20:49:12 routers/init.go:134:GlobalInit() [T] AppPath: /app/gitea/gitea,
2021/04/13 20:49:12 routers/init.go:135:GlobalInit() [T] AppWorkPath: /app/gitea,
2021/04/13 20:49:12 routers/init.go:136:GlobalInit() [T] Custom path: /data/gitea,
2021/04/13 20:49:12 routers/init.go:137:GlobalInit() [T] Log path: /data/gitea/log,
2021/04/13 20:49:12 routers/init.go:49:checkRunMode() [I] Run Mode: Prod,
2021/04/13 20:49:12 ...dules/setting/log.go:287:newLogService() [I] Gitea v1.14.0 built with GNU Make 4.3, go1.16.3 : bindata, timetzdata, sqlite, sqlite_unlock_notify,
2021/04/13 20:49:12 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Console(Console:info),
2021/04/13 20:49:12 ...dules/setting/log.go:250:generateNamedLogger() [I] Router Log: Console(console:info),
2021/04/13 20:49:12 ...les/setting/cache.go:73:newCacheService() [I] Cache Service Enabled,
2021/04/13 20:49:12 ...les/setting/cache.go:88:newCacheService() [I] Last Commit Cache Service Enabled,
2021/04/13 20:49:12 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled,
2021/04/13 20:49:12 ...s/storage/storage.go:158:initAttachments() [I] Initialising Attachment storage with type: ,
2021/04/13 20:49:12 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/attachments,
2021/04/13 20:49:12 ...s/storage/storage.go:152:initAvatars() [I] Initialising Avatar storage with type: ,
2021/04/13 20:49:12 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/avatars,
2021/04/13 20:49:12 ...s/storage/storage.go:170:initRepoAvatars() [I] Initialising Repository Avatar storage with type: ,
2021/04/13 20:49:12 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/gitea/repo-avatars,
2021/04/13 20:49:12 ...s/storage/storage.go:164:initLFS() [I] Initialising LFS storage with type: ,
2021/04/13 20:49:12 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at /data/git/lfs,
2021/04/13 20:49:12 routers/init.go:150:GlobalInit() [I] SQLite3 Supported,
2021/04/13 20:49:12 routers/init.go:68:initDBEngine() [I] Beginning ORM engine initialization.,
2021/04/13 20:49:12 routers/init.go:75:initDBEngine() [I] ORM engine initialization attempt #1/10...,
2021/04/13 20:49:12 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE mysql,
2021/04/13 20:49:12 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful!,
2021/04/13 20:49:12 ...er/issues/indexer.go:142:func2() [I] PID 16: Initializing Issue Indexer: bleve,
2021/04/13 20:49:12 ...er/issues/indexer.go:159:func2() [F] Unable to initialize Bleve Issue Indexer at path: /data/gitea/indexers/issues.bleve Error: invalid argument,
Received signal 15; terminating.
,
@johanvdw
Copy link
Contributor

Is any file written to the mounted volumes? Does uid 1000 have permission to read/write in the mounted volumes?

@dl-lim
Copy link
Author

dl-lim commented May 18, 2021

@johanvdw , yup, those bases are covered. I've just had some time to test it on one other VM host, with exactly the same configuration, and somehow it works. Will investigate further and report back. Have you ever seen this error before? Any common problems and solutions I should look at first? Google didn't yield anything useful for me.

@dl-lim
Copy link
Author

dl-lim commented May 19, 2021

I still have no idea why. I am using the same two ubuntu 20.0.4 VM to run my docker containers. One of them works, and the other doesn't. They are configured identically.

Nevertheless, I kept searching and found similar issues for posterity:

@dl-lim
Copy link
Author

dl-lim commented May 19, 2021

Reporting back to say that it actually doesn't work on the other VM either, for the same reason. It worked because I mistakenly used SQLite on the second host. With MariaDB or MySQL, the same error shows.

This, then, is highly likely due to the go-sql-driver error I mentioned above.

@zeripath
Copy link
Contributor

Look at the logs, in particular the log line marked [F] for Fatal that keeps repeating before gitea restarts:

2021/04/13 20:48:11 ...er/issues/indexer.go:159:func2() [F] Unable to initialize Bleve Issue Indexer at path: /data/gitea/indexers/issues.bleve Error: invalid argument,
Received signal 15; terminating.

The problem is that Bleve cannot lock the file.

You will need to either switch to a filesystem that bleve can support or change the indexer type:

[indexer]
ISSUE_INDEXER_TYPE=db ; or use elasticsearch if you have one

@dl-lim
Copy link
Author

dl-lim commented May 19, 2021

@zeripath Thanks! I really wasn't sure what to make of that. The storage is on ZFS. Elasticsearch has always had the same problem for me with ZFS too.

Anyway, I will ask on bleve's repo about this. Up to mods if they decide this to be closed or remain open here. Cheers!

@lunny lunny added the type/upstream This is an issue in one of Gitea's dependencies and should be reported there label Jun 5, 2021
@wxiaoguang
Copy link
Contributor

After reading the issue in the upstream repo, I think it seems not a bug, neither Gitea side nor Bleve/ZFS side.

@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
type/upstream This is an issue in one of Gitea's dependencies and should be reported there
Projects
None yet
Development

No branches or pull requests

5 participants