Trouble upgrading from 0.9.0 to 11.34


#1

After upgrading from 0.9.0 to 11.34 gogs dies on startup without panic or logging an error.

I’ve included the logs, config and steps I took to install below. It’s using Mariadb 10.0.x, CentOS 7.2 x64.

gogs.log:

2018/01/12 10:55:29 [TRACE] Log Mode: File (Trace)
2018/01/12 10:55:29 [ INFO] Gogs: Go Git Service 0.11.34.1122
2018/01/12 10:55:29 [ INFO] Cache Service Enabled
2018/01/12 10:55:29 [ INFO] Session Service Enabled
2018/01/12 10:55:29 [ INFO] Mail Service Enabled
2018/01/12 10:55:29 [ INFO] Notify Mail Service Enabled
2018/01/12 10:55:29 [ INFO] Git Version: 1.8.3.1
2018/01/12 10:55:29 [ INFO] SQLite3 Supported
2018/01/12 10:55:29 [ INFO] Run Mode: Production
2018/01/12 10:55:29 [TRACE] Doing: CheckRepoStats

xorm.log:

[xorm] [warn]  2018/01/12 10:55:29.220871 Table repository Column size db default is , struct default is 0
[xorm] [warn]  2018/01/12 10:55:29.220899 Table repository Column size db nullable is true, struct nullable is false
[xorm] [warn]  2018/01/12 10:55:29.220912 Table repository Column enable_wiki db default is 1, struct default is true
[xorm] [warn]  2018/01/12 10:55:29.220920 Table repository Column enable_issues db default is 1, struct default is true
[xorm] [warn]  2018/01/12 10:55:29.220934 Table repository Column enable_pulls db default is 1, struct default is true
[xorm] [warn]  2018/01/12 10:55:29.220939 Table repository Column pulls_ignore_whitespace db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.220945 Table repository Column pulls_allow_rebase db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.220949 Table repository Column is_fork db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.221157 Table action Column is_private db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.221492 Table mirror Column enable_prune db default is 1, struct default is true
[xorm] [warn]  2018/01/12 10:55:29.221546 Table release column num_commits db type is INT(11), struct type is BIGINT(20)
[xorm] [warn]  2018/01/12 10:55:29.221553 Table release Column is_draft db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.221590 Table login_source Column is_actived db default is 0, struct default is false
[xorm] [warn]  2018/01/12 10:55:29.221877 Table access_token has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221888 Table access_token has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221894 Table action has column act_email but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221900 Table action has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221906 Table attachment has column path but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221910 Table attachment has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221915 Table collaboration has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221921 Table comment has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221927 Table deploy_key has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221930 Table deploy_key has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221946 Table issue has column label_ids but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221952 Table issue has column deadline but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221956 Table issue has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221960 Table issue has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221972 Table login_source has column allow_auto_register but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221976 Table login_source has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221979 Table login_source has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221984 Table milestone has column index but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221989 Table milestone has column deadline but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.221998 Table milestone has column closed_date but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222003 Table mirror has column repo_name but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222007 Table mirror has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222011 Table mirror has column next_update but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222016 Table notice has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222028 Table public_key has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222032 Table public_key has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222037 Table pull_request has column pull_id but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222044 Table pull_request has column pull_index but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222049 Table pull_request has column head_barcnh but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222054 Table pull_request has column can_auto_merge but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222059 Table pull_request has column merged but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222069 Table release has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222084 Table repository has column is_goget but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222090 Table repository has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222095 Table repository has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222110 Table team has column repo_ids but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222131 Table user has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222135 Table user has column updated but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222144 Table user has column num_followings but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222161 Table webhook has column created but struct has not related field
[xorm] [warn]  2018/01/12 10:55:29.222175 Table webhook has column updated but struct has not related field

Steps I took to installed:

  • Download amd64 binary installation and replaced my old directory
  • Coped in my old custom, data and log directories.
  • chown log directory and files to git
  • alter the name columns of protect_branch and protect_branch_whitelist to use utf8_general_ci instead of mb4 because of the limited index size on mariadb 10.0

My app.ini (vetted):

APP_NAME = Gogs: Go Git Service
RUN_USER = git
RUN_MODE = prod

[repository]
ROOT = /var/gogs-repositories
SCRIPT_TYPE = bash

[server]
PROTOCOL = http
DOMAIN = gogs.123.org
ROOT_URL = https://gogs.123.org/
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 4443
SSH_PORT = 2222
OFFLINE_MODE = false
DISABLE_ROUTER_LOG = false
STATIC_ROOT_PATH =
ENABLE_GZIP = true
LANDING_PAGE = home

[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gogs
USER = gogs
PASSWD = gogs
SSL_MODE = disable
PATH = data/gogs.db

[admin]

[security]
INSTALL_LOCK = true
SECRET_KEY = 123
LOGIN_REMEMBER_DAYS = 7
COOKIE_USERNAME = gogs_awesome
COOKIE_REMEMBER_NAME = gogs_incredible
REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER

[service]
ACTIVE_CODE_LIVE_MINUTES = 180
RESET_PASSWD_CODE_LIVE_MINUTES = 180
REGISTER_EMAIL_CONFIRM = false
DISABLE_REGISTRATION = true
REQUIRE_SIGNIN_VIEW = true
ENABLE_CACHE_AVATAR = false
ENABLE_NOTIFY_MAIL = true
ENABLE_REVERSE_PROXY_AUTHENTICATION = false
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false

[webhook]
TASK_INTERVAL = 1
DELIVER_TIMEOUT = 5

[mailer]
ENABLED = true
SEND_BUFFER_LEN = 10
SUBJECT = %(APP_NAME)s
HOST = localhost
SKIP_VERIFY =
FROM =
USER =
PASSWD =
NAME =

[oauth]
ENABLED = false

[oauth.github]
ENABLED = false
CLIENT_ID =
CLIENT_SECRET =
SCOPES = https://api.github.com/user
AUTH_URL = https://github.com/login/oauth/authorize
TOKEN_URL = https://github.com/login/oauth/access_token

[oauth.google]
ENABLED = false
CLIENT_ID =
CLIENT_SECRET =
SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
AUTH_URL = https://accounts.google.com/o/oauth2/auth
TOKEN_URL = https://accounts.google.com/o/oauth2/token

[oauth.qq]
ENABLED = false
CLIENT_ID =
CLIENT_SECRET =
SCOPES = get_user_info
AUTH_URL = https://graph.qq.com/oauth2.0/authorize
TOKEN_URL = https://graph.qq.com/oauth2.0/token

[oauth.weibo]
ENABLED = false
CLIENT_ID =
CLIENT_SECRET =
SCOPES = all
AUTH_URL = https://api.weibo.com/oauth2/authorize
TOKEN_URL = https://api.weibo.com/oauth2/access_token

[cache]
ADAPTER = memory
INTERVAL = 60
HOST =

[session]
PROVIDER = file
PROVIDER_CONFIG = data/sessions
COOKIE_NAME = i_like_gogits
COOKIE_SECURE = false
ENABLE_SET_COOKIE = true
GC_INTERVAL_TIME = 86400
SESSION_LIFE_TIME = 86400

[picture]
SERVICE = server
AVATAR_UPLOAD_PATH = data/avatars
GRAVATAR_SOURCE = gravatar
DISABLE_GRAVATAR = false

[attachment]
ENABLE = true
PATH = data/attachments
ALLOWED_TYPES = image/jpeg|image/png
MAX_SIZE = 32
MAX_FILES = 10

[time]
FORMAT =

[log]
ROOT_PATH =
MODE = file
BUFFER_LEN = 10000
LEVEL = Debug

[log.console]
LEVEL =

[log.file]
LEVEL =
LOG_ROTATE = true
MAX_LINES = 1000000
MAX_SIZE_SHIFT = 28
DAILY_ROTATE = true
MAX_DAYS = 7
FILE_NAME =

[log.conn]
LEVEL =
RECONNECT_ON_MSG = false
RECONNECT = false
PROTOCOL = tcp
ADDR =

[log.smtp]
LEVEL =
SUBJECT = Diagnostic message from serve
HOST =
USER =
PASSWD =
RECEIVERS =

[log.database]
LEVEL =
DRIVER =
CONN =

[git]
MAX_GIT_DIFF_LINES = 10000
GC_ARGS =

[git.fsck]
ENABLE = true
INTERVAL = 24
ARGS =

[i18n]
LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV
NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu

#2

The panics were going to stdout and ended up in the journal, missed that. Turned out to be fr-CA was not on disk and I had to remove that from the i18n (along with the name entry).

Then chown the data directory (for sessions).

Working now.