502 Bad Gateway after setting config #2916

Closed
opened 2025-11-02 04:53:55 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @STaRDoGG on GitHub (Feb 14, 2019).

Using the latest Docker image, I can load Gitea as a fresh install, then I have to go into the config section to get it all setup, after doing so and clicking the Save button I get an immediate 502 Bad Gateway upon refresh.

My app.ini after changing the settings looks like this:

[server]
APP_DATA_PATH    = /data/gitea
SSH_DOMAIN       = my.domain.name
HTTP_PORT        = 3000
ROOT_URL         = /giteadoc/
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_CONTENT_PATH = /data/git/lfs
DOMAIN           = my.domain.name
LFS_START_SERVER = true
LFS_JWT_SECRET   = C9T0La0v6LOYFRedactedXdCVaPWN4U
OFFLINE_MODE     = false

The server section on a fresh install looks like this:

[server]
APP_DATA_PATH    = /data/gitea
SSH_DOMAIN       = localhost
HTTP_PORT        = 3000
ROOT_URL         = 
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_CONTENT_PATH = /data/git/lfs

When I stop and then start the container, it just repeatedly spams this:

image

Any idea what's wrong?

Originally created by @STaRDoGG on GitHub (Feb 14, 2019). Using the latest Docker image, I can load Gitea as a fresh install, then I have to go into the config section to get it all setup, after doing so and clicking the Save button I get an immediate 502 Bad Gateway upon refresh. My app.ini after changing the settings looks like this: ``` [server] APP_DATA_PATH = /data/gitea SSH_DOMAIN = my.domain.name HTTP_PORT = 3000 ROOT_URL = /giteadoc/ DISABLE_SSH = false SSH_PORT = 22 LFS_CONTENT_PATH = /data/git/lfs DOMAIN = my.domain.name LFS_START_SERVER = true LFS_JWT_SECRET = C9T0La0v6LOYFRedactedXdCVaPWN4U OFFLINE_MODE = false ``` The server section on a fresh install looks like this: ``` [server] APP_DATA_PATH = /data/gitea SSH_DOMAIN = localhost HTTP_PORT = 3000 ROOT_URL = DISABLE_SSH = false SSH_PORT = 22 LFS_CONTENT_PATH = /data/git/lfs ``` When I stop and then start the container, it just repeatedly spams this: ![image](https://user-images.githubusercontent.com/1524526/52822325-fd922b80-3076-11e9-9a43-fe81ad4ee0ee.png) Any idea what's wrong?
GiteaMirror added the issue/stale label 2025-11-02 04:53:55 -06:00
Author
Owner

@techknowlogick commented on GitHub (Feb 15, 2019):

Are you able to get more details from the /data/gitea/logs directory in your container?

@techknowlogick commented on GitHub (Feb 15, 2019): Are you able to get more details from the /data/gitea/logs directory in your container?
Author
Owner

@STaRDoGG commented on GitHub (Feb 15, 2019):

@techknowlogick It's repeating this over and over:

2019/02/15 12:23:52 [I] Log Mode: File(Info)
2019/02/15 12:23:52 [I] XORM Log Mode: File(Info)
2019/02/15 12:23:52 [I] Cache Service Enabled
2019/02/15 12:23:52 [I] Session Service Enabled
2019/02/15 12:23:52 [I] Beginning ORM engine initialization.
2019/02/15 12:23:52 [I] ORM engine initialization attempt #1/10...
2019/02/15 12:23:52 [I] ORM engine initialization successful!
2019/02/15 12:23:52 [I] Git Version: 2.18.1
2019/02/15 12:23:52 [...les/indexer/issue.go:64 InitIssueIndexer()] [E] InitIssuesIndexer: create index, invalid argument
@STaRDoGG commented on GitHub (Feb 15, 2019): @techknowlogick It's repeating this over and over: ``` 2019/02/15 12:23:52 [I] Log Mode: File(Info) 2019/02/15 12:23:52 [I] XORM Log Mode: File(Info) 2019/02/15 12:23:52 [I] Cache Service Enabled 2019/02/15 12:23:52 [I] Session Service Enabled 2019/02/15 12:23:52 [I] Beginning ORM engine initialization. 2019/02/15 12:23:52 [I] ORM engine initialization attempt #1/10... 2019/02/15 12:23:52 [I] ORM engine initialization successful! 2019/02/15 12:23:52 [I] Git Version: 2.18.1 2019/02/15 12:23:52 [...les/indexer/issue.go:64 InitIssueIndexer()] [E] InitIssuesIndexer: create index, invalid argument ```
Author
Owner

@techknowlogick commented on GitHub (Feb 15, 2019):

Ok, so it seems like whats happening is this line is error-ing out: https://github.com/go-gitea/gitea/blob/master/modules/indexer/issue.go#L64

So it seems it is failing to create the issue index. Sadly the error it is giving you is a bit vague.

Would you be able to provide the indexer values in your config?

@techknowlogick commented on GitHub (Feb 15, 2019): Ok, so it seems like whats happening is this line is error-ing out: https://github.com/go-gitea/gitea/blob/master/modules/indexer/issue.go#L64 So it seems it is failing to create the issue index. Sadly the error it is giving you is a bit vague. Would you be able to provide the `indexer` values in your config?
Author
Owner

@STaRDoGG commented on GitHub (Feb 16, 2019):

Happy to. Here's what's in the app.ini after I've run the setup and run into the problem. Comparing it with the original app.ini that is created on a fresh init, it sees to be the same:

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

And I've confirmed that the path/file does exist on the host.

I'm wondering if maybe there's some issue with the data folder being mounted to the host file system rather than a volume?

Here's the docker run I use to create the Gitea container if it helps at all:

docker run --name gitea --restart unless-stopped --publish 9023:3000 --env TZ=America/Chicago -d --mount src="/c/Users/My Cloud/AppData/Roaming/DockerConfigs/Gitea/Data",dst=/data,type=bind gitea/gitea:latest

@STaRDoGG commented on GitHub (Feb 16, 2019): Happy to. Here's what's in the app.ini after I've run the setup and run into the problem. Comparing it with the original app.ini that is created on a fresh init, it sees to be the same: ``` [indexer] ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve ``` And I've confirmed that the path/file does exist on the host. I'm wondering if maybe there's some issue with the data folder being mounted to the host file system rather than a volume? Here's the docker run I use to create the Gitea container if it helps at all: `docker run --name gitea --restart unless-stopped --publish 9023:3000 --env TZ=America/Chicago -d --mount src="/c/Users/My Cloud/AppData/Roaming/DockerConfigs/Gitea/Data",dst=/data,type=bind gitea/gitea:latest `
Author
Owner

@lunny commented on GitHub (Feb 21, 2019):

@STaRDoGG which version are u using? could you try to upgrade to the latest version to test it?

@lunny commented on GitHub (Feb 21, 2019): @STaRDoGG which version are u using? could you try to upgrade to the latest version to test it?
Author
Owner

@stale[bot] commented on GitHub (Apr 22, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 22, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (May 6, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 6, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2916