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

Gitea not starting as Windows service #6722

Closed
2 of 7 tasks
scottaglia opened this issue Apr 23, 2019 · 4 comments · Fixed by #6790
Closed
2 of 7 tasks

Gitea not starting as Windows service #6722

scottaglia opened this issue Apr 23, 2019 · 4 comments · Fixed by #6790
Labels
Milestone

Comments

@scottaglia
Copy link
Contributor

scottaglia commented Apr 23, 2019

  • Gitea version (or commit ref): 2a0e86d
  • Git version:
  • Operating system: Windows Server
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    Log file is not created

Description

I upgraded from 5f4a40c to 2a0e86d (current master release), but when I restarted the service I got Error 1067. I tried lunching the exe from the command line and I got:
Expect user 'X' but current user is: Y
So I changed the RUN_USER to X inside app.ini, relaunched the exe from the cmd and gitea was up and running. But when I try to start gitea from the service (registered with nssm) I keep getting the same error 1067. Any idea of what might have changed?

@lunny
Copy link
Member

lunny commented Apr 24, 2019

Windows should not check that RUN_USER. See

func IsRunUserMatchCurrentUser(runUser string) (string, bool) {

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Apr 24, 2019
@scottaglia
Copy link
Contributor Author

I think this condition is evaluating to false

if IsWindows {

I'm kinda new to Go and maybe I'm wrong, but I searched the code and i don't see any assignment to the variable isWindows, that was removed by #6095

@jolheiser
Copy link
Member

Great catch, it looks as though IsWindows is used in several places but currently not being set anymore as you noted.
This would be a simple PR to add back in, would you like to do it or would you prefer someone else do it?

If you are comfortable building Gitea yourself you could test to see if it fixes your issue (I'm thinking it probably will)

@scottaglia
Copy link
Contributor Author

This weekend I'll try to fix and built it, if everything works fine I'll submit the PR if someone won't have done it already (it should be my first contribution to gitea 💪).

@lafriks lafriks added type/bug and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Apr 27, 2019
@lafriks lafriks added this to the 1.8.1 milestone Apr 27, 2019
scottaglia added a commit to scottaglia/gitea that referenced this issue Apr 28, 2019
Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
lafriks pushed a commit that referenced this issue Apr 28, 2019
Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants