Skip to content

[Error 1053] Can't run gitea as a Windows Service #7201

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

Closed
2 of 7 tasks
benjaminforras opened this issue Jun 14, 2019 · 14 comments
Closed
2 of 7 tasks

[Error 1053] Can't run gitea as a Windows Service #7201

benjaminforras opened this issue Jun 14, 2019 · 14 comments

Comments

@benjaminforras
Copy link

benjaminforras commented Jun 14, 2019

  • Gitea version (or commit ref): 10effb3 (and 2f39fc7)
  • Git version: 1.8.2+3-g10effb396 (and 1.9.0+dev-347-g2f39fc7bb)
  • Operating system: Windows 10 Pro build 17134
  • 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

I can create the service however I can't start it. (It runs fine when I run the exe as an user application.)
Error 1053: The service did not respond to the start or control request in a timely fashion

Screenshots

No screenshots because I can't really switch language in the os.

@philippbeckmann
Copy link
Contributor

Is there something in the Windows event log?

@benjaminforras
Copy link
Author

Yeah, just that it timed out after 30000ms

@philippbeckmann
Copy link
Contributor

philippbeckmann commented Jun 14, 2019

What about the user? Does he have sufficient rights to read/write the folders and to open a network connection?

@benjaminforras
Copy link
Author

Probably.
When I started the exe it worked. (And I tried to launch the service with my account but that didn't work either)

@philippbeckmann
Copy link
Contributor

Can you post your app.ini (minus passwords and secrets)?

@benjaminforras
Copy link
Author

Of course

APP_NAME = Gitea: Git with a cup of tea
RUN_USER = NB-DELL-009$
RUN_MODE = prod

[oauth2]
JWT_SECRET = [snip]

[security]
INTERNAL_TOKEN = [snip]
RUN_USER       = NB-DELL-009$
INSTALL_LOCK   = true
SECRET_KEY     = [snip]

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   = 
SSL_MODE = disable
PATH     = C:/gitea/data/gitea.db

[repository]
ROOT = C:/gitea/gitea-repositories

[server]
SSH_DOMAIN       = localhost
DOMAIN           = localhost
HTTP_PORT        = 3000
ROOT_URL         = [snip]
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = C:/gitea/data/lfs
LFS_JWT_SECRET   = [snip]
OFFLINE_MODE     = false

[mailer]
ENABLED = false

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

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = C:/gitea/log

@stale
Copy link

stale bot commented Aug 13, 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 stale bot added the issue/stale label Aug 13, 2019
@stale
Copy link

stale bot commented Aug 27, 2019

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

@stale stale bot closed this as completed Aug 27, 2019
@MartinSGill
Copy link

Had this same issue.
The problem was that git was not in path at the system level.

@maximedezette
Copy link

maximedezette commented Nov 12, 2019

I had the same issue today, that's how I've fixed it:

To see the actual error, open a cmd in gitea folder and type the following command:

cmd /k gitea.exe (to avoid the window from closing)

gitea_error

In my case, I added git to the path.
Then I launched the .exe with the same command:

gitea_error2

I still had the 1053 error when I launched the service at that point:

error_service_git

So I went to the Gitea's logs (gitea/log/gitea.log) and had an error:

error_gitea3

Then I just created the role 'gitea' wich was missing and it solved the problem!

Hope this helps :)

@PlusoneWang
Copy link

This issue actually not resolve yet. Could we re-open it?

I had the same issue today, that's how I've fixed it:

To see the actual error, open a cmd in gitea folder and type the following command:

cmd /k gitea.exe (to avoid the window from closing)

gitea_error

In my case, I added git to the path.
Then I launched the .exe with the same command:

gitea_error2

I still had the 1053 error when I launched the service at that point:

error_service_git

So I went to the Gitea's logs (gitea/log/gitea.log) and had an error:

error_gitea3

Then I just created the role 'gitea' wich was missing and it solved the problem!

Hope this helps :)

Not work for me. There is no log file generated. The log folder is empty.

@PlusoneWang
Copy link

This issue is actually unresolved. Could we re-open it?
Appreciate for any help in advance.

@zeripath
Copy link
Contributor

zeripath commented Feb 9, 2020

@PlusoneWang please open another issue - with more information on your specific configuration i.e. complete version of gitea, your path and a suitably sanitized app.ini.

So far the above issues have been due to configuration and not due to a bug.

@dyangrun
Copy link

I had the same issue today, that's how I've fixed it:

To see the actual error, open a cmd in gitea folder and type the following command:

cmd /k gitea.exe (to avoid the window from closing)

gitea_error

In my case, I added git to the path.
Then I launched the .exe with the same command:

gitea_error2

I still had the 1053 error when I launched the service at that point:

error_service_git

So I went to the Gitea's logs (gitea/log/gitea.log) and had an error:

error_gitea3

Then I just created the role 'gitea' wich was missing and it solved the problem!

Hope this helps :)

和我的状况一样,是因为windows server 没有安装 git,所以 gitea无法在path中找到git的执行程序,添加上之后就好了

same iusse,need install git,and add git path to system environment variables

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants