Error 500 on all admin users dashboards #7238

Closed
opened 2025-11-02 07:20:34 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @artues on GitHub (Apr 23, 2021).

  • Gitea version (or commit ref):
  • Git version: 1.15.0+dev-180-gbee8ce342
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I am running Gitea version 1.15.0+dev-180-gbee8ce342 on microk8s v1.3.7, I've been using it without problems until today when I deleted all repos manually from /data/git/repositories and the database, after doing this i got an error 500 on my admin user dashboard (non admin users works properly), I tried changing in the database the is_admin to another user and then the error appears with that user too.

I've looking for logs but there is non, /var/log and /data/gitea/log are empty, I don't know if I should be looking in other paths.

I also tried restarting with microk8s.kubectl -n namespace rollout restart deployment name but didn't fix the problem.

Screenshots

imagen

Originally created by @artues on GitHub (Apr 23, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: 1.15.0+dev-180-gbee8ce342 - Operating system: <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> I am running Gitea version 1.15.0+dev-180-gbee8ce342 on microk8s v1.3.7, I've been using it without problems until today when I deleted all repos manually from /data/git/repositories and the database, after doing this i got an error 500 on my admin user dashboard (non admin users works properly), I tried changing in the database the _is_admin_ to another user and then the error appears with that user too. I've looking for logs but there is non, /var/log and /data/gitea/log are empty, I don't know if I should be looking in other paths. I also tried restarting with microk8s.kubectl -n _namespace_ rollout restart deployment _name_ but didn't fix the problem. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![imagen](https://user-images.githubusercontent.com/45163566/115864045-a0544a80-a436-11eb-845f-e063a7f4eba5.png)
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:20:34 -06:00
Author
Owner

@techknowlogick commented on GitHub (Apr 23, 2021):

A couple things, 1. documentation for getting logs for debugging can be found here: https://docs.gitea.io/en-us/logging-configuration/#debugging-problems and 2. are you using the helm-chart? as that is recommended way of running Gitea on kubernetes.

@techknowlogick commented on GitHub (Apr 23, 2021): A couple things, 1. documentation for getting logs for debugging can be found here: https://docs.gitea.io/en-us/logging-configuration/#debugging-problems and 2. are you using the helm-chart? as that is recommended way of running Gitea on kubernetes.
Author
Owner

@artues commented on GitHub (Apr 26, 2021):

I'm using yaml files, no helm.

I'm unable to get logs after following instructions on the link provided, probably doing something wrong but cant get to know what. This is the app.ini inside the container.

cat /data/gitea/conf/app.ini

APP_NAME = Repo DRED
RUN_MODE = prod
RUN_USER = git

[repository]
ROOT                        = /data/git/repositories
FORCE_PRIVATE               = true
DEFAULT_PRIVATE             = private
DEFAULT_PUSH_CREATE_PRIVATE = true

[repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo

[repository.upload]
TEMP_PATH = /data/gitea/uploads

[server]
APP_DATA_PATH    = /data/gitea
DOMAIN           = ########
SSH_DOMAIN       = #######
HTTP_PORT        = 3000
ROOT_URL         = ########
DISABLE_SSH      = false
SSH_PORT         = 22
SSH_LISTEN_PORT  = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/git/lfs
LFS_JWT_SECRET   = 0-C-zaxh4ZLZdO6zPW5Hq98462rn-VAY1l4D58K5XTk
OFFLINE_MODE     = false
LANDING_PAGE     = login

[database]
PATH     = /data/gitea/gitea.db
DB_TYPE  = sqlite3
HOST     = localhost:3306
NAME     = gitea
USER     = ######
PASSWD   = ######
LOG_SQL  = false
SCHEMA   =
SSL_MODE = disable
CHARSET  = utf8

[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve

[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER        = file

[picture]
AVATAR_UPLOAD_PATH            = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
DISABLE_GRAVATAR              = false
ENABLE_FEDERATED_AVATAR       = true

[attachment]
PATH = /data/gitea/attachments

[log]
MODE                 = console
LEVEL                = debug
#REDIRECT_MACARON_LOG = true
#MACARON              = console
ROUTER               = console
ROOT_PATH            = /data/gitea/log

[security]
INSTALL_LOCK   = true
SECRET_KEY     = CcfMwG6mWjfwDc0zhTLfVfsksXhjoQcRfAOwC6kuYxguQTJiKWxhclhLtydXU5rK
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2MTE3NjUwMjJ9.4q8RUIo2VaGUWUIfSce4EipZ37Wwui7F-G49TrQ91oQ

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

[oauth2]
JWT_SECRET = P8casUG8RZSCmQoOktVHRopzvr2KbpoGudPoNmrJEXY

[mailer]
ENABLED = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

I also tried with [log] MODE = file

After setting this up I run gitea manager logging release-and-reopen but not logs found on /data/gitea/log

@artues commented on GitHub (Apr 26, 2021): I'm using yaml files, no helm. I'm unable to get logs after following instructions on the link provided, probably doing something wrong but cant get to know what. This is the app.ini inside the container. ``` cat /data/gitea/conf/app.ini APP_NAME = Repo DRED RUN_MODE = prod RUN_USER = git [repository] ROOT = /data/git/repositories FORCE_PRIVATE = true DEFAULT_PRIVATE = private DEFAULT_PUSH_CREATE_PRIVATE = true [repository.local] LOCAL_COPY_PATH = /data/gitea/tmp/local-repo [repository.upload] TEMP_PATH = /data/gitea/uploads [server] APP_DATA_PATH = /data/gitea DOMAIN = ######## SSH_DOMAIN = ####### HTTP_PORT = 3000 ROOT_URL = ######## DISABLE_SSH = false SSH_PORT = 22 SSH_LISTEN_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = /data/git/lfs LFS_JWT_SECRET = 0-C-zaxh4ZLZdO6zPW5Hq98462rn-VAY1l4D58K5XTk OFFLINE_MODE = false LANDING_PAGE = login [database] PATH = /data/gitea/gitea.db DB_TYPE = sqlite3 HOST = localhost:3306 NAME = gitea USER = ###### PASSWD = ###### LOG_SQL = false SCHEMA = SSL_MODE = disable CHARSET = utf8 [indexer] ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve [session] PROVIDER_CONFIG = /data/gitea/sessions PROVIDER = file [picture] AVATAR_UPLOAD_PATH = /data/gitea/avatars REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = true [attachment] PATH = /data/gitea/attachments [log] MODE = console LEVEL = debug #REDIRECT_MACARON_LOG = true #MACARON = console ROUTER = console ROOT_PATH = /data/gitea/log [security] INSTALL_LOCK = true SECRET_KEY = CcfMwG6mWjfwDc0zhTLfVfsksXhjoQcRfAOwC6kuYxguQTJiKWxhclhLtydXU5rK INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2MTE3NjUwMjJ9.4q8RUIo2VaGUWUIfSce4EipZ37Wwui7F-G49TrQ91oQ [service] DISABLE_REGISTRATION = true REQUIRE_SIGNIN_VIEW = false REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false ALLOW_ONLY_EXTERNAL_REGISTRATION = false ENABLE_CAPTCHA = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = false DEFAULT_ENABLE_TIMETRACKING = false NO_REPLY_ADDRESS = [oauth2] JWT_SECRET = P8casUG8RZSCmQoOktVHRopzvr2KbpoGudPoNmrJEXY [mailer] ENABLED = false [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false ``` I also tried with [log] MODE = file After setting this up I run gitea manager logging release-and-reopen but not logs found on /data/gitea/log
Author
Owner

@zeripath commented on GitHub (Jun 23, 2021):

I'm afraid without logs there's nothing we can do.

You need to give us some logs.

Setting the log mode to console will cause gitea to emit logs on stdout - those must go somewhere.

Setting the mode to file will cause gitea to write to either the specified file or gitea.log in the log_root. Gitea will not be able to start if it cannot write to those files. If you're not seeing them then you are not checking in the right place or they're being written to some temporary place that isn't persisted by your setup.

Gitea manager logging allows you to dynamically adjust logging.

I'm really not certain what else we can do. It's your system and configuration. You have to work out where your configuration is sending stdout to.


The only other thing I could suggest is setting your RUN_MODE=dev because at least then we'd get something with the 500 page.

@zeripath commented on GitHub (Jun 23, 2021): I'm afraid without logs there's nothing we can do. You need to give us some logs. Setting the log mode to console will cause gitea to emit logs on stdout - those must go somewhere. Setting the mode to file will cause gitea to write to either the specified file or gitea.log in the log_root. Gitea will not be able to start if it cannot write to those files. If you're not seeing them then you are not checking in the right place or they're being written to some temporary place that isn't persisted by your setup. Gitea manager logging allows you to dynamically adjust logging. I'm really not certain what else we can do. It's your system and configuration. You have to work out where your configuration is sending stdout to. --- The only other thing I could suggest is setting your `RUN_MODE=dev` because at least then we'd get something with the 500 page.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7238