Internal Server Error 500 on Site Administration Page

I have been running Gitea on my server with no issues for several months. Recently I logged in and navigated to the Site Administration page, and received a 500 Internal Server Error response. I tried restarting both the Gitea and Apache services with no luck. I do not see any error messages in the logs for either (there are not even log files present in the Gitea logs directory). I have verified that my database service (SQL Server for Linux) is still running. Any ideas?

Thanks in advance!

1 Like

Could you please explain how you are running Gitea? The log files have to be somewhere and it depends on your installation method.

Certainly. I installed Gitea from binary on a Fedora 34 server. Here is my config file with sensitive information removed:

APP_NAME = <app-name>
RUN_USER = <app-user>
RUN_MODE = prod

[database]
DB_TYPE  = mssql
HOST     = <db-host>
NAME     = <db-name>
USER     = <db-user>
PASSWD   = <password>
SCHEMA   =
SSL_MODE = disable
CHARSET  = utf8
PATH     = <db-path>
LOG_SQL  = false

[repository]
ROOT = <repo-root>

[server]
PROTOCOL         = https
ROOT_URL         = <root-url>
HTTP_PORT        = 3000
CERT_FILE        = <cert-file>
KEY_FILE         = <key-file>

LFS_START_SERVER = true
LFS_CONTENT_PATH = <lfs-path>
LFS_JWT_SECRET   = <secret>

[mailer]
ENABLED = false

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

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[session]
PROVIDER = file

[log]
MODE      = console
LEVEL     = info
ROOT_PATH = /var/lib/gitea/log
ROUTER    = console

[security]
INSTALL_LOCK       = true

change RUN_MODE=dev and then refresh the page, it will display the error detail.

I did so, and got the following error message:

An error occurred:

template: admin/dashboard:8:90: executing “admin/dashboard” at : invalid value; expected string

I found this page indicating that this is a bug that was fixed in 1.16.1 (I am currently running 1.16.0). I am going to try updating and see if that fixes the problem.

Hi!

Same here, running the latest and greatest version (docker way): 1.17.0+rc2

template: admin/repo/list:48:25: executing "admin/repo/list" at <.Owner.HomeLink>: error calling HomeLink: runtime error: invalid memory address or nil pointer dereference

Hi @Zamana, Do you use custom templates at all?

Hi!

Templates? No that I’m aware of…

I guess I’m using it plain-vanilla

I just found out now that “Explore” gives the same error:

template: explore/repo_list:29:19: executing “explore/repo_list” at <.Owner.Visibility.IsPrivate>: nil pointer evaluating *user.User.Visibility

Please confirm you haven’t a customized template. And since v1.17.0 is out, please upgrade to that version.

My current version is 1.17.3, There are still problems.
I migrated gitea, and then this problem occurred, and the organization I created disappeared

I think maybe you have a custom template?