go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.24k stars 5.42k forks source link

Gitea 1.14.0 not running as Windows service #15454

Closed PaulBol closed 3 years ago

PaulBol commented 3 years ago

Description

I'm running Gitea as a Windows service. Service GiteaSvc is launching C:\Gitea\gitea.exe web --config C:\Gitea\conf\app.ini. This was working fine until updating from version 1.13.4 to 1.14.0. Now attempting to run net start giteasvc results in

The service is not responding to the control function.

More help is available by typing NET HELPMSG 2186.

The Windows event logs show errors 7009 and 7000:

A timeout was reached (30000 milliseconds) while waiting for the GiteaSvc service to connect.

The GiteaSvc service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

I captured debug logs but didn't notice anything that looks like an error. Running C:\Gitea\gitea.exe web --config C:\Gitea\conf\app.ini from a command line window still works fine.

Can anyone please help me to restore my Gitea installation? Happy to try out things or supply additional information.

zeripath commented 3 years ago

OK looks we need to add a trace level logger in. Can you adjust your logging to add a Trace level logger in as per https://docs.gitea.io/en-us/logging-configuration/#debugging-problems

i.e.

[log]
...
MODE=console, traceconsole
...

[log.traceconsole]
MODE = console
LEVEL = trace
EXPRESSION = modules/graceful

In particular I am looking for this to be logged:

https://github.com/go-gitea/gitea/blob/55e159ca5f7081be8a1ac7a7e0cb28b474cffe3e/modules/graceful/manager_windows.go#L83

I suspect that for whatever reason Gitea is not detecting that it is running as a windows service.

sdweiyu commented 3 years ago

I had the same problem.

Gitea version (or commit ref): 1.14.0 Operating system: Windows Server 2019 v1809 Database: SQLite

Although the service starts with an error, the gitea process has been started and can also serve normally.

zeripath commented 3 years ago

@sdweiyu whilst I appreciate you want to say that this is a problem, I need the logs I have asked for. I cannot fix this without them.

It would also be helpful to know how you registered gitea with the SVC and whether there are any logs available there.

PaulBol commented 3 years ago

Although the service starts with an error, the gitea process has been started and can also serve normally.

This part is different for my installation. When net start returns the Gitea.exe process has terminated.

Anyway, I'll capture the trace level log and share it here like @zeripath suggested.

PaulBol commented 3 years ago

@zeripath - The log recorded with LEVEL = trace and EXPRESSION = modules/graceful does not show the line you pointed out:

2021/04/14 08:38:20 ...s/graceful/server.go:55:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 6248
2021/04/14 08:38:20 ...s/graceful/server.go:66:func1() [D] Starting server on tcp:0.0.0.0:3000 (PID: 6248)
2021/04/14 08:38:20 ...l/manager_windows.go:106:Execute() [T] Sending Running state to SVC
2021/04/14 08:38:20 ...l/manager_windows.go:114:Execute() [T] Started

I got one more without the EXPRESSION filter. Do you see a problem here?

Log ```text 2021/04/14 08:42:05 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: Tracefile(File:trace) 2021/04/14 08:42:05 ...dules/setting/log.go:250:generateNamedLogger() [I] Router Log: Console(console:debug) 2021/04/14 08:42:05 ...les/setting/cache.go:73:newCacheService() [I] Cache Service Enabled 2021/04/14 08:42:05 ...les/setting/cache.go:88:newCacheService() [I] Last Commit Cache Service Enabled 2021/04/14 08:42:05 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled 2021/04/14 08:42:05 ...es/setting/mailer.go:109:newMailService() [I] Mail Service Enabled 2021/04/14 08:42:05 ...es/setting/mailer.go:120:newRegisterMailService() [I] Register Mail Service Enabled 2021/04/14 08:42:05 ...es/setting/mailer.go:131:newNotifyMailService() [I] Notify Mail Service Enabled 2021/04/14 08:42:05 ...s/storage/storage.go:158:initAttachments() [I] Initialising Attachment storage with type: 2021/04/14 08:42:05 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\Gitea\data\attachments 2021/04/14 08:42:05 ...s/storage/storage.go:152:initAvatars() [I] Initialising Avatar storage with type: 2021/04/14 08:42:05 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\Gitea\data\avatars 2021/04/14 08:42:05 ...s/storage/storage.go:170:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 2021/04/14 08:42:05 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\Gitea\data\repo-avatars 2021/04/14 08:42:05 ...s/storage/storage.go:164:initLFS() [I] Initialising LFS storage with type: 2021/04/14 08:42:05 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:/Gitea/data/lfs 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update-channel (QID: 1) 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update-level (QID: 2) 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update (QID: 3) 2021/04/14 08:42:05 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: push_update Starting 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail-channel (QID: 4) 2021/04/14 08:42:05 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: push_update Waiting til closed 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:96:Run() [D] level: push_update-level Starting 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 1 (for push_update-channel) adding 1 workers with group id: 1 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:104:Run() [T] level: push_update-level Waiting til closed 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 2 (for push_update-level) adding 1 workers with group id: 1 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail-level (QID: 5) 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail (QID: 6) 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service-channel (QID: 7) 2021/04/14 08:42:05 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: mail Starting 2021/04/14 08:42:05 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: mail Waiting til closed 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 4 (for mail-channel) adding 1 workers with group id: 1 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:96:Run() [D] level: mail-level Starting 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:104:Run() [T] level: mail-level Waiting til closed 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 5 (for mail-level) adding 1 workers with group id: 1 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service-level (QID: 8) 2021/04/14 08:42:05 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service (QID: 9) 2021/04/14 08:42:05 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: notification-service Starting 2021/04/14 08:42:05 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: notification-service Waiting til closed 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 7 (for notification-service-channel) adding 1 workers with group id: 1 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:96:Run() [D] level: notification-service-level Starting 2021/04/14 08:42:05 ...ue/queue_bytefifo.go:104:Run() [T] level: notification-service-level Waiting til closed 2021/04/14 08:42:05 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 8 (for notification-service-level) adding 1 workers with group id: 1 2021/04/14 08:42:05 routers/init.go:150:GlobalInit() [I] SQLite3 Supported 2021/04/14 08:42:05 routers/init.go:68:initDBEngine() [I] Beginning ORM engine initialization. 2021/04/14 08:42:05 routers/init.go:75:initDBEngine() [I] ORM engine initialization attempt #1/10... 2021/04/14 08:42:05 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE mssql 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column keep_email_private db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column last_repo_visibility db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column is_active db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column is_admin db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column allow_git_hook db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column allow_import_local db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column allow_create_organization db default is 0, struct default is 1 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column use_custom_avatar db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user column theme db type is NVARCHAR(30), struct type is NVARCHAR(255) 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column keep_activity_private db default is , struct default is 0 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table user Column keep_activity_private db nullable is true, struct nullable is false 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository column description db type is NVARCHAR(255), struct type is NVARCHAR(MAX) 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository column website db type is NVARCHAR(255), struct type is NVARCHAR(2048) 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository Column original_service_type db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository column original_url db type is NVARCHAR(255), struct type is NVARCHAR(2048) 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository Column is_private db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository Column is_mirror db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table repository Column is_fsck_enabled db default is 0, struct default is 1 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table upload column uuid db type is NVARCHAR(40), struct type is VARCHAR(40) 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table issue Column is_closed db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table issue Column is_pull db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table pull_request Column has_merged db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table comment Column removed_assignee db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table comment Column invalidated db default is 0, struct default is 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table comment has column old_assignee_id but struct has not related field 2021/04/14 08:42:05 ...rfave/cli/command.go:173:Run() [W] Table attachment column uuid db type is NVARCHAR(40), struct type is VARCHAR(40) 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table milestone Column is_closed db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table mirror Column enable_prune db default is 0, struct default is 1 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_system_webhook db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_system_webhook db nullable is false, struct nullable is true 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table webhook Column http_method db default is 'POST', struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_ssl db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_active db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table hook_task Column is_ssl db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table hook_task Column is_delivered db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table hook_task Column is_succeed db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table org_user Column is_public db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table email_address Column is_activated db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table issue_user Column is_read db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table issue_user Column is_mentioned db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table gpg_key Column can_sign db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table gpg_key Column can_encrypt_comms db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table gpg_key Column can_encrypt_storage db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table gpg_key Column can_certify db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table external_login_user column access_token db type is NVARCHAR(255), struct type is NVARCHAR(MAX) 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table external_login_user column access_token_secret db type is NVARCHAR(255), struct type is NVARCHAR(MAX) 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table external_login_user column refresh_token db type is NVARCHAR(255), struct type is NVARCHAR(MAX) 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table protected_branch Column enable_whitelist db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table issue_watch Column is_watching db default is 0, struct default is 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table tracked_time Column time db nullable is true, struct nullable is false 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table review column type db type is NVARCHAR(255), struct type is INT 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table language_stat Column language db nullable is true, struct nullable is false 2021/04/14 08:42:06 ...rfave/cli/command.go:173:Run() [W] Table session has column created_unix but struct has not related field 2021/04/14 08:42:06 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful! 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: update_mirrors 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: repo_health_check 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: check_repo_stats 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: archive_cleanup 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: sync_external_users 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: deleted_branches_cleanup 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: update_migration_poster_id 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: cleanup_hook_task_table 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_inactive_accounts 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_repo_archives 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: git_gc_repos 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_sshkeys 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_sshprincipals 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_hooks 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: reinit_missing_repos 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_missing_repos 2021/04/14 08:42:06 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_generated_repository_avatars 2021/04/14 08:42:06 models/branches.go:610:RemoveOldDeletedBranches() [T] Doing: DeletedBranchesCleanup 2021/04/14 08:42:06 models/repo.go:1823:CheckRepoStats() [T] Doing: CheckRepoStats 2021/04/14 08:42:06 models/repo.go:1731:DeleteOldRepositoryArchives() [T] Doing: ArchiveCleanup 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: issue_indexer (QID: 10) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update-channel (QID: 11) 2021/04/14 08:42:06 ...er/issues/indexer.go:142:func2() [I] PID 5872: Initializing Issue Indexer: bleve 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update-level (QID: 12) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update (QID: 13) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker-channel (QID: 14) 2021/04/14 08:42:06 ...ueue_disk_channel.go:162:Run() [D] PersistableChannelUniqueQueue: repo_stats_update Starting 2021/04/14 08:42:06 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories 2021/04/14 08:42:06 ...ueue_disk_channel.go:192:Run() [T] PersistableChannelUniqueQueue: repo_stats_update Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 11 (for repo_stats_update-channel) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:96:Run() [D] unique-level: repo_stats_update-level Starting 2021/04/14 08:42:06 ...er/issues/indexer.go:171:func2() [D] Created Bleve Indexer 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:104:Run() [T] unique-level: repo_stats_update-level Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 12 (for repo_stats_update-level) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...er/issues/indexer.go:221:func3() [I] Issue Indexer Initialization took 45.0762ms 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:96:Run() [D] level: issue_indexer Starting 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:104:Run() [T] level: issue_indexer Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 10 (for issue_indexer) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker-level (QID: 15) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker (QID: 16) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task-channel (QID: 17) 2021/04/14 08:42:06 ...ueue_disk_channel.go:162:Run() [D] PersistableChannelUniqueQueue: pr_patch_checker Starting 2021/04/14 08:42:06 ...ueue_disk_channel.go:192:Run() [T] PersistableChannelUniqueQueue: pr_patch_checker Waiting til closed 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:96:Run() [D] unique-level: pr_patch_checker-level Starting 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 14 (for pr_patch_checker-channel) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:104:Run() [T] unique-level: pr_patch_checker-level Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 15 (for pr_patch_checker-level) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories 2021/04/14 08:42:06 models/repo.go:1740:DeleteOldRepositoryArchives() [T] Finished: ArchiveCleanup 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task-level (QID: 18) 2021/04/14 08:42:06 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task (QID: 19) 2021/04/14 08:42:06 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: task Starting 2021/04/14 08:42:06 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: task Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 17 (for task-channel) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:96:Run() [D] level: task-level Starting 2021/04/14 08:42:06 ...ue/queue_bytefifo.go:104:Run() [T] level: task-level Waiting til closed 2021/04/14 08:42:06 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 18 (for task-level) adding 1 workers with group id: 1 2021/04/14 08:42:06 ...i/websspi_windows.go:87:New() [I] Credential handle expiry: 2185-07-21 00:34:33.712009116 +0100 CET 2021/04/14 08:42:08 cmd/web.go:189:listen() [I] Listen: https://0.0.0.0:3000 2021/04/14 08:42:08 cmd/web.go:192:listen() [I] LFS server enabled 2021/04/14 08:42:08 ...s/graceful/server.go:55:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 5872 2021/04/14 08:42:08 ...s/graceful/server.go:66:func1() [D] Starting server on tcp:0.0.0.0:3000 (PID: 5872) 2021/04/14 08:42:08 ...l/manager_windows.go:106:Execute() [T] Sending Running state to SVC 2021/04/14 08:42:08 ...l/manager_windows.go:114:Execute() [T] Started 2021/04/14 08:42:09 ...s/context/context.go:675:1() [D] Session ID: a596f2f8eb226778 2021/04/14 08:42:09 ...s/context/context.go:676:1() [D] CSRF Token: d-TNAA2aXAmfZPlOlvDpBWAxveU6MTYxODM4MDM1MjY3OTQ3ODgwMA 2021/04/14 08:42:11 ...s/context/context.go:675:1() [D] Session ID: 7a00f25cbb12b58e 2021/04/14 08:42:11 ...s/context/context.go:676:1() [D] CSRF Token: lGTh2tvkxe0xmRKRcmuPhMXPi9U6MTYxODM4MTA1Mjk0Nzk2OTQwMA 2021/04/14 08:42:11 ...s/context/context.go:675:1() [D] Session ID: 14ce78768316e6b9 2021/04/14 08:42:11 ...s/context/context.go:676:1() [D] CSRF Token: Y6YSPgU6r6v_8LeCV8cibD6HTKM6MTYxODM3OTA0NTY3MDg0NTcwMA ```
zeripath commented 3 years ago

Ok well it looks that as far gitea is concerned it's connected to the SVC host...

Not logging that particular line is a good thing btw

sdweiyu commented 3 years ago

@zeripath I got the log.

using:

[log]
MODE      = file
LEVEL     = trace
EXPRESSION = modules/graceful
ROOT_PATH = C:/gitea/log2
gitea.log ```log 2021/04/14 14:10:16 ...dules/setting/log.go:333:newLogService() [I] Gitea Log Mode: File(File:trace) 2021/04/14 14:10:16 ...dules/setting/log.go:250:generateNamedLogger() [I] Router Log: Console(console:trace) 2021/04/14 14:10:16 ...les/setting/cache.go:73:newCacheService() [I] Cache Service Enabled 2021/04/14 14:10:16 ...les/setting/cache.go:88:newCacheService() [I] Last Commit Cache Service Enabled 2021/04/14 14:10:16 ...s/setting/session.go:77:newSessionService() [I] Session Service Enabled 2021/04/14 14:10:16 ...es/setting/mailer.go:109:newMailService() [I] Mail Service Enabled 2021/04/14 14:10:16 ...s/storage/storage.go:158:initAttachments() [I] Initialising Attachment storage with type: 2021/04/14 14:10:16 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\gitea\data\attachments 2021/04/14 14:10:16 ...s/storage/storage.go:152:initAvatars() [I] Initialising Avatar storage with type: 2021/04/14 14:10:16 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\gitea\data\avatars 2021/04/14 14:10:16 ...s/storage/storage.go:170:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 2021/04/14 14:10:16 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:\gitea\data\repo-avatars 2021/04/14 14:10:16 ...s/storage/storage.go:164:initLFS() [I] Initialising LFS storage with type: 2021/04/14 14:10:16 ...les/storage/local.go:47:NewLocalStorage() [I] Creating new Local Storage at C:/gitea/data/lfs 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update-channel (QID: 1) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update-level (QID: 2) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: push_update (QID: 3) 2021/04/14 14:10:16 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: push_update Starting 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail-channel (QID: 4) 2021/04/14 14:10:16 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: push_update Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 1 (for push_update-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] level: push_update-level Starting 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] level: push_update-level Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 2 (for push_update-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail-level (QID: 5) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: mail (QID: 6) 2021/04/14 14:10:16 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: mail Starting 2021/04/14 14:10:16 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: mail Waiting til closed 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] level: mail-level Starting 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] level: mail-level Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 4 (for mail-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 5 (for mail-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service-channel (QID: 7) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service-level (QID: 8) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: notification-service (QID: 9) 2021/04/14 14:10:16 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: notification-service Starting 2021/04/14 14:10:16 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: notification-service Waiting til closed 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] level: notification-service-level Starting 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 7 (for notification-service-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] level: notification-service-level Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 8 (for notification-service-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 routers/init.go:150:GlobalInit() [I] SQLite3 Supported 2021/04/14 14:10:16 routers/init.go:68:initDBEngine() [I] Beginning ORM engine initialization. 2021/04/14 14:10:16 routers/init.go:75:initDBEngine() [I] ORM engine initialization attempt #1/10... 2021/04/14 14:10:16 ...om/urfave/cli/app.go:524:HandleAction() [I] PING DATABASE sqlite3 2021/04/14 14:10:16 ...ations/migrations.go:357:Migrate() [I] [SQL] SELECT name FROM sqlite_master WHERE type='table' and name = ? [version] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT * FROM version LIMIT 0 [] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT * FROM version LIMIT 0 [] 2021/04/14 14:10:16 ...rm.io/xorm/engine.go:1130:Get() [I] [SQL] SELECT `id`, `version` FROM `version` WHERE `id`=? LIMIT 1 [1] 2021/04/14 14:10:16 routers/init.go:154:GlobalInit() [I] [SQL] SELECT name FROM sqlite_master WHERE type='table' [] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [user] 2021/04/14 14:10:16 ...rfave/cli/command.go:173:Run() [W] Table user Column keep_activity_private db default is , struct default is 0 2021/04/14 14:10:16 ...rfave/cli/command.go:173:Run() [W] Table user Column keep_activity_private db nullable is true, struct nullable is false 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [public_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [public_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [access_token] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [access_token] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repository] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repository] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [deploy_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [deploy_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [collaboration] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [collaboration] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [access] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [access] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [upload] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [upload] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [watch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [watch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [star] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [star] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [follow] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [follow] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [action] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [action] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [pull_request] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [pull_request] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [comment] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [comment] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [attachment] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [attachment] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [label] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [label] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue_label] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue_label] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [milestone] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [milestone] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [mirror] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [mirror] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [release] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [release] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [login_source] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [login_source] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [webhook] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [webhook] 2021/04/14 14:10:16 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_system_webhook db default is 0, struct default is 2021/04/14 14:10:16 ...rfave/cli/command.go:173:Run() [W] Table webhook Column is_system_webhook db nullable is false, struct nullable is true 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [hook_task] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [hook_task] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [team] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [team] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [org_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [org_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [team_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [team_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [team_repo] - 10.0232ms 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [team_repo] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [notice] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [notice] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [email_address] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [email_address] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [notification] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [notification] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [lfs_meta_object] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [lfs_meta_object] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [two_factor] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [two_factor] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [gpg_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [gpg_key] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [gpg_key_import] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [gpg_key_import] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repo_unit] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repo_unit] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repo_redirect] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repo_redirect] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [external_login_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [external_login_user] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [protected_branch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [protected_branch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [user_open_id] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [user_open_id] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue_watch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue_watch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [commit_status] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [commit_status] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [stopwatch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [stopwatch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [tracked_time] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [tracked_time] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [deleted_branch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [deleted_branch] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repo_indexer_status] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repo_indexer_status] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue_dependency] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue_dependency] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [lfs_lock] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [lfs_lock] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [reaction] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [reaction] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [issue_assignees] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [issue_assignees] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [u2f_registration] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [u2f_registration] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [team_unit] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [team_unit] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [review] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [review] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [oauth2_application] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [oauth2_application] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [oauth2_authorization_code] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [oauth2_authorization_code] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [oauth2_grant] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [oauth2_grant] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [task] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [task] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [language_stat] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [language_stat] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [email_hash] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [email_hash] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [user_redirect] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [user_redirect] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [project] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [project] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [project_board] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [project_board] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [project_issue] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [project_issue] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [session] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [session] 2021/04/14 14:10:16 ...rfave/cli/command.go:173:Run() [W] Table session has column created_unix but struct has not related field 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repo_transfer] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repo_transfer] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [topic] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [topic] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [repo_topic] 2021/04/14 14:10:16 routers/init.go:76:initDBEngine() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [repo_topic] 2021/04/14 14:10:16 routers/init.go:155:GlobalInit() [I] ORM engine initialization successful! 2021/04/14 14:10:16 ...uth/oauth2/oauth2.go:49:Init() [I] [SQL] SELECT name FROM sqlite_master WHERE type='table' [] 2021/04/14 14:10:16 ...rmstore/xormstore.go:110:NewOptions() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [oauth2_session] 2021/04/14 14:10:16 ...rmstore/xormstore.go:110:NewOptions() [I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [oauth2_session] 2021/04/14 14:10:16 models/oauth2.go:89:GetActiveOAuth2ProviderLoginSources() [I] [SQL] SELECT `id`, `type`, `name`, `is_actived`, `is_sync_enabled`, `cfg`, `created_unix`, `updated_unix` FROM `login_source` WHERE (is_actived = ? and type = ?) [true 6] 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: update_mirrors 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: repo_health_check 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: check_repo_stats 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: archive_cleanup 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: sync_external_users 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: deleted_branches_cleanup 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: update_migration_poster_id 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: cleanup_hook_task_table 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_inactive_accounts 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_repo_archives 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: git_gc_repos 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_sshkeys 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_sshprincipals 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: resync_all_hooks 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: reinit_missing_repos 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_missing_repos 2021/04/14 14:10:16 ...odules/cron/tasks.go:120:RegisterTask() [D] Registering task: delete_generated_repository_avatars 2021/04/14 14:10:16 models/branches.go:610:RemoveOldDeletedBranches() [T] Doing: DeletedBranchesCleanup 2021/04/14 14:10:16 models/repo.go:1731:DeleteOldRepositoryArchives() [T] Doing: ArchiveCleanup 2021/04/14 14:10:16 models/repo.go:1823:CheckRepoStats() [T] Doing: CheckRepoStats 2021/04/14 14:10:16 ...odules/cron/tasks.go:88:func2() [I] [SQL] DELETE FROM `deleted_branch` WHERE (deleted_unix < ?) [1618294216] 2021/04/14 14:10:16 models/repo.go:1733:DeleteOldRepositoryArchives() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `num_projects`, `num_closed_projects`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `trust_model`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE (id > 0) [] 2021/04/14 14:10:16 models/admin.go:53:createNotice() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?,?,?) [2 Cron: Clean-up deleted branches has finished 1618380616] - 10.5124ms 2021/04/14 14:10:16 ...ternal_login_user.go:162:FindExternalUsersByProvider() [I] [SQL] SELECT `external_id`, `user_id`, `login_source_id`, `raw_data`, `provider`, `email`, `name`, `first_name`, `last_name`, `nick_name`, `description`, `avatar_url`, `location`, `access_token`, `access_token_secret`, `refresh_token`, `expires_at` FROM `external_login_user` WHERE provider=? ORDER BY login_source_id ASC, external_id ASC LIMIT 100 [github] - 10.5124ms 2021/04/14 14:10:16 ...ternal_login_user.go:162:FindExternalUsersByProvider() [I] [SQL] SELECT `external_id`, `user_id`, `login_source_id`, `raw_data`, `provider`, `email`, `name`, `first_name`, `last_name`, `nick_name`, `description`, `avatar_url`, `location`, `access_token`, `access_token_secret`, `refresh_token`, `expires_at` FROM `external_login_user` WHERE provider=? ORDER BY login_source_id ASC, external_id ASC LIMIT 100 [gitlab] 2021/04/14 14:10:16 ...ternal_login_user.go:162:FindExternalUsersByProvider() [I] [SQL] SELECT `external_id`, `user_id`, `login_source_id`, `raw_data`, `provider`, `email`, `name`, `first_name`, `last_name`, `nick_name`, `description`, `avatar_url`, `location`, `access_token`, `access_token_secret`, `refresh_token`, `expires_at` FROM `external_login_user` WHERE provider=? ORDER BY login_source_id ASC, external_id ASC LIMIT 100 [gitea] 2021/04/14 14:10:16 ...ternal_login_user.go:162:FindExternalUsersByProvider() [I] [SQL] SELECT `external_id`, `user_id`, `login_source_id`, `raw_data`, `provider`, `email`, `name`, `first_name`, `last_name`, `nick_name`, `description`, `avatar_url`, `location`, `access_token`, `access_token_secret`, `refresh_token`, `expires_at` FROM `external_login_user` WHERE provider=? ORDER BY login_source_id ASC, external_id ASC LIMIT 100 [gogs] 2021/04/14 14:10:16 models/admin.go:53:createNotice() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?,?,?) [2 Cron: Update migration poster IDs has finished 1618380616] - 10.1328ms 2021/04/14 14:10:16 models/repo.go:1800:repoStatsCheck() [I] [SQL] SELECT repo.id FROM `repository` repo WHERE repo.num_watches!=(SELECT COUNT(*) FROM `watch` WHERE repo_id=repo.id AND mode<>2) [] - 20.6452ms 2021/04/14 14:10:16 models/repo.go:1800:repoStatsCheck() [I] [SQL] SELECT repo.id FROM `repository` repo WHERE repo.num_stars!=(SELECT COUNT(*) FROM `star` WHERE repo_id=repo.id) [] 2021/04/14 14:10:16 models/repo.go:1800:repoStatsCheck() [I] [SQL] SELECT label.id FROM `label` WHERE label.num_issues!=(SELECT COUNT(*) FROM `issue_label` WHERE label_id=label.id) [] 2021/04/14 14:10:16 models/repo.go:1800:repoStatsCheck() [I] [SQL] SELECT `user`.id FROM `user` WHERE `user`.num_repos!=(SELECT COUNT(*) FROM `repository` WHERE owner_id=`user`.id) [] 2021/04/14 14:10:16 models/repo.go:1800:repoStatsCheck() [I] [SQL] SELECT `issue`.id FROM `issue` WHERE `issue`.num_comments!=(SELECT COUNT(*) FROM `comment` WHERE issue_id=`issue`.id AND type=0) [] 2021/04/14 14:10:16 models/repo.go:1869:CheckRepoStats() [I] [SQL] SELECT repo.id FROM `repository` repo WHERE repo.num_closed_issues!=(SELECT COUNT(*) FROM `issue` WHERE repo_id=repo.id AND is_closed=? AND is_pull=?) [true false] 2021/04/14 14:10:16 models/repo.go:1892:CheckRepoStats() [I] [SQL] SELECT repo.id FROM `repository` repo WHERE repo.num_closed_pulls!=(SELECT COUNT(*) FROM `issue` WHERE repo_id=repo.id AND is_closed=? AND is_pull=?) [true true] 2021/04/14 14:10:16 models/repo.go:1915:CheckRepoStats() [I] [SQL] SELECT repo.id FROM `repository` repo WHERE repo.num_forks!=(SELECT COUNT(*) FROM `repository` WHERE fork_id=repo.id) [] - 231µs 2021/04/14 14:10:16 models/admin.go:53:createNotice() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?,?,?) [2 Cron: Check all repository statistics has finished 1618380616] - 4.3511ms 2021/04/14 14:10:16 models/repo.go:1740:DeleteOldRepositoryArchives() [T] Finished: ArchiveCleanup 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: issue_indexer (QID: 10) 2021/04/14 14:10:16 ...er/issues/indexer.go:142:func2() [I] PID 4452: Initializing Issue Indexer: bleve 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update-channel (QID: 11) 2021/04/14 14:10:16 models/admin.go:53:createNotice() [I] [SQL] INSERT INTO `notice` (`type`,`description`,`created_unix`) VALUES (?,?,?) [2 Cron: Delete old repository archives has finished 1618380616] - 5.6545ms 2021/04/14 14:10:16 ...er/issues/indexer.go:171:func2() [D] Created Bleve Indexer 2021/04/14 14:10:16 ...er/issues/indexer.go:221:func3() [I] Issue Indexer Initialization took 14.3597ms 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] level: issue_indexer Starting 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] level: issue_indexer Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 10 (for issue_indexer) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update-level (QID: 12) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: repo_stats_update (QID: 13) 2021/04/14 14:10:16 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories 2021/04/14 14:10:16 ...ueue_disk_channel.go:162:Run() [D] PersistableChannelUniqueQueue: repo_stats_update Starting 2021/04/14 14:10:16 ...ueue_disk_channel.go:192:Run() [T] PersistableChannelUniqueQueue: repo_stats_update Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 11 (for repo_stats_update-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] unique-level: repo_stats_update-level Starting 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker-channel (QID: 14) 2021/04/14 14:10:16 .../runtime/asm_amd64.s:1371:goexit() [I] [SQL] SELECT * FROM `repository` LIMIT 1 [] - 503.1µs 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] unique-level: repo_stats_update-level Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 12 (for repo_stats_update-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 models/webhook.go:753:FindUndeliveredHookTasks() [I] [SQL] SELECT `id`, `repo_id`, `hook_id`, `uuid`, `typ`, `url`, `signature`, `payload_content`, `http_method`, `content_type`, `event_type`, `is_ssl`, `is_delivered`, `delivered`, `is_succeed`, `request_content`, `response_content` FROM `hook_task` WHERE (is_delivered=?) [false] 2021/04/14 14:10:16 models/models.go:361:GetMaxID() [I] [SQL] SELECT MAX(id) FROM `repository` LIMIT 1 [] 2021/04/14 14:10:16 ...dels/repo_indexer.go:55:GetUnindexedRepos() [I] [SQL] SELECT `repository`.`id` FROM `repository` LEFT OUTER JOIN `repo_indexer_status` ON repository.id = repo_indexer_status.repo_id AND repo_indexer_status.indexer_type = ? WHERE repo_indexer_status.id IS NULL AND repository.is_empty=? AND repository.id<=? ORDER BY `repository`.`id` DESC LIMIT 50 [1 false 89] 2021/04/14 14:10:16 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker-level (QID: 15) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: pr_patch_checker (QID: 16) 2021/04/14 14:10:16 ...ueue_disk_channel.go:162:Run() [D] PersistableChannelUniqueQueue: pr_patch_checker Starting 2021/04/14 14:10:16 ...ueue_disk_channel.go:192:Run() [T] PersistableChannelUniqueQueue: pr_patch_checker Waiting til closed 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] unique-level: pr_patch_checker-level Starting 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] unique-level: pr_patch_checker-level Waiting til closed 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task-channel (QID: 17) 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 14 (for pr_patch_checker-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 15 (for pr_patch_checker-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 models/pull_list.go:77:GetPullRequestIDsByCheckStatus() [I] [SQL] SELECT `pull_request`.`id` FROM `pull_request` WHERE (status=?) [1] 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task-level (QID: 18) 2021/04/14 14:10:16 ...les/queue/manager.go:134:Add() [T] Queue Manager registered: task (QID: 19) 2021/04/14 14:10:16 ...ueue_disk_channel.go:137:Run() [D] PersistableChannelQueue: task Starting 2021/04/14 14:10:16 ...ueue_disk_channel.go:160:Run() [T] PersistableChannelQueue: task Waiting til closed 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:96:Run() [D] level: task-level Starting 2021/04/14 14:10:16 ...ue/queue_bytefifo.go:104:Run() [T] level: task-level Waiting til closed 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 17 (for task-channel) adding 1 workers with group id: 1 2021/04/14 14:10:16 .../queue/workerpool.go:213:commonRegisterWorkers() [T] WorkerPool: 18 (for task-level) adding 1 workers with group id: 1 2021/04/14 14:10:16 ...i/websspi_windows.go:87:New() [I] Credential handle expiry: 2185-07-21 07:34:33.712009116 +0800 CST 2021/04/14 14:10:16 cmd/web.go:189:listen() [I] Listen: http://0.0.0.0:80 2021/04/14 14:10:16 cmd/web.go:192:listen() [I] LFS server enabled 2021/04/14 14:10:16 ...s/graceful/server.go:55:NewServer() [I] Starting new Web server: tcp:0.0.0.0:80 on PID: 4452 2021/04/14 14:10:16 ...l/manager_windows.go:106:Execute() [T] Sending Running state to SVC 2021/04/14 14:10:16 ...s/graceful/server.go:66:func1() [D] Starting server on tcp:0.0.0.0:80 (PID: 4452) 2021/04/14 14:10:16 ...l/manager_windows.go:114:Execute() [T] Started ```

I use the command sc.exe create gitea ..... to create the service as the docs gitea is updated from 1.14.0-rc2 to 1.14.0, When starting the service from services.msc,there was an Error 1053: The service did not respond to the start or control request in a timely fashion. When staring the servie from cmd net start gitea, there was an error: The service is not responding to the control function.

zeripath commented 3 years ago

Both of your logs indicate that gitea is connected to the SVC host and has sent the started state. So I'm not sure what's going on here.

Do you have logs when the SVC host claims that gitea hasn't started up?

It would also be useful to explicitly see an interrogate event, so after that startup message is sent with this trace logger running - is it possible to send an interrogate event? sc interrogate gitea and see if the SVC sent interrogate trace log is emitted.

Maybe you need to set a STARTUP_TIMEOUT but the service is sending the startup status pretty rapidly.

zeripath commented 3 years ago

Perhaps we need to be querying the interrogate whilst we are starting up and there's an out of date interrogate on the stack that has the wrong state? The go SVC docs for interrogate are weird and suggest that we should just send back the state the interrogate sent - I suspect that this is incorrect and we should be sending back out current state but this code hasn't changed so I don't understand why it should suddenly cause a problem.

PaulBol commented 3 years ago

I seem to have found a solution, I had previously used a dedicated user account _giteauser to run the service. app.config included RUN_USER = gitea_user and the service had the log on account configured as .\gitea_user.

Looks like this configuration is not supported anymore. https://docs.gitea.io/en-us/windows-service/ now suggests to use COMPUTERNAME$. When I configured RUN_USER = COMPUTERNAME$ and let the service use Local System, Gitea is working normally.

PaulBol commented 3 years ago

@sdweiyu - I observed the same behavior that you reported when I had the service configured to run as Local System but still had set RUN_USER = gitea_user. What I mean is that net start would respond with The service is not responding to the control function. and the Gitea.exe process kept running.

PaulBol commented 3 years ago

@zeripath - Just read your posts, thanks for the input. Is it still worth trying sc interrogate gitea and playing around with STARTUP_TIMEOUT or should I just accept that the old user setup is not supported anymore and should be updated as described above?

zeripath commented 3 years ago

Ok so I don't understand why the run_user thing is needed - the person that changed that documentation didn't change the code so it's perhaps related to how they've suggested the service be started?

If however changing the run user works and that's what the docs suggest then ... I guess we can close.

zeripath commented 3 years ago

Feel free to check out the interrogate thing tho and try to work out why the old user thing isn't working

PaulBol commented 3 years ago

sc interrogate gitea consistently responded with [SC] ControlService FAILED 1062: The service has not been started. while net start gitea was running and afterwards.

Maybe interacting with the service manager has changed in a way that now requires additional privileges? I guess running the service with an admin account instead of a regular user account could tell. However, if this setup isn't recommended and not mentioned in the documentation I don't see much sense in trying to get it to work.

Feel free to close the issue unless @sdweiyu has additional insights or concerns. Thanks again for the quick and helpful response! 👏

sdweiyu commented 3 years ago

I configured RUN_USER = COMPUTERNAME$(name of my server),but the same error is still there.

Because there is no problem with v1.14.0-rc2, the error on v1.14.0 may be just an accident on my server :(

Maybe the next version will be ok.

thanks @PaulBol @zeripath

skgeo commented 3 years ago

We observed exactly the same behaviour on our test-system wehn trying to update to Gitea 1.14.0. Using the Local System account to run Gitea is no solution for us as it breaks functionality we need. The Local System account has no accesss to network ressources (network file shares in our company) and in our scenario is not allowed to connect to the internet. So in our case, switching to the Local System account breaks Github mirroring and repository migrations from network shares. We need to be able to run the Gitea service with a domain account. I will try to increase the service timeout this evening and see if this helps.

skgeo commented 3 years ago

I increased the windows service timeout to 180000 milliseconds. Unfortunately, that didn't help. I also tested with the newly realeased Gitea version 1.4.1. But the same error still occurs.

neolithos commented 3 years ago

Could it be a problem with the svc?

Because these lines should send the state? https://github.com/go-gitea/gitea/blob/9c4601bdf8369ed72944085e3952111cf4aeea11/modules/graceful/manager_windows.go#L106-L114

2021/04/16 10:07:33 ...l/manager_windows.go:106:Execute() [T] Sending Running state to SVC
2021/04/16 10:07:33 ...l/manager_windows.go:114:Execute() [T] Started
PaulBol commented 3 years ago

Is there an updateStatus missing? Because status is only a structure?

I am not familiar with the go syntax. But if the status update wouldn't execute why can the service run as Local System and only not as a regular user?

PaulBol commented 3 years ago

@skgeo - For me running as Local System is acceptable therefore I didn't dig deeper (after I got gpg configured correctly which was the hardest part...).

The next thing I would have tried is running the service with a local or domain admin account. If that works you could try if it still runs with a somewhat more restricted account, e.g. from the Backup Operators or Power Users group.

neolithos commented 3 years ago

Is there an updateStatus missing? Because status is only a structure?

I am not familiar with the go syntax. But if the status update wouldn't execute why can the service run as Local System and only not as a regular user?

I removed this line from my comment, because it seems to be go channel magic. I am not an go developer. The return value of SetServiceState should give a hint.

skgeo commented 3 years ago

I investigated further and tried the following:

zeripath commented 3 years ago

So the change hasn't really come from anything within Gitea - but within the upstream x/sys/windows/svc library

zeripath commented 3 years ago

I wonder if the issue is the | acceptHammerCode, and if Windows' SVC host now requires additional permissions for this.

You could try removing this to see if it fixes the problem?

zeripath commented 3 years ago

@skgeo are you able to build or do you need me to provide a build with this removed?

skgeo commented 3 years ago

@zeripath It would be great if you could provide me a build. I have never done this myself. But I am very willing to test.

zeripath commented 3 years ago

agh! sorry I missed your message: https://eldritchkitty.com/~andrew/gitea-1.14.x-4fa280423-no-hammer-windows-4.0-amd64.exe

szegheo commented 3 years ago

@zeripath I have the same issue. Gitea 1.14.1 cannot start as service (timeout error 1053) but runs fine when running from command line. My config was OK with my previous version 1.13.0.

I've just tried your modified version above (no-hammer) but got the same error. Sending you the tracelogs of that and also the original 1.14.1: gitea1.14.1-logs.zip

My config uses a dedicated user to run Gitea.

All is fine when running from command line like this: runas /user:git "cmd /k C:\RS7\gitea\gitea.exe web --config E:\RS7\gitea\custom\conf\app.ini"

My service command (created with sc based on the docs): "C:\RS7\gitea\gitea.exe" web --config "E:\RS7\gitea\custom\conf\app.ini"

I've increased the ServicesPipeTimeout and WaitToKillServiceTimeout Windows registry keys to 60sec, but didn't help. When I try to start the service manually, after a few seconds I can access Gitea on https as it should but the loading indicator of the service still shows that it's loading... After the 60sec timeout the process gets terminated. So I can confirm, that Gitea starts up, but Windows doesn't recognizes that it started successfully.

My system is: Windows 10 Pro 64bit version 20H2 build 19042.928

Thank you for your efforts!

szegheo commented 3 years ago

Until this gets fixed, I'm sharing my temporary workaround to make it work as a service again. Use it at your own risk, I can't guarantee that it has no drawbacks or any unexpected behavior...

The workaround is based on the open-source project called WinSW.

WinSW wraps and manages any application as a Windows service.

(BTW I'm also using WinSW for a long time running my local Nginx server - which serves Gitea - on Windows without any problem.)

So I followed their "Use WinSW as a bundled tool" instructions and made my gitea-winsw.exe - which is WinSW.NET461.exe renamed (requires .NET installed!) - and gitea-winsw.xml in my Gitea dir.

In my case, the xml file looks like this (modify it for your needs):

<configuration>
  <id>gitea-winsw</id>
  <name>gitea-winsw</name>
  <description>Gitea-WinSW</description>

  <executable>%BASE%\gitea.exe</executable>
  <arguments>web --config E:\RS7\gitea\custom\conf\app.ini</arguments>
  <workingdirectory>E:\RS7\gitea</workingdirectory>

  <logpath>E:\RS7\gitea\log</logpath>
  <logmode>roll</logmode>

  <depend></depend>
</configuration>

Although this service can be installed with the --user and --pass options, I omitted them and rather set the login info later by modifying the created service using services.msc and the Log On tab (as usual). So my install command was only:

.\gitea-winsw.exe install

This successfully created my new gitea-winsw service. Now I've just set my desired user to run this service and started it. Gitea is running fine again!

zeripath commented 3 years ago

So I think this has to be an issue with Windows permissions or with x/net/sys/windows. The underlying Gitea code has not changed.

Is it possible that you need to explicitly give the full path to gitea?

https://github.com/golang/go/issues/42596#issuecomment-730250900

And that API requires you to provide full path to your service executable (see lpBinaryPathName parameter). And, once installed, the service executable cannot be moved (until service is deleted), because Windows will try to run it when you request Windows to start your service.

Could one of you try the example code from x/sys/windows/svc to see if that works for you?

szegheo commented 3 years ago

@zeripath Sure, I would, but I have no experience with golang. I have go installed via Scoop on my Windows (go version go1.16.3 windows/amd64) I've just run go get -u golang.org/x/sys so I have it here: c:\Users\johndoe\go\pkg\mod\golang.org\x\sys@v0.0.0-20210503173754-0981d6026fa6\windows\svc\example\ but I have no clue how to continue (build/install/whatever). If it's not rocket science and you give me some info I would try the example service happily.

zeripath commented 3 years ago

@coderars from inside the c:\Users\johndoe\go\pkg\mod\golang.org\x\sys@v0.0.0-20210503173754-0981d6026fa6\windows\svc\example\ run go build should create an example.exe

I've pushed a crosscompile up at https://edlritchkitty.com/~andrew/example.exe

szegheo commented 3 years ago

@zeripath thank you, the command go build really did the job... 😄

However, after installing the example service - my service - the result is the same (error 1053) as soon as I change its Log On settings from Local System account to another local user account. The error message pops up right after starting the service.

I've tried it with my git user and another one but it doesn't matter. Also checked that those users have the Log on as service permission in Local Security Policy . So I'm almost certain that my Windows settings are OK.

Running it from command line .\example.exe start raises the same error message:

failed to start myservice: could not start service: The service did not respond to the start or control request in a timely fashion.

...and:

Is it possible that you need to explicitly give the full path to gitea?

I've tried that with both Gitea and this example with the same result.

When I set the user to myself (the user currently logged in with admin rights) it works because it's an admin account, but it was discussed above that with admin rights it works.

Tested on my Windows 10 Pro version 20H2 build 19042.964

zeripath commented 3 years ago

Ok so, I think that proves that this is not a gitea bug per se but an upstream issue.

Could you open an issue on https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the subject line, and mention your issues with the example.exe and reference this issue.

szegheo commented 3 years ago

@zeripath OK, done. Looking at the commits history of x/sys and after some test builds from earlier versions I assume that our issue is because of this commit on Oct 8, 2020. Building the svc example from a version (Oct 7, 2020) right before that commit does not raise this issue. Hope it helps...

zeripath commented 3 years ago

OK I'm gonna upload one using the IsAnInteractiveSession as a final attempt.

https://eldritchkitty.com/~andrew/gitea-1.14.x-f9b1fac4ea-isaninteractive-windows-4.0-amd64.exe

szegheo commented 3 years ago

@zeripath seems OK!! Start/Restart, all works as expected.

zeripath commented 3 years ago

OK so this is very likely a permissions issue to do with the IsAWindowsService so could you open an issue above and I'll put a PR up that just drops us to use the deprecated function. I'd make the upstream issue myself but I'm not a windows user and so can't really apply any of their fixes or try to fix things. (Just add an @zeripath to the message so I can keep a watch about what the actual fix is in the end.)

szegheo commented 3 years ago

@zeripath is it what you mean? Should I modify something?

zeripath commented 3 years ago

agh! sorry, I didn't see that you've already opened https://github.com/golang/go/issues/45966 in golang. I just meant to include your information there.

I'll close #15750 as it's just a duplicate of this one.

szegheo commented 3 years ago

That's why I was confused... 😃 No worries. Maybe you could add some technical thoughts there with the info you gathered. This all is now far above my knowledge (actually I've never written a line in go...)

One last: Maybe the issue 44921 @ golang/go is related to this and could be interesting to you (don't want to link it in case if not).

Thank you for all your efforts on this!

zeripath commented 3 years ago

It's possible that's related but the interesting thing is that at least for one person above it appears it was detecting a Windows service correctly. I'm not sure though - perhaps I missed the trace message saying that it wasn't running as a service.