Gitea: Gitea not starting as Windows service

Created on 23 Apr 2019  路  4Comments  路  Source: go-gitea/gitea

  • Gitea version (or commit ref): 2a0e86d
  • Git version:
  • Operating system: Windows Server
  • Database:

    • [ ] PostgreSQL

    • [x] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [x] 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?

kinbug

Most helpful comment

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 馃挭).

All 4 comments

I think this condition is evaluating to false
https://github.com/go-gitea/gitea/blob/2262811e407facea09047e94aa1850c192511587/modules/setting/setting.go#L431
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

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)

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 馃挭).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kifirkin picture kifirkin  路  3Comments

BNolet picture BNolet  路  3Comments

jonasfranz picture jonasfranz  路  3Comments

flozz picture flozz  路  3Comments

thehowl picture thehowl  路  3Comments