Failed to initialize ORM engine #3318

Closed
opened 2025-11-02 05:08:00 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @alexej86 on GitHub (May 11, 2019).

  • Gitea version (or commit ref): v1.6.4 (eb0ee6bf58)
  • Go version: go1.12.5
  • Git version:
  • Operating system: debian 9
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

2019/05/11 20:26:04 [I] Log Mode: File(Info)
2019/05/11 20:26:04 [I] XORM Log Mode: File(Info)
2019/05/11 20:26:04 [I] Cache Service Enabled
2019/05/11 20:26:04 [I] Session Service Enabled
2019/05/11 20:26:04 [I] Mail Service Enabled
2019/05/11 20:26:04 [I] Register Mail Service Enabled
2019/05/11 20:26:04 [I] Notify Mail Service Enabled
2019/05/11 20:26:04 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable
2019/05/11 20:26:05 [I] Log Mode: File(Info)
2019/05/11 20:26:05 [I] XORM Log Mode: File(Info)
2019/05/11 20:26:05 [I] Cache Service Enabled
2019/05/11 20:26:05 [I] Session Service Enabled
2019/05/11 20:26:05 [I] Mail Service Enabled
2019/05/11 20:26:05 [I] Register Mail Service Enabled
2019/05/11 20:26:05 [I] Notify Mail Service Enabled
2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable
2019/05/11 20:26:05 [I] Log Mode: File(Info)
2019/05/11 20:26:05 [I] XORM Log Mode: File(Info)
2019/05/11 20:26:05 [I] Cache Service Enabled
2019/05/11 20:26:05 [I] Session Service Enabled
2019/05/11 20:26:05 [I] Mail Service Enabled
2019/05/11 20:26:05 [I] Register Mail Service Enabled
2019/05/11 20:26:05 [I] Notify Mail Service Enabled
2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable
2019/05/11 20:26:05 [I] Log Mode: File(Info)
2019/05/11 20:26:05 [I] XORM Log Mode: File(Info)
2019/05/11 20:26:05 [I] Cache Service Enabled
2019/05/11 20:26:05 [I] Session Service Enabled
2019/05/11 20:26:05 [I] Mail Service Enabled
2019/05/11 20:26:05 [I] Register Mail Service Enabled
2019/05/11 20:26:05 [I] Notify Mail Service Enabled
2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable
2019/05/11 20:26:05 [I] Log Mode: File(Info)
2019/05/11 20:26:05 [I] XORM Log Mode: File(Info)
2019/05/11 20:26:05 [I] Cache Service Enabled
2019/05/11 20:26:05 [I] Session Service Enabled
2019/05/11 20:26:05 [I] Mail Service Enabled
2019/05/11 20:26:05 [I] Register Mail Service Enabled
2019/05/11 20:26:05 [I] Notify Mail Service Enabled
2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable

Description

After upgrading from v1.5.3 to v1.6.4, gitea does not start. I started with gitea v1.3.3 and upgraded to v1.4.3 first, then upgraded to v1.5.3. It worked very well, but upgrading to v1.6.4 I got this error and need help.

Originally created by @alexej86 on GitHub (May 11, 2019). - Gitea version (or commit ref): v1.6.4 (eb0ee6bf584b530f5cfc23838112317560a5d925) - Go version: go1.12.5 - Git version: - Operating system: debian 9 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: 2019/05/11 20:26:04 [I] Log Mode: File(Info) 2019/05/11 20:26:04 [I] XORM Log Mode: File(Info) 2019/05/11 20:26:04 [I] Cache Service Enabled 2019/05/11 20:26:04 [I] Session Service Enabled 2019/05/11 20:26:04 [I] Mail Service Enabled 2019/05/11 20:26:04 [I] Register Mail Service Enabled 2019/05/11 20:26:04 [I] Notify Mail Service Enabled 2019/05/11 20:26:04 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable 2019/05/11 20:26:05 [I] Log Mode: File(Info) 2019/05/11 20:26:05 [I] XORM Log Mode: File(Info) 2019/05/11 20:26:05 [I] Cache Service Enabled 2019/05/11 20:26:05 [I] Session Service Enabled 2019/05/11 20:26:05 [I] Mail Service Enabled 2019/05/11 20:26:05 [I] Register Mail Service Enabled 2019/05/11 20:26:05 [I] Notify Mail Service Enabled 2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable 2019/05/11 20:26:05 [I] Log Mode: File(Info) 2019/05/11 20:26:05 [I] XORM Log Mode: File(Info) 2019/05/11 20:26:05 [I] Cache Service Enabled 2019/05/11 20:26:05 [I] Session Service Enabled 2019/05/11 20:26:05 [I] Mail Service Enabled 2019/05/11 20:26:05 [I] Register Mail Service Enabled 2019/05/11 20:26:05 [I] Notify Mail Service Enabled 2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable 2019/05/11 20:26:05 [I] Log Mode: File(Info) 2019/05/11 20:26:05 [I] XORM Log Mode: File(Info) 2019/05/11 20:26:05 [I] Cache Service Enabled 2019/05/11 20:26:05 [I] Session Service Enabled 2019/05/11 20:26:05 [I] Mail Service Enabled 2019/05/11 20:26:05 [I] Register Mail Service Enabled 2019/05/11 20:26:05 [I] Notify Mail Service Enabled 2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable 2019/05/11 20:26:05 [I] Log Mode: File(Info) 2019/05/11 20:26:05 [I] XORM Log Mode: File(Info) 2019/05/11 20:26:05 [I] Cache Service Enabled 2019/05/11 20:26:05 [I] Session Service Enabled 2019/05/11 20:26:05 [I] Mail Service Enabled 2019/05/11 20:26:05 [I] Register Mail Service Enabled 2019/05/11 20:26:05 [I] Notify Mail Service Enabled 2019/05/11 20:26:05 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable ## Description After upgrading from v1.5.3 to v1.6.4, gitea does not start. I started with gitea v1.3.3 and upgraded to v1.4.3 first, then upgraded to v1.5.3. It worked very well, but upgrading to v1.6.4 I got this error and need help.
GiteaMirror added the type/question label 2025-11-02 05:08:00 -06:00
Author
Owner

@zeripath commented on GitHub (May 11, 2019):

It looks like your app.ini is invalid for your database type:

GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable

Could you post your config (suitably anonymised)?

@zeripath commented on GitHub (May 11, 2019): It looks like your app.ini is invalid for your database type: `GlobalInit()] [E] Failed to initialize ORM engine: invalid value / unknown config name: enable` Could you post your config (suitably anonymised)?
Author
Owner

@alexej86 commented on GitHub (May 11, 2019):

APP_NAME = Gitea: Git with a cup of tea
RUN_USER = gitea
RUN_MODE = prod

[security]
INTERNAL_TOKEN = ***
INSTALL_LOCK = true
SECRET_KEY = ***

[database]
DB_TYPE = mysql
HOST = ***:3306
NAME = ***
USER = ***
PASSWD = ***
SSL_MODE = enable
PATH = data/gitea.db

[repository]
ROOT = /opt/btrfs/git/repositories

[server]
SSH_DOMAIN = localhost
DOMAIN = localhost
HTTP_PORT = 3000
ROOT_URL = https://git.*./
DISABLE_SSH = true
LFS_START_SERVER = false
OFFLINE_MODE = false

[mailer]
ENABLED = true
HOST = mail..com:587
FROM = @.

USER = @.***
PASSWD = ***

[service]
REGISTER_EMAIL_CONFIRM = true
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = true
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.example.org

[picture]
DISABLE_GRAVATAR = true
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE = file
LEVEL = Info
ROOT_PATH = /var/log/gitea

[oauth2]
JWT_SECRET = ***

@alexej86 commented on GitHub (May 11, 2019): APP_NAME = Gitea: Git with a cup of tea RUN_USER = gitea RUN_MODE = prod [security] INTERNAL_TOKEN = *** INSTALL_LOCK = true SECRET_KEY = *** [database] DB_TYPE = mysql HOST = ***:3306 NAME = *** USER = *** PASSWD = *** SSL_MODE = enable PATH = data/gitea.db [repository] ROOT = /opt/btrfs/git/repositories [server] SSH_DOMAIN = localhost DOMAIN = localhost HTTP_PORT = 3000 ROOT_URL = https://git.***.**/ DISABLE_SSH = true LFS_START_SERVER = false OFFLINE_MODE = false [mailer] ENABLED = true HOST = mail.***.com:587 FROM = ***@***.*** USER = ***@***.*** PASSWD = *** [service] REGISTER_EMAIL_CONFIRM = true ENABLE_NOTIFY_MAIL = true DISABLE_REGISTRATION = true ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = true DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = true DEFAULT_ENABLE_TIMETRACKING = true NO_REPLY_ADDRESS = noreply.example.org [picture] DISABLE_GRAVATAR = true ENABLE_FEDERATED_AVATAR = false [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false [session] PROVIDER = file [log] MODE = file LEVEL = Info ROOT_PATH = /var/log/gitea [oauth2] JWT_SECRET = ***
Author
Owner

@zeripath commented on GitHub (May 11, 2019):

I suspect it's this SSL_MODE = enable
Looking at

4508380cf7/custom/conf/app.ini.sample (L244-L245)

I think it should be SSL_MODE=true

@zeripath commented on GitHub (May 11, 2019): I suspect it's this `SSL_MODE = enable` Looking at https://github.com/go-gitea/gitea/blob/4508380cf7937aef0bf6f99fe3eefb6c530e38e3/custom/conf/app.ini.sample#L244-L245 I think it should be `SSL_MODE=true`
Author
Owner

@alexej86 commented on GitHub (May 12, 2019):

Thanks, it worked!

I see in logs that this setting had no effect if mysql was in use. Sinse SSL was implemented in v1.6.y, this setting must be true/false/skip-verify for mysql instead of enable/disable.

@alexej86 commented on GitHub (May 12, 2019): Thanks, it worked! I see in logs that this setting had no effect if mysql was in use. Sinse SSL was implemented in v1.6.y, this setting must be true/false/skip-verify for mysql instead of enable/disable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3318