Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean install from Docker gitea/gitea:latest ends with error 'open /data/gitea/LOG: is a directory' #13023

Closed
2 of 7 tasks
kondelik opened this issue Oct 3, 2020 · 4 comments · Fixed by #13025
Closed
2 of 7 tasks

Comments

@kondelik
Copy link

kondelik commented Oct 3, 2020

  • Gitea version (or commit ref): sorry but no idea, this one - image: gitea/gitea:latest
  • Git version:
  • Operating system: WSL2 Docker
  • 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:

Description

Brand new instalation from Docker with gitea/gitea:latest (sorry, guys, no idea what current version is, but this one ) ends with error

version: "3.8"

services:
    gitea:
        image: gitea/gitea:latest # with 1.12.5 everything work - image: gitea/gitea:1.12.5
        environment:
            USER_UID: 1000
            USER_GID: 1000
            DB_TYPE: mysql
            DB_HOST: gitea-db:3306
            DB_NAME: gitea
            DB_PASSWD: 123 # please note these are not my real passwords
            SECRET_KEY: 456 # please note these are not my real secrets
            REQUIRE_SIGNIN_VIEW: "true"
#        restart: always # commented to better see the log after failing
        volumes:
            - ./gitea/data:/data
        depends_on:
            - gitea-db
        ports:
            - "3000:3000"
            - "222:22"

    gitea-db:
        image: mariadb:latest
        environment:
            MYSQL_DATABASE: gitea
            MYSQL_ROOT_PASSWORD: 123 # please note these are not my real passwords
            MYSQL_PASSWORD: 123 # please note these are not my real passwords
        restart: always
        volumes:
            - ./gitea/maria-db:/var/lib/mysql

Log (i formated it a little, it was one-liner):

2020/10/03 10:29:02 ...eue/queue_wrapped.go:231:Run() 
[F] Unable to set the internal queue for issue_indexer-wrapper 
Error: Unable to create queue level for issue_indexer with cfg
{"Addresses":"","BatchLength":20,"BlockTimeout":1000000000,"BoostTimeout":300000000000,"BoostWorkers":5,"ConnectionString":"/data/gitea","DBIndex":0,"DataDir":"/data/gitea/indexers/issues.queue","MaxWorkers":10,"Name":"issue_indexer","Network":"","Password":"","QueueLength":20,"QueueName":"issue_indexer_queue","SetName":"","Workers":1} 
by max attempts: 
error: open /data/gitea/LOG: is a directory

(looks like you guys are trying to open log directory as a file? IDK 😃 )

When i pull older version (image: gitea/gitea:1.12.5) everything works. Still, cant update to :latest with the same error message.

@zeripath
Copy link
Contributor

zeripath commented Oct 3, 2020

Can we see your app.ini ?

zeripath added a commit to zeripath/gitea that referenced this issue Oct 3, 2020
Since the move to common leveldb and common redis the disk queue code
will check the connection string before defaulting to the DATADIR.

Therefore we should ensure that the connection string is kept empty
unless it is actually set.

Fix go-gitea#13023

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

zeripath commented Oct 3, 2020

I think I've worked it out. Sorry about this.

@kondelik
Copy link
Author

kondelik commented Oct 3, 2020

Oh, sorry for delay, idk if it help you now (looks like you managed without it 😄 ), but there it is:

(Just docker-compose up that .yml I posted before)

APP_NAME = Gitea: Git with a cup of tea
RUN_MODE = dev

[repository]
ROOT = /data/git/repositories

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

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

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

[database]
PATH    = /data/gitea/gitea.db
DB_TYPE = mysql
HOST    = gitea-db:3306
NAME    = gitea
USER    = root
PASSWD  = 123

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

[session]
PROVIDER_CONFIG = /data/gitea/sessions

[picture]
AVATAR_UPLOAD_PATH            = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars

[attachment]
PATH = /data/gitea/attachments

[log]
ROOT_PATH = /data/gitea/log

[security]
INSTALL_LOCK   = true
SECRET_KEY     = 456
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2MDE3NDYxMjJ9.M-DDo3tvsyce80q914k4HlRB5P8Uszd23BHNJheYlSs

[service]
DISABLE_REGISTRATION = false
REQUIRE_SIGNIN_VIEW  = true

[oauth2]
JWT_SECRET = stx0JlLb-1LZZBz1rHzoiga5_Vtma_Kwxzgw-dAZCEs

(please note that i simplified PASSWD and SECRET_KEY for this example, but the error is the same with proper password and secret)

@zeripath
Copy link
Contributor

zeripath commented Oct 4, 2020

Workaround for the moment is to set the CONN_STR for each of the queues individually - which is a bit crap - or have a common queue:

[queue]
CONN_STR=/data/gitea/queues

Hopefully we'll get the PR merged very soon though

zeripath added a commit that referenced this issue Oct 4, 2020
…3025)

Since the move to common leveldb and common redis the disk queue code
will check the connection string before defaulting to the DATADIR.

Therefore we should ensure that the connection string is kept empty
unless it is actually set.

Fix #13023

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants